permaculture playing cards
The moose likes Struts and the fly likes Create security with Struts ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Create security with Struts !" Watch "Create security with Struts !" New topic

Create security with Struts !

Moniphal Say
Ranch Hand

Joined: Aug 11, 2004
Posts: 48
Anyone can tell me the clue or any information or any site about the security with Struts Framework.
I work on the web application using struts, I want to create the security to my project so that any user must be login before get into any pages of my project.
I found some pages can be accessed directly without log in if those pages do not contain the action.
Is there anyway to forbid this access direct?

Thanks for any help!

<b>The more we learn, the more we know !</b>
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

WEB-INF folder

A good workman is known by his tools.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

You can create a ServletFilter and map all requests to go through that Servlet and determine whether or not the requested resource is allowed to be viewed by the current user or not.

GenRocket - Experts at Building Test Data
Moniphal Say
Ranch Hand

Joined: Aug 11, 2004
Posts: 48
Thanks Gregg and Marc !
Gregg,I'll try as what you told me.

Thanks for your help!
I agree. Here's the link:
subject: Create security with Struts !
It's not a secret anymore!