您在启动服务器tomcat 6.0
SEVERE: Parsing error processing resource path jndi:/localhost/StrutsDataExport/WEB-INF/struts-config.xml
org.xml.sax.SAXParseException: Content is not allowed in trailing section.
这就是我的struts-config.xml
`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="UserForm" type="com.report.UserForm" />
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
<forward name="welcome" path="/Welcome.htm" />
</global-forwards>
<action-mappings>
<action input="/" name="UserForm" path="/userAction" scope="session"
type="com.report.UserAction">
<forward name="success" path="/user.jsp" />
</action>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
</action-mappings>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" />
<message-resources parameter="com/report/ApplicationResource" />
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
<!--
========================= Validator plugin
=================================
-->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>
-->
`
我得到异常说我在struts-config文件中有问题,但我无法找到,这就是为什么我在部署时得到上述异常,我使用的是netbeans IDE,请帮我解决这个问题
此致
答案 0 :(得分:0)
亚历克斯提到第一个问题是由一个尾随的“ - &gt;”
引起的第二个错误org.apache.jasper.JasperException: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application
是由错误的taglib uri声明引起的。
解决方案是将taglib声明为
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>
而不是
<%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>