GeeCON Prague 2014*
The moose likes Spring and the fly likes How to bypass spring secuirty setup for Javascript files and Struts2 ajax (DOJO) files? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to bypass spring secuirty setup for Javascript files and Struts2 ajax (DOJO) files?" Watch "How to bypass spring secuirty setup for Javascript files and Struts2 ajax (DOJO) files?" New topic
Author

How to bypass spring secuirty setup for Javascript files and Struts2 ajax (DOJO) files?

R Datla
Greenhorn

Joined: Jul 31, 2009
Posts: 4
I have Struts2 (2.1.8), Spring (security 2.0.4), Hibernate,Tiles etc. setup. Everything works fine except for javascript files. i am not able to bypass spring security authentication or even authentication, Javascript files. They are being blocked and I cannot use Struts2 Ajax tags or any javascript files. From what I can gather it must be something to do with either web.xml (dispatcher) setup or applicationcontext.xml setup. But unable to find any solution so far. Here are my web.xml and applicationcontext.xml. Can anyone help?

applicationcontext.xml ( took namespace tags out for this posting)
R Datla
Greenhorn

Joined: Jul 31, 2009
Posts: 4
Resolved it myself. Basically what needed to change was this snippet of code :



to this :




Basically the previous xml mapping was outdated and the one used above probably new version. At least in documentation off Spring's security API, that seems to be the standard. I guess it always serves you well when you read the documentation, the lesson that I never seem to learn quick enough
 
GeeCON Prague 2014
 
subject: How to bypass spring secuirty setup for Javascript files and Struts2 ajax (DOJO) files?