Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-25 Thread xianwinwin
THANK YOU nuwan !!! this is exactly what i was looking for -- View this message in context: http://www.nabble.com/is-it-possible-to-pass-a-parameter--to-an-interceptor-from-the-xml-file--tp15074977p15090339.html Sent from the Struts - User mailing list archive at Nabble.com.

is possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread xianwinwin
Hi all, I wonder if it is possible to pass a parameter with a value to an interceptor. Example: I have the following interceptor: interceptor name=authentication class=com.struts.security.AuthenticationInterceptor/ (parameterGivenInXmlFile==4) the implementation is: public String

Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread Nuwan Chandrasoma
Hi, yes it is possible., just implement a setter and getter method for the parameter you have in the struts.xml file. and it will be available to you in the intercept method. eg:- // in the intercept class.. private String httpPort; public String getHttpPort() { return httpPort;

Re: is possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread Chris Pratt
On Jan 24, 2008 1:04 PM, xianwinwin [EMAIL PROTECTED] wrote: Hi all, I wonder if it is possible to pass a parameter with a value to an interceptor. Example: I have the following interceptor: interceptor name=authentication class=com.struts.security.AuthenticationInterceptor/

Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread ravi_eze
hi, i think whats not possible is ... param name=...${actionclass'sVariable} /.. ... i.e. getting the variable form action calss and accessing it or evaluating an expression as the param value. any ideas how this is possible cheers, ravi nuwan chandrasoma-2 wrote: Hi, yes it is