This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Restricting access to the view (JSPs) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Restricting access to the view (JSPs)" Watch "Restricting access to the view (JSPs)" New topic
Author

Restricting access to the view (JSPs)

Todd Johnson
Ranch Hand

Joined: Sep 03, 2005
Posts: 61
I'm working on my first STRUTS project. I have done some MVC web apps before. Typically I would have my controller servlet put a boolean on the request before forwarding it to my JSPs. My JSPs would check for that boolean to be there. If it wasn't there, the JSP would know that the user pointed their browser at the JSP instead of being forwarded to the JSP by the controller. In that case I would just forward them back to some "safe" place.

I'd like to do the same thing in struts, but the only way I can think to do it is to extend strut's action servlet. However, from what I have read, this is a bad idea. Is there another alternative that I am missing?

Thanks!
Todd
Mark Blackledge
Greenhorn

Joined: Nov 04, 2005
Posts: 5
Yes, put your JSP files somewhere under your WEB-INF directory. Then the users have no access to them and you don't have any extra work.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Restricting access to the view (JSPs)
 
Similar Threads
best approach
need some help in MVC
Struts urgent help ?
Navigating portlets
Controller servlet