File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Question of hiding resource from client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Question of hiding resource from client" Watch "Question of hiding resource from client" New topic

Question of hiding resource from client

Stephen Lee
Ranch Hand

Joined: Dec 11, 2001
Posts: 74
I have found that there's a way to hide resource from a client - place the jsp pages in the directory WEB-INF. Therefore, the jsp pages cannot be viewed by typing the path http://localhost/*.jsp
The page can be accessed by the use of RequestDispatcher from a servlet program or using custom URL set in web.xml. However, it is required to use <jsp:include page="xxx.jsp" /> to include another jsp. However, the jsp is placed in the WEB-INF also, so ServletException is thrown. How can I include the jsp file successfully in this way? i have tried to use absolute path, however, it is still unsuccessful. What should I do? Thanks!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Question of hiding resource from client
It's not a secret anymore!