Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving your jsp pages in WEB-INF

 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can I access pages which are inside WEB-INF
 
Sathish Nagappan
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Accessing pages inside WEB-INF can be done by using the (Request.getDispatcher("jspPage")).forward() or include().

Forward for a permanent transfer from a servlet.
Include to perform some business logic for side effects or for setting up some maps/beans/arrays or lists (and of course placing them at required attribute scopes so that you can access them when the page returns to the calling servlet from a temporary transfer.
 
Darren Edwards
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request.getDispatcher("jspPage")).forward()

Perhaps worth point out that "jspPage" represents the path as well
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!