Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

container managed security and tiles

 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
excellent explanation ankit. many thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic