Struts.xml配置文件没有提示
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- Overwrite Convention -->
<package name="xxx" extends="struts-default">
<action name="hello" class="com.appp.action.HelloAction" method="execute">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>
解决a:
1. 找到struts-2.0.dtd文件, 拷贝到某个目录:d:/dtd /.. (不要用中文目录)
2. 让MyEclipse关联到上面dtd文件,
→windows →preferences → 搜索xml catalog
配置:
Location: 上面配置的dtd目录
Key: -//Apache Software Foundation//DTD Struts Configuration 2.0//EN 【在配置文件xml里有!】
解决b:
或者,
让机器连接互联网,工具会自动下载dtd文件,缓存到MyEclipse中!