Hello all, I have to (simple?) questions. 1) Is it possible to place to a jsp page in WEB-INF? 2) if the first question equals true, how do I create a new instance of that page using a servlet? (Or, in other words: how do I use that jsp page???) Thanks for your help, if someone could help me, if would be great! Erik
Erik: The J2EE Servlet 2.3 spec says that the WEB-INF node is not a part of the public document tree of an application and no file in this directory can be served directly to the client by the container. The spec does not seem to explicitly specify how to handle cases where a controller servlet or another JSP forwards a JSP page in the WEB-INF directory. Some app servers like BEA Weblogic 7.0 do not serve up jsp pages from the WEB-INF directory either in response to a direct request from the client or when another JSP/servlet forwards to it. However I came across a book from Sun Press that seems to encourage users to put JSP pages in the WEB-INF directory that they didn't want the client to access directly but could be served up via a jsp/servlet forward. In summary, you may be trying something that may not be portable across app servers. If your app server behaves like the latter case above, you can refer to the JSP page in the WEB-INF directory from a controller servlet using something like below getServletContext().getRequestDispatcher("/WEB-INF/exampleFolder/example.jsp").forward(request, response); Hope this helps. -- Ashwin
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth