Glassfish项目似乎无法在Tomcat服务器上运行

时间:2014-10-27 08:14:18

标签: java apache jsp tomcat glassfish

我在部署方面经验不足。请帮忙。

它显示以下错误:

HTTP Status 500 - Unable to compile class for JSP:
type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.

例外:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [15] in the generated java file: [C:\Users\DFMC\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\work\Catalina\localhost\Majha_Capitals\org\apache\jsp\AdminHome_jsp.java]
The type AdminHome_jsp must implement the inherited abstract method HttpJspBase.getIncludes()

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:467)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:380)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:342)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.3 logs.

Apache Tomcat / 8.0.3

2 个答案:

答案 0 :(得分:1)

Glassfish是一个完整的Java EE服务器,支持servlet,JSP,EJB,JMS和许多其他东西。

Tomcat仅支持Java servlet和JSP的部署。如果您的Web应用程序需要任何其他Java EE服务,则不太可能在Tomcat上运行。

答案 1 :(得分:0)

如何将java文件放在服务器上?编译它并改为放置文件。 还要检查是否将AdminHome_jsp.java放在正确的位置。