【问题标题】:Deployment error with War.-File in tomcatWar.-File 在 tomcat 中的部署错误
【发布时间】:2017-07-18 12:11:59
【问题描述】:

这是我第一次使用 tomcat 和 war-Files,所以请原谅我在这种情况下的愚蠢,我认为对你们来说这没什么。

当我想用 xampp 启动 tomcat 时出现以下错误:

18-Jul-2017 10:39:27.423 SCHWERWIEGEND [localhost-startStop-1] 
org.apache.catalina.core.ContainerBase.addChildInternal 
ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component
[/Tuev_Test]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/Tuev_Test] Context cannot be started.
at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:199)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 10 more

我认为这是 web.xml 中的内容,但我不知道是什么,因为在 eclipse 中一切正常。

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>Customer Support Application</display-name>
<jsp-config>
<jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <url-pattern>*.jspf</url-pattern>
    <scripting-invalid>false</scripting-invalid>
    <include-prelude>/WEB-INF/jsp/base.jspf</include-prelude>
    <trim-directive-whitespaces>true</trim-directive-whitespaces>
    <default-content-type>text/html</default-content-type>
</jsp-property-group>
</jsp-config>
<session-config>
<session-timeout>30</session-timeout>
    <cookie-config>
        <secure>true</secure>
    </cookie-config>
    <tracking-mode>COOKIE</tracking-mode>
</session-config>
<distributable/>
<security-constraint>
<web-resource-collection>
    <web-resource-name>Restricted URLs</web-resource-name>
    <url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>
<servlet>
    <servlet-name>Startseite</servlet-name>
    <servlet-class>com.Startseite</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>Startseite</servlet-name>
    <url-pattern>/Startseite</url-pattern>
</servlet-mapping>

我的tomcat-webapps文件夹里面的文件夹结构如下:

Tuev_Test
--css
--fonts
--Images
--js
--META-INF
--SQL
--WEB-INF
----classes
------com
--------Startseite
----jsp
----lib
----web.xml

或者你们认为这是别的什么?

希望你能帮忙,

如果您需要更多信息,我很乐意提供给您

【问题讨论】:

    标签: tomcat web deployment war


    【解决方案1】:

    我不知道为什么,但是我用标准的 Tomcat context.xml 替换了我的项目 context.xml,现在它可以正常工作了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-03
      • 2015-05-29
      • 1970-01-01
      • 2017-07-07
      • 1970-01-01
      • 2011-05-15
      相关资源
      最近更新 更多