I got the solution sendRedirect take a string.

>From: sufi malak <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: sendRedirect ??
>Date: Tue, 27 Feb 2001 16:48:30 -0000
>
>I got this error :
>A Servlet Exception Has Occurred
>org.apache.jasper.JasperException: Unable to compile class for
>JSP..\work\localhost\ultra2\_0002flogin_00032_0002ejsplogin2_jsp_1.java:89:
>Undefined variable or class name: Insert
>                response.sendRedirect(Insert.jsp);
>                                      ^
>..\work\localhost\ultra2\_0002flogin_00032_0002ejsplogin2_jsp_1.java:92:
>Undefined variable or class name: login2
>                response.sendRedirect(login2.jsp);
>                                      ^
>2 errors
>
>
>This is my code for login2.jsp :
><%@ page import="Employee"%>
><jsp:useBean id="employee" class="Employee" scope="request"/>
><%
>String  user = (String)request.getParameter("username");
>String  pass = (String)request.getParameter("password");
>// check the session first, if the user is in the session
>sendRedirect(Insert.jsp) directly
>if (user != null && pass != null)
>{
>if (employee.login(user, pass)){
>System.out.println("user exists");
>response.sendRedirect(Insert.jsp);
>}
>else
>{
>System.out.println("User does not exist");
>response.sendRedirect(login2.jsp);
>}
>}
>%>
>
>Thanks
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>===========================================================================
>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

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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