What is the solution of this problem

Hello,
I get the following error when the search.jsp is called.
Error: 500
Location: /examples/jsp/pro/search.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jakarta-tomcat-3.2.4\jakarta-tomcat-3.2.4\work\localhost_8080%2Fexamples\_0002fjsp_0002fpro_0002fsearch_0002ejspsearch_jsp_82.java:111: 'catch' without 'try'.
} catch (Exception ex) {
^
C:\jakarta-tomcat-3.2.4\jakarta-tomcat-3.2.4\work\localhost_8080%2Fexamples\_0002fjsp_0002fpro_0002fsearch_0002ejspsearch_jsp_82.java:120: 'try' without 'catch' or 'finally'.
^
C:\jakarta-tomcat-3.2.4\jakarta-tomcat-3.2.4\work\localhost_8080%2Fexamples\_0002fjsp_0002fpro_0002fsearch_0002ejspsearch_jsp_82.java:120: '}' expected.
^
3 errors, 1 warning
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
     at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
     at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
     at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
     at org.apache.tomcat.core.Handler.service(Handler.java:287)
     at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
     at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
     at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
     at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
     at java.lang.Thread.run(Thread.java:536)
What is the reason.. the file does not contain any catch statement which has ex as the Exception Object.

well this is the code of search.jsp
<html>
<head>
<title> SEARCH RESULT</title>
</head>
<%@ page
import="javax.servlet.*,java.io.*,java.sql.Connection,java.sql.DriverManager,java.sql.SQLException,java.sql.Statement,
java.sql.ResultSet,java.util.*,java.io.*,oracle.jdbc.pool.OracleDataSource"%>
<%
               try      
               Class.forName("oracle.jdbc.OracleDriver");     
               DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
               Connection con=DriverManager.getConnection("jdbc:oracle:thin:@xyz-
2bb7f1c7083:1521:XE","system","tiger");     
               Statement st=con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
               } // end of try
     catch (SQLException se) { System.out.println(se); }
     catch(Exception exc) { System.out.println("exception from search.jsp"+exc); }
%>
<body>
WELCOME TO SEARCH
<form>
<input type="text" name="choice">
<select name="menu">
<option value="0" selected>(please select :)</option>
<option value="1" >Search by faculty
</option>
<option value="2" >Search by department
<%
System.out.println("menu"+request.getParameter("menu"));
System.out.println("choice"+request.getParameter("choice"));
     if (request.getParameter("choice").equals("Computer"))
     String q=("select * from empldminoyee,allowances,deductions,SALARY where employee.DEPARTMENT='CS' ");
     ResultSet rs=st.executeQuery(q);
     rs.first();
     HttpSession hs=request.getSession(true);
     response.setContentType("text/html");
     PrintWriter pw=response.getWriter();
     pw.print("<B>");
     hs.setAttribute("res",rs);     
     response.sendRedirect("http://localhost:7080/examples/jsp/pro/sfwd.jsp");     
%></option>
</select>
<input type="submit" value="submit">
</form>
</body>
</html>
--------------------------------------------------------

Similar Messages

Maybe you are looking for