wood burning stoves 2.0*
The moose likes Servlets and the fly likes include files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "include files" Watch "include files" New topic
Author

include files

Cynthia Yao
Ranch Hand

Joined: Nov 06, 2000
Posts: 92
Hello.
I am working on a project, some section only allowed registered user to access. If the uses are not log in when they try to access those section, they will send to login page.
What I am think to do is do a include file which will check for session and cookie to determine the user, and redirect the use to login page if both information is not present.
However, I need to put the original request url into session valuable, so after the user login, they will get the same page. How could I refer to the url which include that test file??
Thanks. Did I explain it clearly?
Shankar Ganesh
Ranch Hand

Joined: Oct 01, 2000
Posts: 34
I too have a similar need -- I need to add a link to a page, (normally accessible after a login) in a mail and the user should be able to access the page if he is currently logged in. Else he should first be directed to the login screen and upon successful login, should be lead to the concerned page. How can this be achieved?
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
Check out this link: http://www.javaranch.com/ubb/Forum7/HTML/001290.html
Brian
 
 
subject: include files
 
Similar Threads
HttpServletRequest equivalent on html page
Conditional forwarding in JSF
how to get the Original URL in form based authentication
Can we have multiple login forms in spring security?
Invalid session