• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in putting jsp's under WEB-INF folder

 
Siva Prasad Reddy Katamreddy
Ranch Hand
Posts: 32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
somewhere i read to protect jsp's from direct access, we can place them in WEB-INF folder. But what if i want to redirect to a jsp from another jsp in WEB-INF folder.

Thanks in advance
K. Prasad Reddy
Hyderabad
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"PrasadReddy@AIPL",
Please check your private messages.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Redirects involve direct access from a browser.

Unlike forwards (which occur on the server), a redirect is accomplished by sending a 30x response code to the browser along with a 'Location' header.
Once received, the browser makes a brand new request for the resource specified in the location header.

So, in short, you can not redirect to a JSP stored under WEB-INF.
You would need to either use a forward, or redirect to a controller which uses a forward.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic