您好,我在启动服务器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,请帮助我解决这个问题
问候
发布于 2017-05-24 21:49:54
正如Alex提到的,第一个问题是由尾随的“-->”引起的。
第二个错误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是由错误的标记库uri声明引起的。
解决方案是这样声明taglib。
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>而不是
<%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>https://stackoverflow.com/questions/12213985
复制相似问题