Hi All,

Maybe someone can help me with these problems ???

1. I have a simple validation servlet, which checks if a user is logged in or not.

If the user is not logged in, then I'm using a SSI to tell the user that he/she is not 
logged in and to click a link to the login page.

My problem is that the page I'm trying to protect is also coming up after the ssi html 
code.

How do I stop that happening.

The code I have is as follows:

  "// DOES THE SESSION INDICATE THIS USER IS ALREADY LOGGED IN?
  Object loggedIn = session.getValue("logon.isDone"); // MARKER OBJECT

  if (loggedIn == null) //USER NOT LOGGED IN
  {
    String strLogin = req.getScheme() + "://" + req.getServerName() + ":" + 
req.getServerPort() + "/Login.html";
    out.println("<HTML><HEAD><TITLE>YOU ARE NOT AUTHORISED TO OPEN THIS PAGE</TITLE>");
    out.println("<BODY><CENTER>This page is only available to members of the L10N 
Steering Committee");
    out.println("<P>Members, please click <A HREF=" + 
"http://jordan.ireland:8080/Login.shtml" + "> here to go the Login Screen</A>");
    out.println("</CENTER></BODY></HEAD></HTML>");
  }
  else
  {
    return;
  }"

2. How to invoke a servlet that is not being used with a form. For example, how would 
I invoke (call) the above security servlet, when clicking on a link of a page I want 
to protect.

I have only the following code:

"<FORM ACTION="/servlet/l10nSC.RestrictAccessServlet" METHOD=GET>"

This code does not work ?? Please help, I'm really getting bogged down with this.



Get your FREE Email at http://mailcity.lycos.com
Get your PERSONALIZED START PAGE at http://my.lycos.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

Reply via email to