aspose file tools*
The moose likes Struts and the fly likes remember URL , design question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "remember URL , design question" Watch "remember URL , design question" New topic
Author

remember URL , design question

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi,
I have to work on web application where i need for the user to logon with userid and password for some functions. So it will be some thing like the user clicks submit after entering the data on a screen, but then i want to show a page for the user to login, and if the login is successfull then call the original URL with the data entered from the user and update the database,
but how do i keep track of the URL and data which was originially submitted.
Ashish


A$HI$H
Darryl A. J. Staflund
Ranch Hand

Joined: Oct 06, 2002
Posts: 303
Hi there,
Are you able to pass authentication responsibilities off to your web or application server (using JAAS or some other technology?) If so, then as long as you set up your security realm and modify the web.xml file to work with it, you can let the container worry about how to handle login navigation logic.
Darryl
ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi,
do u have any example or info of doing it, i want to validate user id and password on other as400 system
Ashish
Darryl A. J. Staflund
Ranch Hand

Joined: Oct 06, 2002
Posts: 303
Hi there,
I have a JBoss-specific example but I am not sure that will be helpful. Does your web or app server support JAAS? If so, it's manuals and support forums should provide some examples on how to use it.
Darryl
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi there !

I have the same problem ... In fact, I�m using a servlet filter to check the login state for the user... I assumed every critical Action call , would be under /secure directory and configured a filter to check every /secure request. When it�s necessary , the filter redirects via response.sendRedirect , to a login.jsp .
It would be great if I didn�t loose the request information, including the FormBean when redirecting to the login page... And ... that�s my problem... I cannot preserve request data when proceding to the login ...
I prefer no to use the container managed AA , because it�s proprietary... and , in addition to it, in theory , that�s not a complicated task , managing login... ini ?
Some advice ?
Tks in advance !
F�bio
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: remember URL , design question