AS you may know that when an API is prepared, it can be used in any project just by adding it into classpath in J2SE. I wonder if it is possible to create a web page and compiled it into a war file just like an API definition so that It can directly be used within an ear.
Asked
Active
Viewed 202 times
0
-
"API" doesn't indicate any formal construct. Perhaps you could tell us in more detail what it is that you're trying to do? – GreyBeardedGeek Jan 07 '13 at 22:35
1 Answers
1
No, you can't do that using a war file, because a war file would define a new web application separated from the other ones.
But since the servlet 3.0 spec, you can do that with a jar file placed in the WEB-INF/lib directory of your war file, using the META-INF/resources directory of the jar. See this question for details.