• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling index.jsp from servlet

 
nikil shar
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64832
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may include of forward request to this page from another web component which is directly accessible to the client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic