当前位置: 技术问答>java相关
jsp运行问题,我是菜鸟!
来源: 互联网 发布时间:2017-03-29
本文导语: 我用html文件向jsp文件传表单数据,点击提交,找到jsp文件,却在网页上呈现这样的错误,我该怎么办?是tomcat错了吗? Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile C:jakarta-tomcat-3.3aworkDEFAULTexamplesjsp...
我用html文件向jsp文件传表单数据,点击提交,找到jsp文件,却在网页上呈现这样的错误,我该怎么办?是tomcat错了吗?
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:102: 'catch' without 'try'.
} catch (Exception ex) {
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: 'try' without 'catch' or 'finally'.
}
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: '}' expected.
}
^
3 errors
at org.apache.tomcat.facade.JasperLiaison.javac(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(Unknown Source)
at org.apache.tomcat.facade.JspInterceptor.requestMap(Unknown Source)
at org.apache.tomcat.core.ContextManager.processRequest(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:102: 'catch' without 'try'.
} catch (Exception ex) {
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: 'try' without 'catch' or 'finally'.
}
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: '}' expected.
}
^
3 errors
at org.apache.tomcat.facade.JasperLiaison.javac(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(Unknown Source)
at org.apache.tomcat.facade.JspInterceptor.requestMap(Unknown Source)
at org.apache.tomcat.core.ContextManager.processRequest(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
|
你的{和}可能并不成对,而且好象是}少一个吧!
|
'catch' without 'try'.
} catch (Exception ex) {
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: 'try' without 'catch' or 'finally'.
}
} catch (Exception ex) {
^
C:jakarta-tomcat-3.3aworkDEFAULTexamplesjspregister_1.java:118: 'try' without 'catch' or 'finally'.
}
|
先学学java吧,这样对jsp出现的语法错误才弄得清楚呢。