unable to get the request parameters

2009-05-12 Thread Murugesh
 I am doing task on struts2. In that I have to use custom
AutherizationInterceptor. In my custom Interceptor Im checking weather user
is in session or not. And if he tries to attempt login I gave parameter in
struts.xml as true So Im checking against it and interceptor redirects
action to Home. But my problem is unable to get the request parameters in
Any Action class if Session exist too.

please help on this issue.


Re: unable to get the request parameters

2009-05-12 Thread Nils-Helge Garli Hegvik
It would certainly be a lot easier to help if you could show your
configuration and code...

Nils-H

On Tue, May 12, 2009 at 12:54 PM, Murugesh  wrote:
>  I am doing task on struts2. In that I have to use custom
> AutherizationInterceptor. In my custom Interceptor Im checking weather user
> is in session or not. And if he tries to attempt login I gave parameter in
> struts.xml as true So Im checking against it and interceptor redirects
> action to Home. But my problem is unable to get the request parameters in
> Any Action class if Session exist too.
>
> please help on this issue.
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: unable to get the request parameters

2009-05-12 Thread Murugesh





   
   
/login.jsp

   
/data.jsp


I am have default interceptor named login. i am chking session validation
(like is user loggin r not ). it seems work but after running  interceptor
it backs to actionclass, here i am chking requset parameters  at that am
geeting for all parameters.

Without interceptor everything working fine.



On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
wrote:

> It would certainly be a lot easier to help if you could show your
> configuration and code...
>
> Nils-H
>
> On Tue, May 12, 2009 at 12:54 PM, Murugesh  wrote:
> >  I am doing task on struts2. In that I have to use custom
> > AutherizationInterceptor. In my custom Interceptor Im checking weather
> user
> > is in session or not. And if he tries to attempt login I gave parameter
> in
> > struts.xml as true So Im checking against it and interceptor redirects
> > action to Home. But my problem is unable to get the request parameters in
> > Any Action class if Session exist too.
> >
> > please help on this issue.
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: unable to get the request parameters

2009-05-12 Thread Murugesh
and my logininterceptor is
public class logininterceptor extends AbstractInterceptor  {
   private static final String USER_KEY = "isLoggedin";
 public String intercept(ActionInvocation invocation) throws Exception {
  Map session = invocation.getInvocationContext().getSession();
System.out.println(" calling intercep"+invocation.getAction());
  if(session.get(USER_KEY) == null) {
 System.out.println(" Not logged in");
   //addActionError(invocation, "You must be authenticated to access this
page");
   return Action.ERROR;
  }
System.out.println("Hey he already logged in");

  return invocation.invoke();
 }


On Tue, May 12, 2009 at 4:34 PM, Murugesh  wrote:

> 
> 
> 
>  class="com.action.generic.logininterceptor"/>
> 
>
>
> /login.jsp
> 
> class="com.action.device.ManagePacketsAction" method="show30MData">
> /data.jsp
> 
>
> I am have default interceptor named login. i am chking session validation
> (like is user loggin r not ). it seems work but after running  interceptor
> it backs to actionclass, here i am chking requset parameters  at that am
> geeting for all parameters.
>
> Without interceptor everything working fine.
>
>
>
> On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik  > wrote:
>
>> It would certainly be a lot easier to help if you could show your
>> configuration and code...
>>
>> Nils-H
>>
>> On Tue, May 12, 2009 at 12:54 PM, Murugesh  wrote:
>> >  I am doing task on struts2. In that I have to use custom
>> > AutherizationInterceptor. In my custom Interceptor Im checking weather
>> user
>> > is in session or not. And if he tries to attempt login I gave parameter
>> in
>> > struts.xml as true So Im checking against it and interceptor redirects
>> > action to Home. But my problem is unable to get the request parameters
>> in
>> > Any Action class if Session exist too.
>> >
>> > please help on this issue.
>> >
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


Re: unable to get the request parameters

2009-05-12 Thread Nils-Helge Garli Hegvik
You have configured your interceptor as the only one in the stack.
When you create your own interceptor stack, make sure you also include
one of the framework stacks (e.g. basicStack).

Nils-H

On Tue, May 12, 2009 at 1:04 PM, Murugesh  wrote:
> 
>    
>        
>             class="com.action.generic.logininterceptor"/>
>        
>       
>       
>            /login.jsp
>        
>        method="show30MData">
> /data.jsp
> 
>
> I am have default interceptor named login. i am chking session validation
> (like is user loggin r not ). it seems work but after running  interceptor
> it backs to actionclass, here i am chking requset parameters  at that am
> geeting for all parameters.
>
> Without interceptor everything working fine.
>
>
>
> On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
> wrote:
>
>> It would certainly be a lot easier to help if you could show your
>> configuration and code...
>>
>> Nils-H
>>
>> On Tue, May 12, 2009 at 12:54 PM, Murugesh  wrote:
>> >  I am doing task on struts2. In that I have to use custom
>> > AutherizationInterceptor. In my custom Interceptor Im checking weather
>> user
>> > is in session or not. And if he tries to attempt login I gave parameter
>> in
>> > struts.xml as true So Im checking against it and interceptor redirects
>> > action to Home. But my problem is unable to get the request parameters in
>> > Any Action class if Session exist too.
>> >
>> > please help on this issue.
>> >
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: unable to get the request parameters

2009-05-12 Thread Murugesh
Thanks Nils-H.

i am not clear. can i have the sample for this?

On Tue, May 12, 2009 at 4:57 PM, Nils-Helge Garli Hegvik
wrote:

> You have configured your interceptor as the only one in the stack.
> When you create your own interceptor stack, make sure you also include
> one of the framework stacks (e.g. basicStack).
>
> Nils-H
>
> On Tue, May 12, 2009 at 1:04 PM, Murugesh  wrote:
> > 
> >
> >
> > > class="com.action.generic.logininterceptor"/>
> >
> >   
> >   
> >/login.jsp
> >
> >class="com.action.device.ManagePacketsAction"
> > method="show30MData">
> > /data.jsp
> > 
> >
> > I am have default interceptor named login. i am chking session validation
> > (like is user loggin r not ). it seems work but after running
>  interceptor
> > it backs to actionclass, here i am chking requset parameters  at that am
> > geeting for all parameters.
> >
> > Without interceptor everything working fine.
> >
> >
> >
> > On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
> > wrote:
> >
> >> It would certainly be a lot easier to help if you could show your
> >> configuration and code...
> >>
> >> Nils-H
> >>
> >> On Tue, May 12, 2009 at 12:54 PM, Murugesh 
> wrote:
> >> >  I am doing task on struts2. In that I have to use custom
> >> > AutherizationInterceptor. In my custom Interceptor Im checking weather
> >> user
> >> > is in session or not. And if he tries to attempt login I gave
> parameter
> >> in
> >> > struts.xml as true So Im checking against it and interceptor redirects
> >> > action to Home. But my problem is unable to get the request parameters
> in
> >> > Any Action class if Session exist too.
> >> >
> >> > please help on this issue.
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: unable to get the request parameters

2009-05-12 Thread Murugesh
and also am very new to Interceptors

On Tue, May 12, 2009 at 5:00 PM, Murugesh  wrote:

> Thanks Nils-H.
>
> i am not clear. can i have the sample for this?
>
>   On Tue, May 12, 2009 at 4:57 PM, Nils-Helge Garli Hegvik <
> nil...@gmail.com> wrote:
>
>> You have configured your interceptor as the only one in the stack.
>> When you create your own interceptor stack, make sure you also include
>> one of the framework stacks (e.g. basicStack).
>>
>> Nils-H
>>
>> On Tue, May 12, 2009 at 1:04 PM, Murugesh  wrote:
>> > 
>> >
>> >
>> >> > class="com.action.generic.logininterceptor"/>
>> >
>> >   
>> >   
>> >/login.jsp
>> >
>> >   > class="com.action.device.ManagePacketsAction"
>> > method="show30MData">
>> > /data.jsp
>> > 
>> >
>> > I am have default interceptor named login. i am chking session
>> validation
>> > (like is user loggin r not ). it seems work but after running
>>  interceptor
>> > it backs to actionclass, here i am chking requset parameters  at that am
>> > geeting for all parameters.
>> >
>> > Without interceptor everything working fine.
>> >
>> >
>> >
>> > On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
>> > wrote:
>> >
>> >> It would certainly be a lot easier to help if you could show your
>> >> configuration and code...
>> >>
>> >> Nils-H
>> >>
>> >> On Tue, May 12, 2009 at 12:54 PM, Murugesh 
>> wrote:
>> >> >  I am doing task on struts2. In that I have to use custom
>> >> > AutherizationInterceptor. In my custom Interceptor Im checking
>> weather
>> >> user
>> >> > is in session or not. And if he tries to attempt login I gave
>> parameter
>> >> in
>> >> > struts.xml as true So Im checking against it and interceptor
>> redirects
>> >> > action to Home. But my problem is unable to get the request
>> parameters in
>> >> > Any Action class if Session exist too.
>> >> >
>> >> > please help on this issue.
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


Re: unable to get the request parameters

2009-05-12 Thread Nils-Helge Garli Hegvik
Here's an example:
http://struts.apache.org/2.1.6/docs/interceptor-configuration.html

Note how a custom stack is defined and how the custom stack is
referring to the "defaultStack".

Nils-H

On Tue, May 12, 2009 at 1:33 PM, Murugesh  wrote:
> and also am very new to Interceptors
>
> On Tue, May 12, 2009 at 5:00 PM, Murugesh  wrote:
>
>> Thanks Nils-H.
>>
>> i am not clear. can i have the sample for this?
>>
>>   On Tue, May 12, 2009 at 4:57 PM, Nils-Helge Garli Hegvik <
>> nil...@gmail.com> wrote:
>>
>>> You have configured your interceptor as the only one in the stack.
>>> When you create your own interceptor stack, make sure you also include
>>> one of the framework stacks (e.g. basicStack).
>>>
>>> Nils-H
>>>
>>> On Tue, May 12, 2009 at 1:04 PM, Murugesh  wrote:
>>> > 
>>> >    
>>> >        
>>> >            >> > class="com.action.generic.logininterceptor"/>
>>> >        
>>> >       
>>> >       
>>> >            /login.jsp
>>> >        
>>> >       >> class="com.action.device.ManagePacketsAction"
>>> > method="show30MData">
>>> > /data.jsp
>>> > 
>>> >
>>> > I am have default interceptor named login. i am chking session
>>> validation
>>> > (like is user loggin r not ). it seems work but after running
>>>  interceptor
>>> > it backs to actionclass, here i am chking requset parameters  at that am
>>> > geeting for all parameters.
>>> >
>>> > Without interceptor everything working fine.
>>> >
>>> >
>>> >
>>> > On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
>>> > wrote:
>>> >
>>> >> It would certainly be a lot easier to help if you could show your
>>> >> configuration and code...
>>> >>
>>> >> Nils-H
>>> >>
>>> >> On Tue, May 12, 2009 at 12:54 PM, Murugesh 
>>> wrote:
>>> >> >  I am doing task on struts2. In that I have to use custom
>>> >> > AutherizationInterceptor. In my custom Interceptor Im checking
>>> weather
>>> >> user
>>> >> > is in session or not. And if he tries to attempt login I gave
>>> parameter
>>> >> in
>>> >> > struts.xml as true So Im checking against it and interceptor
>>> redirects
>>> >> > action to Home. But my problem is unable to get the request
>>> parameters in
>>> >> > Any Action class if Session exist too.
>>> >> >
>>> >> > please help on this issue.
>>> >> >
>>> >>
>>> >> -
>>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> >> For additional commands, e-mail: user-h...@struts.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: unable to get the request parameters

2009-05-12 Thread Murugesh
Thanks a lot..

 i have changed my config of interceptors as










now its working fine.i will do unit test completely and update soon.

On Tue, May 12, 2009 at 5:22 PM, Nils-Helge Garli Hegvik
wrote:

> Here's an example:
> http://struts.apache.org/2.1.6/docs/interceptor-configuration.html
>
> Note how a custom stack is defined and how the custom stack is
> referring to the "defaultStack".
>
> Nils-H
>
> On Tue, May 12, 2009 at 1:33 PM, Murugesh  wrote:
> > and also am very new to Interceptors
> >
> > On Tue, May 12, 2009 at 5:00 PM, Murugesh  wrote:
> >
> >> Thanks Nils-H.
> >>
> >> i am not clear. can i have the sample for this?
> >>
> >>   On Tue, May 12, 2009 at 4:57 PM, Nils-Helge Garli Hegvik <
> >> nil...@gmail.com> wrote:
> >>
> >>> You have configured your interceptor as the only one in the stack.
> >>> When you create your own interceptor stack, make sure you also include
> >>> one of the framework stacks (e.g. basicStack).
> >>>
> >>> Nils-H
> >>>
> >>> On Tue, May 12, 2009 at 1:04 PM, Murugesh 
> wrote:
> >>> > 
> >>> >
> >>> >
> >>> > >>> > class="com.action.generic.logininterceptor"/>
> >>> >
> >>> >   
> >>> >   
> >>> >/login.jsp
> >>> >
> >>> >>>> class="com.action.device.ManagePacketsAction"
> >>> > method="show30MData">
> >>> > /data.jsp
> >>> > 
> >>> >
> >>> > I am have default interceptor named login. i am chking session
> >>> validation
> >>> > (like is user loggin r not ). it seems work but after running
> >>>  interceptor
> >>> > it backs to actionclass, here i am chking requset parameters  at that
> am
> >>> > geeting for all parameters.
> >>> >
> >>> > Without interceptor everything working fine.
> >>> >
> >>> >
> >>> >
> >>> > On Tue, May 12, 2009 at 4:27 PM, Nils-Helge Garli Hegvik
> >>> > wrote:
> >>> >
> >>> >> It would certainly be a lot easier to help if you could show your
> >>> >> configuration and code...
> >>> >>
> >>> >> Nils-H
> >>> >>
> >>> >> On Tue, May 12, 2009 at 12:54 PM, Murugesh 
> >>> wrote:
> >>> >> >  I am doing task on struts2. In that I have to use custom
> >>> >> > AutherizationInterceptor. In my custom Interceptor Im checking
> >>> weather
> >>> >> user
> >>> >> > is in session or not. And if he tries to attempt login I gave
> >>> parameter
> >>> >> in
> >>> >> > struts.xml as true So Im checking against it and interceptor
> >>> redirects
> >>> >> > action to Home. But my problem is unable to get the request
> >>> parameters in
> >>> >> > Any Action class if Session exist too.
> >>> >> >
> >>> >> > please help on this issue.
> >>> >> >
> >>> >>
> >>> >>
> -
> >>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>> >>
> >>> >>
> >>> >
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> For additional commands, e-mail: user-h...@struts.apache.org
> >>>
> >>>
> >>
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>