i don't know the answer for first question..
but i can answer 2nd...
If you are concern security wise then as soon as you get password
encrypt it ( by Base64 algo) and store encrypted pwd in DB.
And in b.jsp get pwd from DB and decrypt it and use it...
If you don't want to store it in DB then you can always store it
in session as you did for userName(if you not much concern about
security)...
Nishit
-----Original Message-----
From: Roland Dong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 5:00 AM
To: [EMAIL PROTECTED]
Subject: Question on Redirect and Parameter passing to a jsp page
I have a.html calls login.java(servlet) to check user name and password. If
user/password is true, login.java will redirect to b.jsp. My question is
Question 1: If a.html is a frame, how can I open a new browser window for
b.jsp?
I have tried this:
res.sendRedirect("\"http://localhost:8080/jsp/b.jsp\" TARGET==\"_top\""); It
did not work!
Question 2: In login.java I set the user name to the session object when
login is successful:
HttpSession session = req.getSession(true);
session.setAttribute("logon.isDone", Name);
That way, I can use <%= session.getValue("logon.isDone")%> to get user name
in b.jsp. But the question is how do I get password passed to b.jsp?
Thanks in advance
Roland
===========================================================================
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