How do I get Eclipse to look in the build path for JSP includes instead of the web source?
We have a portion of our Dynamic Web Application that gets unpacked from a WAR, and placed in the build directory d开发者_如何学Gouring 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?
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>
.
精彩评论