Question: Type Exception Report Message Unable to compile class for JSP: Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception
Type Exception Report
Message Unable to compile class for JSP:
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: in the jsp file: formjsp
void is an invalid type for the variable saveFormData
: String password pass;
:
: Function to save form data to the database
: void saveFormDataString name, int age throws SQLException
: Connection connection DriverManager.getConnectionurl user, password;
: PreparedStatement preparedStatement connection.prepareStatementINSERT INTO yourtable name age VALUES ;
: preparedStatement.setString name;
An error occurred at line: in the jsp file: formjsp
Syntax error on token ; expected
: String password pass;
:
: Function to save form data to the database
: void saveFormDataString name, int age throws SQLException
: Connection connection DriverManager.getConnectionurl user, password;
: PreparedStatement preparedStatement connection.prepareStatementINSERT INTO yourtable name age VALUES ;
: preparedStatement.setString name;
An error occurred at line: in the jsp file: formjsp
Syntax error on token ; expected
: String password pass;
:
: Function to save form data to the database
: void saveFormDataString name, int age throws SQLException
: Connection connection DriverManager.getConnectionurl user, password;
: PreparedStatement preparedStatement connection.prepareStatementINSERT INTO yourtable name age VALUES ;
: preparedStatement.setString name;
An error occurred at line: in the jsp file: formjsp
Syntax error, insert ; to complete LocalVariableDeclarationStatement
: String password pass;
:
: Function to save form data to the database
: void saveFormDataString name, int age throws SQLException
: Connection connection DriverManager.getConnectionurl user, password;
: PreparedStatement preparedStatement connection.prepareStatementINSERT INTO yourtable name age VALUES ;
: preparedStatement.setString name;
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacErrorDefaultErrorHandlerjava:
org.apache.jasper.compiler.ErrorDispatcher.javacErrorErrorDispatcherjava:
org.apache.jasper.compiler.JDTCompiler.generateClassJDTCompilerjava:
org.apache.jasper.compiler.Compiler.compileCompilerjava:
org.apache.jasper.compiler.Compiler.compileCompilerjava:
org.apache.jasper.compiler.Compiler.compileCompilerjava:
org.apache.jasper.JspCompilationContext.compileJspCompilationContextjava:
org.apache.jasper.servlet.JspServletWrapper.serviceJspServletWrapperjava:
org.apache.jasper.servlet.JspServlet.serviceJspFileJspServletjava:
org.apache.jasper.servlet.JspServlet.serviceJspServletjava:
javax.servlet.httpHttpServlet.serviceHttpServletjava:
org.apache.tomcat.websocket.server.WsFilter.doFilterWsFilterjava:
Note The full stack trace of the root cause is available in the server logs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
