aspose file tools
The moose likes Servlets and the fly likes calling index.jsp from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling index.jsp from servlet" Watch "calling index.jsp from servlet" New topic

calling index.jsp from servlet

nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi all,
i have a index.jsp in my WEB-INF directory. how do i call/load this jsp from a servlet ?? have tried the below but the application doesnt seem to be able to find the jsp.

servlet :

so there is a "home" button which is meant to take the user back to the index.jsp page.

thanks in advance.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62269

You cannot directly address any resource under WEB-INF.

Frequently, all JSPs are placed under WEB-INF so that they cannot be addressed without going through their controllers. If your index.jsp does not have a controller, it cannot be placed under WEB-INF.

Please read this article for information on modern web application structure.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
You may include of forward request to this page from another web component which is directly accessible to the client.
I agree. Here's the link:
subject: calling index.jsp from servlet