前阵子,写了个Servlet,启动时报:
javax.servlet.ServletException: Unable to load configuration. - [unknown location]
at com.caucho.server.dispatch.FilterManager.createFilter(FilterManager.java:164)
at com.caucho.server.dispatch.FilterManager.init(FilterManager.java:87)
at com.caucho.server.webapp.Application.start(Application.java:1655)
at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670)
at com.caucho.server.host.Host.start(Host.java:420)
at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
at com.caucho.server.host.HostContainer.start(HostContainer.java:504)
at com.caucho.server.resin.ServletServer.start(ServletServer.java:971)
at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
at com.caucho.server.resin.ResinServer.start(ResinServer.java:551)
at com.caucho.server.resin.Resin.init(Resin.java)
at com.caucho.server.resin.Resin.main(Resin.java:625)
Caused by: Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at com.caucho.server.dispatch.FilterManager.createFilter(FilterManager.java:134)
... 20 more
后来才发现,原来是web.xml配置文件有错误,如下:
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>ReportServlet</servlet-name>
<servlet-class>com.eweb.jasperReport.ReportServlet</servlet-class>
</servlet>
其中,description和display-name标签单词之间多了些空格,去掉这两个标签或空格,启动OK。不过也奇怪,我在我本地是好的,为什么到服务器会报上面的错误的,知道的朋友请指点一下!
分享到:
相关推荐
当你遇到“找不到javax.servlet.*”这样的错误时,通常是因为你的项目缺少了这个库,所以需要引入`javax.servlet.jar`来解决问题。 1. **Java Servlet简介** Java Servlet是Java平台上的一个标准,用于扩展服务器...
赠送jar包:javax.servlet-3.0.0.v201112011016.jar; 赠送原API文档:javax.servlet-3.0.0.v201112011016-javadoc.jar; 赠送源代码:javax.servlet-3.0.0.v201112011016-sources.jar; 赠送Maven依赖信息文件:...
赠送jar包:javax.servlet-3.0.0.v201112011016.jar; 赠送原API文档:javax.servlet-3.0.0.v201112011016-javadoc.jar; 赠送源代码:javax.servlet-3.0.0.v201112011016-sources.jar; 赠送Maven依赖信息文件:...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
javax.servlet.ServletException.class javax.servlet.ServletRequest.class javax.servlet.ServletResponse.class javax.servlet.ServletConfig.class javax.servlet.ServletInputStream.class javax.servlet....
赠送jar包:javax.servlet-api-4.0.1.jar; 赠送原API文档:javax.servlet-api-4.0.1-javadoc.jar; 赠送源代码:javax.servlet-api-4.0.1-sources.jar; 赠送Maven依赖信息文件:javax.servlet-api-4.0.1.pom; ...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
赠送jar包:javax.servlet-api-4.0.0.jar; 赠送原API文档:javax.servlet-api-4.0.0-javadoc.jar; 赠送源代码:javax.servlet-api-4.0.0-sources.jar; 赠送Maven依赖信息文件:javax.servlet-api-4.0.0.pom; ...
在Java编程环境中,`javax.servlet.jar` 是一个非常重要的库,它包含了Servlet和JSP(JavaServer Pages)的核心API,是开发Web应用程序的基础组件。这个包由Java EE(Enterprise Edition)标准提供,允许开发者创建...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
javax.servlet-api-3.1.0.jar,处理找不到servlet JAR的问题
javax.servlet JAR包,解决找不到 import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; jar包问题
在Java Web开发中,`javax.servlet.jar`和`javax.servlet.jsp.jar`是两个非常重要的库文件,它们分别提供了Servlet和JSP(JavaServer Pages)的核心API。这两个库是开发基于Java的Web应用程序不可或缺的部分,特别是...
下地址https://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.1.0/ 各个版本都有 javax.servlet-api-3.1.0-sources.jar
赠送jar包:javax.servlet-api-4.0.0.jar; 赠送原API文档:javax.servlet-api-4.0.0-javadoc.jar; 赠送源代码:javax.servlet-api-4.0.0-sources.jar; 赠送Maven依赖信息文件:javax.servlet-api-4.0.0.pom; ...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...
javax.servlet-api-***.jar中文文档.zip,java,javax.servlet-api-***.jar,javax.servlet,javax.servlet-api,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,javax,servlet,api,中文API文档,手册,开发...