• 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

problem in configuring interceptor in struts.xml

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Here i have class "SessionInterceptor" for session management.
In above i have created interceptor stack and included in all action where i need with the navigation for session expired as




If i have more actions then i do have to include interceptor-ref and <result name="session">/sessionexpired.jsp</result> in all which seems time consuming. Is there any approach so that i don't have to include this in all actions ?

thank you in advance.
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the interceptor configuration to see how to configure a default interceptor stack and result configuration to see how to define global results...
 
rajiv shrestha
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:Check the interceptor configuration to see how to configure a default interceptor stack and result configuration to see how to define global results...



hi ankit, thank you for the response.

i modified like this.


Is this the right process to use default interceptor and global result?
But its not working.
I need some assist.
 
Ankit Garg
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But its not working.


Please be more specific about the problem...
 
rajiv shrestha
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:

But its not working.


Please be more specific about the problem...




my problem is i want the interceptor stack , "sessionStack" that i made to be included in all necessary actions and the result for sessionexpired.jsp.
As this can be done by default-interceptor-ref for interceptor and global results for the results. i have tried like the above code in the struts.xml. i want to maintain the session with this, but its not working. i directly goes to sessionexpired.jsp. i think it is due to global results.

i have implemented like the above code using default-interceptor-ref and global result. is this the right approach that i implemented like above ?


 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic