This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling index.jsp from servlet" Watch "calling index.jsp from servlet" New topic
Author

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
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

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: http://aspose.com/file-tools
 
subject: calling index.jsp from servlet
 
Similar Threads
Problem with JSPs in web application
servelts + css odd problems
writing jsp codes
Setting the path of servlet and jsp pages
Cannot find file..? Help