You are talking about something that should not your job and normally it is
other people's job. It seems to me you need simple authentication. It is Web
server and Browser and your job. Let me take Apache Web server as an
example:

In server configuration file you tell server which page is protected page
which means user/pass needed and create a encoded password file and tell
server where to check it. When client use browser hit your that page your
server will send a authentication requirement to client and browser will pop
up a window to ask client to identify themselves. Browser will send
user/pass back to server and server will check your file if any match your
server will send the page to client otherwise the server will send
authentication failure web page to user.

If you want do these job by yourself you can create a error page and config
web server. When authentication is failed. In JSP issue command
sendErrorPage() or something I can remember clearly. Check JSP document.


-----Original Message-----
From: kuttappan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 7:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Throwing Exceptions


Is there any particular reason why you don't use Beans or XML. It can really
make life simple.

Rohit.
----- Original Message -----
From: "Ashton, David" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, 29 March, 2001 9:57 PM
Subject: Throwing Exceptions


> Hello,
>
> Wonder if any of you can help me, I am trying to write using JSP (no beans
> or anything at this stage) which authenticates a user using the
> getRemoteUser() method. Not difficult to do this I know, however being new
> to JSP I am wondering if and how I can throw an exception if what is
> returned from getRemoteUser() does not meet my criteria, if it does meet
my
> criteria I need to call another method which does further validation
before
> storing the results.
>
> I have been looking at this for about three hours and seem to just go
round
> in circles... can anyone point me in the right direction or highlight some
> code snippets they have used in the past to do this, I will endeavour to
> return the favour in future!
>
> Cheers
>
> Dave
>
>
===========================================================================
> 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
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07/03/2001

===========================================================================
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