<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<P>try this It will work.
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((a == 0)
&amp;&amp; (b == 0)) {
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
resp.sendRedirect("http://host//examples/servlet/InquiryFrame.htm);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
resp.sendRedirect(<A
href="http://host//examples/servlet/errorlogin.html";>http://host//examples/servlet/errorlogin.html</A>);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<P>&nbsp; <B><I>raju punith
&lt;[EMAIL PROTECTED]&gt;</I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT:
5px; BORDER-LEFT: #1010ff 2px solid">Hello
everyone,<BR><BR>I have a login.html which accepts
username &amp; password<BR>,if the user enters valid
username &amp; password i want<BR>the servlet to bring
up InquiryFrame.html. Iam using<BR>Tomcat 3.3 as
servlet container &amp; web . any help would<BR>be
much
appreciated.<BR><BR><BR>Thanks<BR>Raju<BR><BR><BR>login.html<BR><BR><BR><BR><BR><BR><BR><FONT
face=Verdana>Please login here</FONT><BR>
<FORM action=/examples/servlet/login
method=post><BR><BR><FONT face=Verdana>
<P>Login</FONT><BR><BR><INPUT size=12
name=username><BR><BR><BR><BR><BR><FONT
face=Verdana>Password</FONT><BR><BR><INPUT
type=password size=12
name=password><BR><BR></P><BR><BR><INPUT type=submit
value=Submit name=Login><BR><BR>&nbsp;
<P></P><BR><BR></FORM><BR><BR><BR><BR>login.java<BR><BR>server.import
java.io.*;<BR>import javax.servlet.*;<BR>import
javax.servlet.http.*;<BR><BR>public class login
extends HttpServlet {<BR>public void
doGet(HttpServletRequest
request,<BR>HttpServletResponse response)<BR>throws
ServletException, IOException
{<BR><BR><BR>response.setContentType("text/html");<BR>PrintWriter
out = response.getWriter();<BR><BR>String userName
=<BR>request.getParameter("username");<BR>String
password
=<BR>request.getParameter("password");<BR><BR>int a =
userName.compareTo("xxx");<BR>int b =
password.compareTo("yyy);<BR><BR>if ((a == 0)
&amp;&amp; (b == 0)) {<BR>// here i need to
call<BR>InquiryFrame.html which is
in<BR>/examples/servlet/InquiryFrame.html<BR><BR>out.println("
can access!!!");<BR>} else
{out.println("Invalid<BR>username/password
");}<BR><BR>}<BR><BR>public void
doPost(HttpServletRequest
request,<BR>HttpServletResponse response)<BR>throws
IOException, ServletException<BR>{<BR>doGet(request,
response);<BR>}<BR><BR>}<BR><BR><BR><BR>__________________________________________________<BR>Do
You Yahoo!?<BR>Yahoo! Tax Center - online filing with
TurboTax<BR>http://taxes.yahoo.com/<BR><BR>___________________________________________________________________________<BR>To
unsubscribe, send email to [EMAIL PROTECTED] and
include in the body<BR>of the message "signoff
SERVLET-INTEREST".<BR><BR>Archives:
http://archives.java.sun.com/archives/servlet-interest.html<BR>Resources:
http://java.sun.com/products/servlet/external-resources.html<BR>LISTSERV
Help: http://www.lsoft.com/manuals/user/user.html<BR></BLOCKQUOTE>

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.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