首先是选择tomcat时遇到的问题:选择tomcat路径时出错。原因是在学习Struts2前要先安装tomcat,但是我电脑之前没有安装tomcat。
然后工程部署到tomcat时出错,
There is no Action mapped for namespace [/] and action name [HelloWorld] ass
Tomcat 404 error: The origin server did not find a current representation for the target resource or
解决方法是struts2.xml 应该是放在src目录下的,但是开始的时候放到哦别的地方了,移动到src目录即可。
还有就是struts2.xml里<result name="success">/result.jsp</result>标签改为<result >/result.jsp</result>,去掉name属性