Im thinking he maybe has some jsp page he wants to protect and is implementing the security in an interceptor

Pat Lightbody wrote:
Can someone please explain to me what you mean when you say "have an
interceptor called when going to a jsp page"?

----- Original Message ----- From: "Francisco Hernandez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 29, 2003 11:07 PM
Subject: Re: [OS-webwork] EmptyAction class for interceptor calling




there is no need for an EmptyAction class at all, just use ActionSupport
directly, it already has a execute method that returns SUCCESS.

Thompson, Kris wrote:

I discovered that if you need to have a interceptor called when going to
a .jsp page you can simple create an EmptyAction.java file which has one
method execute and one line in it return SUCCESS.

* *

*public* *class* EmptyAction *extends* ActionSupport{

*public* String execute() *throws* Exception {

*return* SUCCESS;

}

}

Then in the xwork.xml file I can call that action anything like
promptAddStoryAction which simply has one result of success to the .jsp
that I wanted.


<action name="PromptAddStoryAction"

class="com.wafer.actions.EmptyAction">


<result name="success" type="dispatcher">

<param name="location">/addstory.jsp</param>

</result>

<interceptor-ref name="security"/>

</action>

So this means that any interceptor stack associated to that action will
now get called!

And of course the EmptyAction class is completely resusable.

Is there a better way to call interceptors when just trying to go to a

jsp?




Kris Thompson





------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork








------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to