在Tomcat服务器上部署我的GWT应用程序
我想在本地Tomcat服务器中设置具有许多依赖项的GWT应用程序(2.0.0版)。我开始编写用于部署和打包应用程序的maven2构建脚本。在Tomcat服务器上部署我的GWT应用程序
我写了一个maven2脚本,在我的眼睛里工作得很好,但是当我尝试在我的tomcat上部署即将发生的战争时出现错误。
2011-04-21 18:14:13,951 ERROR org.apache.catalina.startup.ContextConfig - Parse error in application web.xml file at jndi:/localhost/quickfinder.ui-1.0-SNAPSHOT/WEB-INF/web.xml org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
的web.xml文件是如下所示: here和我maven2的脚本是这样的: here
编译和链接和其他的东西,我的“部署”后目录(命名战争)看起来像:
|-AnswerPanel.css
在WEB-INF目录中的lib下,所有需要的库都可用。该项目有一些RPC调用等。
|-common.css
|-DomainListPanel.css
|-glossary.css
|-glossary.html
|-images
|-META-INF
|-MulitpleChoiceEditPanel.css
|-MultipleChoiceDisclosurePanel.css
|-NaviPanel.css
|-QuestionnairePanel.css
|-quickfinder
|-Quickfinder.css
|-Quickfinder.html
|-quickfinderportlet
|-QuickfinderPortlet.html
|-styles-css2.css
|-styles-css3.css
|-WEB-INF
|--lib
使用mvn compile war:war
.war文件和名为#artifactId#-SNAPSHOT-1.00的文件夹在/ target下创建。
我不知道如何处理这个错误形式的tomcat,或者是否在pom.xml中存在逻辑错误。
BR, mybecks
你的web.xml中没有很好地形成:修复一节
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" [
<!ENTITY GlossaryWebXml SYSTEM "glossary.web.xml"> -->
]>
哦,我已经纠正它。但重新编译后,仍然没有改变,部署我仍然有同样的错误。 – mybecks 2011-04-21 18:20:49
你做了一个干净的构建?并检查是否打包/部署了正确的web.xml – fmucar 2011-04-21 18:23:25
是的,我完成了'mvn clean'并检查了输出目录中的web.xml文件,它们都具有相同的内容。 – mybecks 2011-04-22 09:24:11