Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling index.jsp from servlet  RSS feed

 
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
Posts: 66203
151
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!