Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Use of @Before and @After annotation with example..

 
Ranch Hand
Posts: 53
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this code but not getting how to use @Before and @After annotation in struts2
please help me
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Before and After annotations in Struts framework used for Interceptor in struts. Interceptors introduced in struts 2.

To use these annotations, you have to specify the AnnotationWorkflowInterceptor to your interceptor stack.

After Annotation->Marks a action method that needs to be executed after the result.
Before Annotation->Marks a action method that needs to be executed before the main action method.

Thank you.
Pyla.
 
dhaval thakor
Ranch Hand
Posts: 53
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya i got it..but in given example what should i write in isAuthorized method..
can you please give me code ...?

    Bookmark Topic Watch Topic
  • New Topic