JaspserException

Hi,
The below code worked before but I keep getting this error message today when starting up:
org.apache.jasper.JasperException: Unable to compile class for JSPC:\tomcat40\bin\..\work\localhost\danyu\jsp\general\login_jsp.java:130: 'try' without 'catch' or 'finally'.
out.write("\r\n\r\n\r\n\r\n");
^
C:\tomcat40\bin\..\work\localhost\danyu\jsp\general\login_jsp.java:134: Type expected.
} catch (Throwable t) {
<%
/* Date Author Descriptionn
* This is a utility page, when logged in, a boolean session variable is
* set to true.
* another session variable is used to count the number of trials, if trial
* is more than three times, user is redirected to a registration page.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection=java.sql.DriverManager.getConnection("jdbc:odbc:DSNDanyu","devpn2","devpn2");
String sqlBonus="select * from pn_user_login";
java.sql.Statement stmt= connection.createStatement();
java.sql.ResultSet resultset=stmt.executeQuery(sqlBonus);
String strUser="";
String strPass="";
String txtUser=request.getParameter("txtUser");
String txtPass=request.getParameter("txtPass");
boolean isLogged = false;
%>
Connected to database.<p>
<%
while (resultset.next()){
strUser=resultset.getString("user_name");
strPass=resultset.getString("user_pass");
%>
<%
//if user found
     if (strUser.equals(txtUser) && strPass.equals(txtPass))
     isLogged = true;
%>
<br><%//=resultset.getInt("user_type_id")%>
<%
//if (resultset.getInt("user_type_id")==1)
//out.print("Admin");
%>
<%}
%>

I get this error when I forget braces at the ends of loops, if statements, etc. Check to make sure all your parens line up, all your curly braces are in the right place, and all your semicolons are there. Then, the problem will go away.
-David

Similar Messages

Maybe you are looking for

  • Mac Mini '09 incompatible with older flat panel TV's?

    I just bought a Mac Mini '09 and tried to hook it up to an old (2002) Sony Plasma 32" TV. I am using the mini-DVI to S-video/composite video adapter. I get a "no signal" response from the TV, indicating that the Mini and the TV are not communicating.

  • Problems with enumerated type and DataSocket

    I am publishing an enumerated type variable using DataSocket write and I am having problems subscribing to this with other clients on the network. I can get the program to work ok if I replace the enumerated type with a straight numeric or a Text Rin

  • Hiding refresh button in Webi Report

    Hello experts, I would like to hide 'refresh' button on webi report in XI 3.1. One way to do this is using rights which I don't intend to use at this stage. Do we have any other way out to do this task? Many thanks in advance Regards, John

  • Compiling Widgets in FlexViewer

    I have downloaded some widgets and am viewing them in FlexViewer. Does anyone know how to compile the widgets in Flash Builder and where does the compiled output go ? Thanks

  • I just purchased adobe 13 updrade from my 12. How do i install this?

    How do I install adobe 13? I just purchased it from you and have a serial number.