One workable solution would be to add a variable in the session after the
user has successfully logged in such as :
session.putAttribute("logged","true");
Then check for the value of logged in every file that you want your user to
be logged before he can view, in every jsp page. If he isn't logged in just
redirect the user to the login page.
If you are using the struts framework you could add the checking logic to
the controller servlet instead of writing it in every jsp file as well as
the logic for the controller servlet to decide which pages can be viewed
without logging on and which can't.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com

----- Original Message -----
From: kal inuganti <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 01, 2000 11:18 PM
Subject: LOGIN VALIDATION


> Hello everybody
>
> I am trying to develop a simple web-site which needs a valid login. I have
> some files on the same server and in the same folder. I want to prevent
any
> non-users from looking at this content. Can my initial login page take
care of
> the security of my entire directory.
>
> Here is an example of what I am trying to say: I have a login page which
posts
> a request to a servlet that checks if the user information is correct and
then
> loads an html page. Then there are links to a few other files from this
HTML
> file. Right now if a user types the links directly he can see all of them.
I
> need some mechanism to redirect him to the login page if he tries to
access
> these links.
>
> I hope my question is understandable. I am not sure either, if jsp could
offer
> a solution. I am sorry if this is the wrong list that I mailed my question
> to.
>
> Thanks,
> Kalyan
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to