views:

29

answers:

1

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?

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
It uses the include directive, not the jsp:include tag. Does that make a difference for Eclipse?
hal10001
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