scripter73
Programmer
Hi,
Can't seem to find out why my compiler keeps saying I need to add a ';' in my .JSP
Here's the error message:
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\pos-webapp\org\apache\jsp\loginProcess_jsp.java:110: ';' expected
^
1 error
Here's the code:
%@ page import="java.io.*,java.util.*
javax.servlet.*,javax.servlet.http.*"%>
<%
//Prep to setup session variables
HttpSession s = request.getSession();
......
String incorrectMsg;
if (errCode == 20100){
incorrectMsg = "Userid or Password is incorrect. Please re-enter using a valid Userid and Password.";
s.setAttribute("loginMsg",incorrectMsg);
response.sendRedirect("loginInvalid.jsp");
}
else if (errCode == 0){
incorrectMsg = "We didn't seem to find a record for you in our Database.";
s.setAttribute("loginMsg",incorrectMsg);
}
else{
response.sendRedirect("index.html");
}
The only thing I've changed is the name of the session variable. It was something like "sessLoginMessage" and I changed it to "loginMsg".
At first, I had defined String incorrectMsg inside of each section of the if loop, but then I got the same error message, and took it out.
Any help you can provide is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.
Can't seem to find out why my compiler keeps saying I need to add a ';' in my .JSP
Here's the error message:
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\pos-webapp\org\apache\jsp\loginProcess_jsp.java:110: ';' expected
^
1 error
Here's the code:
%@ page import="java.io.*,java.util.*
javax.servlet.*,javax.servlet.http.*"%>
<%
//Prep to setup session variables
HttpSession s = request.getSession();
......
String incorrectMsg;
if (errCode == 20100){
incorrectMsg = "Userid or Password is incorrect. Please re-enter using a valid Userid and Password.";
s.setAttribute("loginMsg",incorrectMsg);
response.sendRedirect("loginInvalid.jsp");
}
else if (errCode == 0){
incorrectMsg = "We didn't seem to find a record for you in our Database.";
s.setAttribute("loginMsg",incorrectMsg);
}
else{
response.sendRedirect("index.html");
}
The only thing I've changed is the name of the session variable. It was something like "sessLoginMessage" and I changed it to "loginMsg".
At first, I had defined String incorrectMsg inside of each section of the if loop, but then I got the same error message, and took it out.
Any help you can provide is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.