Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Struts2 integration with Spring Security

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.
    Bookmark Topic Watch Topic
  • New Topic