Alex Khordos wrote:
>
> Hello everyone
>
> Maybe someone will be able to help me. I have a servlet which asks for a
> user name and password and then redirects the person to the proper page.
> My question is how do I solve the bookmarking problem. If a person
> bookmarks test.htm, then he is never asked for a password. It only asks
> for a password if a person goes through login.htm. So how do I solve this
> problem. Any ideas?
You have a number of options depending on your environment
-If your server supports ACL you may create an ACL for the
html
-Move the test.htm out of the public docs directory and have the
servlet print it out directly has part of the response (instead of
having a separate response this could be part of the servlet)
-If you have the latest and greates server (JSDK2.1/JSP.92) then (if
you don't want to use ACL and would prefer a more application specific
authentication) you may use sessions and JSP. If someone accesses
test.jsp it checks for a valid session. If no session the user is
forwarded (as apposed to redirected) to login.jsp. login.jsp checks
name/password against account DB and if successful creates session and
forwards to test.jsp.
Gabriel Wong
http://www.ezwebtools.com
-------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html