You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghu Kanchustambham <kr...@gmail.com> on 2005/11/20 19:44:27 UTC
session.invalidate doesnt log me out...
Hi,
Shouldnt session.invalidate() log me out?
request.getSession().invalidate();
try {
response.sendRedirect("home.jsp");
} catch (IOException e) {
e.printStackTrace();
}
I am using JAAS Basic authentication on tomcat. When the above code is
executed and the redirection happens back, i expected that login box will
pop up again asking me my user id and password. But nothing of this sort is
happening.
When I first time hit the home.jsp .. the box pops up and authenticates me.
Should I not expect the same behavior from the above code. which first
invalidates my present session and then sends a redirect to the home.jsppage?
Can someone throw some light on what is happening?
Thanks.
Raghu
Re: session.invalidate doesnt log me out...
Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon-
Scrounging the jaas mail -lists I found this from Jan Bertel
you haven't specified a
<realm-name> element in the <login-config> element of your web.xml file.
So, if you want to avoid the exception, you can just specify a
<realm-name> that is the same as your jboss-web.xml <security-domain>
element minus the java:jaas prefix.
(excerpted from Jan Bertel reply to exceptions enountered during logout.jsp)
http://www.servlets.com/archive/servlet/ReadMsg?msgId=483429&listName=jetty-discuss
HTH,
Martin-
----- Original Message -----
From: "Raghu Kanchustambham" <kr...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, November 20, 2005 1:44 PM
Subject: session.invalidate doesnt log me out...
Hi,
Shouldnt session.invalidate() log me out?
request.getSession().invalidate();
try {
response.sendRedirect("home.jsp");
} catch (IOException e) {
e.printStackTrace();
}
I am using JAAS Basic authentication on tomcat. When the above code is
executed and the redirection happens back, i expected that login box will
pop up again asking me my user id and password. But nothing of this sort is
happening.
When I first time hit the home.jsp .. the box pops up and authenticates me.
Should I not expect the same behavior from the above code. which first
invalidates my present session and then sends a redirect to the
home.jsppage?
Can someone throw some light on what is happening?
Thanks.
Raghu
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the use of parameter attribute in action tag
Posted by Su...@Keane.com.
ok , then you can access "abc" parameter in your action class from request
object.
"Nandakishore Nekkanti" <na...@evolveware.com>
11/21/2005 03:11 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>
cc
Subject
Re: what is the use of parameter attribute in action tag
I want to access "abc"
Rgds
Nanda kishore Nekkanti
Software Engineer
EvolveWare, Inc
Riveresa complex, Baner Road, Baner,
Pune - 411 045
Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
Email: nandan@evolveware.com
URL: http://www.evolveware.com
There is a difference between an objective and actions.Unless you
understand your objective , you will be wasting your time in
actions.Know
your objective first.
-- Swami Vivekananda
----- Original Message -----
From: <Su...@Keane.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, November 21, 2005 2:33 PM
Subject: Re: what is the use of parameter attribute in action tag
> "nanda" is method name in your Action class or you want to access "abc"
> parameter in your method of Action Class.
>
>
>
>
>
> "Nandakishore Nekkanti" <na...@evolveware.com>
> 11/21/2005 02:21 PM
> Please respond to
> "Struts Users Mailing List" <us...@struts.apache.org>
>
>
> To
> "Struts Users Mailing List" <us...@struts.apache.org>
> cc
>
> Subject
> Re: what is the use of parameter attribute in action tag
>
>
>
>
>
>
> Hi Tahnks for ur response.
>
> I want to send some request parametrs as query string in my first
request
> to the action.
>
> This is just like this.
> localhost:8080/xxxxform.do?abc=nanda
>
> Here i can hard code Nanda in Action.
>
> Instead of hard coding in action is there any way for to do that.
>
>
> Rgds
>
> Nanda kishore Nekkanti
> Software Engineer
> EvolveWare, Inc
> Riveresa complex, Baner Road, Baner,
> Pune - 411 045
> Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
>
> Email: nandan@evolveware.com
> URL: http://www.evolveware.com
>
> There is a difference between an objective and actions.Unless you
> understand your objective , you will be wasting your time in
> actions.Know
> your objective first.
>
>
>
> -- Swami Vivekananda
> ----- Original Message -----
> From: <Su...@Keane.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, November 21, 2005 2:18 PM
> Subject: Re: what is the use of parameter attribute in action tag
>
>
> > Nandan,
> >
> > parameter attribute in action-mapping is used for method name. you can
> get
> > the request parameters from request object itself in action class, no
> > extra setting is required.
> > Ex if you have any parameter in request as "type" then use
> > String type = (String) request.getParameter("type");
> >
> > Hope it helps.
> >
> > Sunil
> >
> >
> >
> >
> > "Nandakishore Nekkanti" <na...@evolveware.com>
> > 11/21/2005 01:44 PM
> > Please respond to
> > "Struts Users Mailing List" <us...@struts.apache.org>
> >
> >
> > To
> > "Struts Users Mailing List" <us...@struts.apache.org>,
> > <la...@holoweb.net>
> > cc
> >
> > Subject
> > what is the use of parameter attribute in action tag
> >
> >
> >
> >
> >
> >
> > Hi
> >
> > Is there any option in struts-config.xml to send request parameters
to
> > the
> > action.
> >
> > i guess parameter attribute in action can do this .Is this for that
> > purpose.
> >
> >
> >
> >
> >
> > --
> > Internal Virus Database is out-of-date.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
>
>
--------------------------------------------------------------------------
--
> ----
>
>
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
----------------------------------------------------------------------------
----
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the use of parameter attribute in action tag
Posted by Nandakishore Nekkanti <na...@evolveware.com>.
I want to access "abc"
Rgds
Nanda kishore Nekkanti
Software Engineer
EvolveWare, Inc
Riveresa complex, Baner Road, Baner,
Pune - 411 045
Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
Email: nandan@evolveware.com
URL: http://www.evolveware.com
There is a difference between an objective and actions.Unless you
understand your objective , you will be wasting your time in actions.Know
your objective first.
-- Swami Vivekananda
----- Original Message -----
From: <Su...@Keane.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, November 21, 2005 2:33 PM
Subject: Re: what is the use of parameter attribute in action tag
> "nanda" is method name in your Action class or you want to access "abc"
> parameter in your method of Action Class.
>
>
>
>
>
> "Nandakishore Nekkanti" <na...@evolveware.com>
> 11/21/2005 02:21 PM
> Please respond to
> "Struts Users Mailing List" <us...@struts.apache.org>
>
>
> To
> "Struts Users Mailing List" <us...@struts.apache.org>
> cc
>
> Subject
> Re: what is the use of parameter attribute in action tag
>
>
>
>
>
>
> Hi Tahnks for ur response.
>
> I want to send some request parametrs as query string in my first request
> to the action.
>
> This is just like this.
> localhost:8080/xxxxform.do?abc=nanda
>
> Here i can hard code Nanda in Action.
>
> Instead of hard coding in action is there any way for to do that.
>
>
> Rgds
>
> Nanda kishore Nekkanti
> Software Engineer
> EvolveWare, Inc
> Riveresa complex, Baner Road, Baner,
> Pune - 411 045
> Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
>
> Email: nandan@evolveware.com
> URL: http://www.evolveware.com
>
> There is a difference between an objective and actions.Unless you
> understand your objective , you will be wasting your time in
> actions.Know
> your objective first.
>
>
>
> -- Swami Vivekananda
> ----- Original Message -----
> From: <Su...@Keane.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, November 21, 2005 2:18 PM
> Subject: Re: what is the use of parameter attribute in action tag
>
>
> > Nandan,
> >
> > parameter attribute in action-mapping is used for method name. you can
> get
> > the request parameters from request object itself in action class, no
> > extra setting is required.
> > Ex if you have any parameter in request as "type" then use
> > String type = (String) request.getParameter("type");
> >
> > Hope it helps.
> >
> > Sunil
> >
> >
> >
> >
> > "Nandakishore Nekkanti" <na...@evolveware.com>
> > 11/21/2005 01:44 PM
> > Please respond to
> > "Struts Users Mailing List" <us...@struts.apache.org>
> >
> >
> > To
> > "Struts Users Mailing List" <us...@struts.apache.org>,
> > <la...@holoweb.net>
> > cc
> >
> > Subject
> > what is the use of parameter attribute in action tag
> >
> >
> >
> >
> >
> >
> > Hi
> >
> > Is there any option in struts-config.xml to send request parameters to
> > the
> > action.
> >
> > i guess parameter attribute in action can do this .Is this for that
> > purpose.
> >
> >
> >
> >
> >
> > --
> > Internal Virus Database is out-of-date.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
----------------------------------------------------------------------------
----
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the use of parameter attribute in action tag
Posted by Su...@Keane.com.
"nanda" is method name in your Action class or you want to access "abc"
parameter in your method of Action Class.
"Nandakishore Nekkanti" <na...@evolveware.com>
11/21/2005 02:21 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>
cc
Subject
Re: what is the use of parameter attribute in action tag
Hi Tahnks for ur response.
I want to send some request parametrs as query string in my first request
to the action.
This is just like this.
localhost:8080/xxxxform.do?abc=nanda
Here i can hard code Nanda in Action.
Instead of hard coding in action is there any way for to do that.
Rgds
Nanda kishore Nekkanti
Software Engineer
EvolveWare, Inc
Riveresa complex, Baner Road, Baner,
Pune - 411 045
Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
Email: nandan@evolveware.com
URL: http://www.evolveware.com
There is a difference between an objective and actions.Unless you
understand your objective , you will be wasting your time in
actions.Know
your objective first.
-- Swami Vivekananda
----- Original Message -----
From: <Su...@Keane.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, November 21, 2005 2:18 PM
Subject: Re: what is the use of parameter attribute in action tag
> Nandan,
>
> parameter attribute in action-mapping is used for method name. you can
get
> the request parameters from request object itself in action class, no
> extra setting is required.
> Ex if you have any parameter in request as "type" then use
> String type = (String) request.getParameter("type");
>
> Hope it helps.
>
> Sunil
>
>
>
>
> "Nandakishore Nekkanti" <na...@evolveware.com>
> 11/21/2005 01:44 PM
> Please respond to
> "Struts Users Mailing List" <us...@struts.apache.org>
>
>
> To
> "Struts Users Mailing List" <us...@struts.apache.org>,
> <la...@holoweb.net>
> cc
>
> Subject
> what is the use of parameter attribute in action tag
>
>
>
>
>
>
> Hi
>
> Is there any option in struts-config.xml to send request parameters to
> the
> action.
>
> i guess parameter attribute in action can do this .Is this for that
> purpose.
>
>
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
----------------------------------------------------------------------------
----
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the use of parameter attribute in action tag
Posted by Nandakishore Nekkanti <na...@evolveware.com>.
Hi Tahnks for ur response.
I want to send some request parametrs as query string in my first request
to the action.
This is just like this.
localhost:8080/xxxxform.do?abc=nanda
Here i can hard code Nanda in Action.
Instead of hard coding in action is there any way for to do that.
Rgds
Nanda kishore Nekkanti
Software Engineer
EvolveWare, Inc
Riveresa complex, Baner Road, Baner,
Pune - 411 045
Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084
Email: nandan@evolveware.com
URL: http://www.evolveware.com
There is a difference between an objective and actions.Unless you
understand your objective , you will be wasting your time in actions.Know
your objective first.
-- Swami Vivekananda
----- Original Message -----
From: <Su...@Keane.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, November 21, 2005 2:18 PM
Subject: Re: what is the use of parameter attribute in action tag
> Nandan,
>
> parameter attribute in action-mapping is used for method name. you can get
> the request parameters from request object itself in action class, no
> extra setting is required.
> Ex if you have any parameter in request as "type" then use
> String type = (String) request.getParameter("type");
>
> Hope it helps.
>
> Sunil
>
>
>
>
> "Nandakishore Nekkanti" <na...@evolveware.com>
> 11/21/2005 01:44 PM
> Please respond to
> "Struts Users Mailing List" <us...@struts.apache.org>
>
>
> To
> "Struts Users Mailing List" <us...@struts.apache.org>,
> <la...@holoweb.net>
> cc
>
> Subject
> what is the use of parameter attribute in action tag
>
>
>
>
>
>
> Hi
>
> Is there any option in struts-config.xml to send request parameters to
> the
> action.
>
> i guess parameter attribute in action can do this .Is this for that
> purpose.
>
>
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
----------------------------------------------------------------------------
----
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the use of parameter attribute in action tag
Posted by Su...@Keane.com.
Nandan,
parameter attribute in action-mapping is used for method name. you can get
the request parameters from request object itself in action class, no
extra setting is required.
Ex if you have any parameter in request as "type" then use
String type = (String) request.getParameter("type");
Hope it helps.
Sunil
"Nandakishore Nekkanti" <na...@evolveware.com>
11/21/2005 01:44 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>,
<la...@holoweb.net>
cc
Subject
what is the use of parameter attribute in action tag
Hi
Is there any option in struts-config.xml to send request parameters to
the
action.
i guess parameter attribute in action can do this .Is this for that
purpose.
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
what is the use of parameter attribute in action tag
Posted by Nandakishore Nekkanti <na...@evolveware.com>.
Hi
Is there any option in struts-config.xml to send request parameters to the
action.
i guess parameter attribute in action can do this .Is this for that
purpose.
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: session.invalidate doesnt log me out...
Posted by Laurie Harper <la...@holoweb.net>.
Raghu Kanchustambham wrote:
> Hi,
> Shouldnt session.invalidate() log me out?
> request.getSession().invalidate();
> try {
> response.sendRedirect("home.jsp");
> } catch (IOException e) {
> e.printStackTrace();
> }
> I am using JAAS Basic authentication on tomcat. When the above code is
> executed and the redirection happens back, i expected that login box will
> pop up again asking me my user id and password. But nothing of this sort is
> happening.
> When I first time hit the home.jsp .. the box pops up and authenticates me.
> Should I not expect the same behavior from the above code. which first
> invalidates my present session and then sends a redirect to the home.jsppage?
> Can someone throw some light on what is happening?
> Thanks.
> Raghu
The problem is that there's no way to tell the browser to relinquish
HTTP authentication info, so when you redirect your app sends an
authentication challenge and the browser automatically responds with the
credentials you supplied the first time. There's no way to force
browsers to prompt again. That's one of the drawbacks of using HTTP
authentication.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org