aspose file tools*
The moose likes Struts and the fly likes container managed security and tiles 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 "container managed security and tiles" Watch "container managed security and tiles" New topic
Author

container managed security and tiles

vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
Hi. I am having a problem with a a container managed security login page that is a Tile. I have the following

web.xml



struts.xml


tiles.xml




I am getting 'The requested resource (/website/LoginTile.action) is not available?'
vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
well i have managed to resolve the issue after seeing the following http://issues.apache.org/struts/browse/WW-2025. I made the following change:



Does anyone know what the dispatcher tags do? In that link it was also mentioned even with the above change it still doesnt work in ie7. It worked in ie8 for me. Is anyone able to confirm whether it works in ie7?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

I think you know that struts2 works using a filter. So it interrupts all the incoming requests, and then manages the request in its own way. By default filters apply only to client requests. So if you for example forward a request from Servlet to JSP, then the filter is not called. Now when a request comes from an unauthenticated user (for LoggedIn.action), then the security manager tries to forward the request to /LoginTile.action. But the struts filter is not involved in this forward so it is unable to process the request and call the actual LoginTile action. But when you included the dispatcher for FORWARD, then the struts filter is interrupts the forward of the request from the security manager to LoginTile.action and thus process the request normally. Now I don't know exactly how security managers in servers work, but this should be how it normally functions...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
excellent explanation ankit. many thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: container managed security and tiles
 
Similar Threads
confusion regarding authentication
Declarative security in web.xml?? is this secure??
Keep having to login with container based authentaction.
Redirection after realm authentication
how to redirect to success page in tomcat using its lapd configuration