struts-config.xml 的内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<form-beans>
<form-bean name="loginActionForm" type="com.webmanager.businessbasic.loginActionForm" />
</form-beans>
<action-mappings>
<action name="loginActionForm" type="com.webmanager.businessbasic.loginAction" scope="request" path="/loginAction" input="/success.jsp" validate="false">
<forward name="success" path="/ept_main_manage.jsp"/>
<forward name="error" path="/login_error.jsp"/>
</action>
</action-mappings>
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml"/>
</plug-in>
</struts-config>
启动时报错:
Parse Error at line 13 column 55: Element type "plug-in" must be declared.
org.xml.sax.SAXParseException: Element type "plug-in" must be declared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
高手给个招。
------解决方案--------------------
struts版本太低,不支持plug-in标签
你用的struts-config_1_0.dtd
换成struts-config_1_2.dtd
就可以了
------解决方案--------------------
http://struts.apache.org/dtds/struts-config_1_2.dtd