• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Struts2 integration with Spring Security

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm new to Spring Security and I wanted to use it for authentication purposes in my Struts2 application. The problem is that when I define Struts2 filter and Spring Security filter in web.xml and run the application I get the error 404. Both filters are mapped to /* url pattern so I suspect that might be the problem cause when I remove the Spring Security filter Struts2 works fine and I get to my home page. Here is my web.xml file:
 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure context configuration file lives in WEB-INF rather than WEB-INF/classes?
Could be that Spring isn't finding it.
 
Soheil Tayari
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Chris Montgomery wrote:Are you sure context configuration file lives in WEB-INF rather than WEB-INF/classes?
Could be that Spring isn't finding it.



Yes it's in WEB-INF.
 
Soheil Tayari
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I fixed it. The problem was that I missed some libraries in the classpath. I kept adding libraries that was missing according to container log file till it stopped complaining :-).
 
Chris Montgomery
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gerat news!

With projects I'm invovled with that don't use Maven, libraries can be a pain.
If you can, look in to Maven. Maven will manage most of your libraries and dependencies for you.

Netbeans has a project template for a Maven Web Application. I love it!
I haven't done it in Eclipse...
 
Soheil Tayari
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Chris Montgomery wrote:Gerat news!

With projects I'm invovled with that don't use Maven, libraries can be a pain.
If you can, look in to Maven. Maven will manage most of your libraries and dependencies for you.

Netbeans has a project template for a Maven Web Application. I love it!
I haven't done it in Eclipse...



Thanks Chris. I will definitely do that.
 
permaculture is giving a gift to your future self. After reading this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic