File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes restricting JSP page from direct access.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "restricting JSP page from direct access.." Watch "restricting JSP page from direct access.." New topic
Author

restricting JSP page from direct access..

Raza Mohd
Ranch Hand

Joined: Jan 20, 2010
Posts: 247

I am new to struts..I am working over a simple struts application . and my JAVA Server pages are in different folder outside WEB-INF .when i place the page URL it opens the page on browser.Can i restrict them to open.???
please let me aware of the solution..!


Good luck!!
A small leak can sink a Gigantic ship.>
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

If you can't move the JSP pages to WEB-INF directory, you can use a filter to block any requests for such JSP pages. If all those JSPs are in a particular directory like /jsp/, then you can map your filter to /jsp/* to block any request for contents of the /jsp directory. The filter will block only incoming requests and will allow request dispatching from action to the JSP...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Raza Mohd
Ranch Hand

Joined: Jan 20, 2010
Posts: 247

Thank you Ankit but can you please tell me how can i use filter to perform it.Where do i implement it.???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: restricting JSP page from direct access..
 
Similar Threads
web.xml configuration question
Jsp and pie chart
Struts action class call from java script
Double Iteration
tree structure with struts?