• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help on Custom Filter in Struts 2.x

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Techies,

I'm going to upgrade my application from Struts 1.1 to Struts 2.3.16. Our application contains multiple URL extension in Web.xml, for ex. *.go, *.init, *.cache and etc.

We're calling the Custom Filter based on the URL extension, for *.go URL pattern calls SecurityFilter.java. There are many filters in web.xml which is getting called like this.

As per my understanding in Struts2.X, there is no URL extension (ie, *.action). If i configure Struts2.3.16 in web.xml (StrutsPrepareAndExecuteFilter), all the request goes to Struts.xml so my filter won't be called.

How to achieve the above calling custom filter mechanism in Struts2.3?

Please help me out, thanks in Advance !!

--
Regards,

Thangavel L
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can chain filters together, either programmatically or through web.xml.
Look at the examples here
 
Thangavel Loganathan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe,

Thanks for your suggestion, Really helpful to me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic