• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in configuring interceptor in struts.xml

 
rajiv shrestha
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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.
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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 ?


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic