I have a servlet (content.java) which acts as main page. I have a JSP file (footer.jsp) which acts as footer in that page. I am including the JSP in the server using RequestDispatcher include. It works perfectly fine. if I click the url http://localhost/servlet/content
So you are generating the main page with a servlet and including JSPs for the footer? That's an odd thing to do. Why not use a JSP for the main page as well?
But back to the original issue, placing the footer.jsp under the WEB-INF hierarchy will prevent direct addressing.
Joined: Jun 22, 2001
Thanks. Actually my company has acquired an application which has servlets as main content pages and we are given task to customise it. So we are using JSPs as footer and header. The main content pages can not be changed to JSPs now.
Thanks. I will keep my JSPs inside web-inf.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com