You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dh...@lexmark.com on 2001/07/11 19:18:47 UTC

Returning to called page after loggin on...


Hi everyone.

I am placing a tag on each page to check the user is logged on, which, as
expected, takes them to a login page if they are not.

However, I want to then return them to the page they tried to access before
being asked to log on.  Do I need to save the name of the page somewhere, or is
there an easier way?

Cheers,

Dave




RE: Returning to called page after loggin on...

Posted by Abraham Kang <ab...@infogain.com>.
Dave,

That is exactly what you would need to do in the tag.  You will need to
store the location under some session key and retrieve this after loggin in.

However.

The web app security mechanism handles protecting your resources, sending
unauthenticated users to the login page, authentication, and redirecting to
the desired page after successful login.  All you have to do is configure
the web.xml.

The only major issue is setting up your app server to use your
authentication mechanism as its security realm.

--Abraham

> -----Original Message-----
> From: dhay@lexmark.com [mailto:dhay@lexmark.com]
> Sent: Wednesday, July 11, 2001 10:19 AM
> To: struts-user@jakarta.apache.org; danez@ematic.com
> Subject: Returning to called page after loggin on...
>
>
>
>
> Hi everyone.
>
> I am placing a tag on each page to check the user is logged on, which, as
> expected, takes them to a login page if they are not.
>
> However, I want to then return them to the page they tried to
> access before
> being asked to log on.  Do I need to save the name of the page
> somewhere, or is
> there an easier way?
>
> Cheers,
>
> Dave
>
>
>
>


Re: Returning to called page after loggin on...

Posted by Ted Husted <hu...@apache.org>.
Craig's slides for BOF #1291, "Approaches to User Authentication and
Access Control in Web Applications" is  available for download at 

< http://husted.com/about/struts/resources.htm#new >

True to the school, it's in Open Office format <
http://www.openoffice.org/ >.


"Craig R. McClanahan" wrote:
> I also did a BOF at JavaOne that covered container-managed security at a
> pretty high level, but is useful to read after you've read the servlet
> spec chapter on security.  You can write to me privately if you want a
> copy.

Re[2]: Returning to called page after loggin on...

Posted by Anthony Xin Chen <xi...@tbcommerce.com>.
Hello Craig,

Monday, July 30, 2001, 8:39:31 PM, you wrote:

CRM> I  also  did  a  BOF  at  JavaOne  that covered container-managed
CRM> security  at  a  pretty  high  level, but is useful to read after
CRM> you've  read  the servlet spec chapter on security. You can write
CRM> to me privately if you want a copy.

CRM> Craig McClanahan

Could you please also send me a copy. Much appreciated!

-- 
Best regards,
 Anthony



Re: Returning to called page after loggin on...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 11 Jul 2001 dhay@lexmark.com wrote:

> 
> 
> Hi everyone.
> 
> I am placing a tag on each page to check the user is logged on, which, as
> expected, takes them to a login page if they are not.
> 
> However, I want to then return them to the page they tried to access before
> being asked to log on.  Do I need to save the name of the page somewhere, or is
> there an easier way?
> 

It sounds like you are duplicating what container-managed security in a
servlet container will do for you.  Refer to the Servlet Spec for
definitions <http://java.sun.com/products/servlet/download.html>.

I also did a BOF at JavaOne that covered container-managed security at a
pretty high level, but is useful to read after you've read the servlet
spec chapter on security.  You can write to me privately if you want a
copy.


> Cheers,
> 
> Dave
> 
> 
> 
> 

Craig McClanahan