Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question of hiding resource from client  RSS feed

Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!