We have a portion of our Dynamic Web Application that gets unpacked from a WAR, and placed in the build directory during compile. Because some of the files included in the web source are references to files from that WAR, then Eclipse can't find them. How do I get Eclipse to look instead in my build directory for the include files?
views:
29answers:
1
A:
That's not caused by Eclipse. As for every normal request URL, the URL in the page
attribute of the <jsp:include>
should just match any of the url-pattern
-s definied in webapp's or servletcontainer's web.xml
to be able to get a resource. In your case you just need to define a servlet which gets the resource from the classpath and streams it to the outputstream of the response and map this servlet with an url-pattern
in web.xml
which in turn can be used by <jsp:include>
.
BalusC
2010-02-27 15:42:48
It uses the include directive, not the jsp:include tag. Does that make a difference for Eclipse?
hal10001
2010-02-27 21:34:33
No, that's not possible as it will be executed during compile time. It should then really be available in the webcontent. Right now it's only available in the classpath. Oh, don't focus too much on Eclipse. It's just a development tool :)
BalusC
2010-02-27 23:06:04