my dog learned polymorphism*
The moose likes JSP and the fly likes problem in putting jsp's under WEB-INF folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in putting jsp Watch "problem in putting jsp New topic
Author

problem in putting jsp's under WEB-INF folder

Siva Prasad Reddy Katamreddy
Ranch Hand

Joined: Jun 06, 2007
Posts: 32

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

Joined: Dec 11, 2004
Posts: 13410

"PrasadReddy@AIPL",
Please check your private messages.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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
 
subject: problem in putting jsp's under WEB-INF folder
 
Similar Threads
Adding a Plugin - Jsp in pages folder
Include Jsp in Jsp
Securing JSP
Accessing jsp's directly
Unable to see jsp output in eclipse