This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "container managed security and tiles" Watch "container managed security and tiles" New topic

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




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 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

Joined: Aug 03, 2008
Posts: 9452

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:
subject: container managed security and tiles
It's not a secret anymore!