struts2配置action访问显示404 5
看视频上可以省略一些action的属性,但是我省略了过后显示网页找不到配置文件如下:<?xmlversion="1.0"encoding="UTF-8"?><!DOCTY...
看视频上可以省略一些action的属性,但是我省略了过后显示网页找不到
配置文件如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="itcast" namespace="/test" extends="struts-default">
<action name="helloworld" class="cn.itcast.HelloWorldAction"
method="execute">
<result name="success">/WEB-INF/page/hello.jsp</result>
</action>
<action name="add">
<result>/WEB-INF/page/employeeAdd.jsp</result>
</action>
</package>
</struts> 展开
配置文件如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="itcast" namespace="/test" extends="struts-default">
<action name="helloworld" class="cn.itcast.HelloWorldAction"
method="execute">
<result name="success">/WEB-INF/page/hello.jsp</result>
</action>
<action name="add">
<result>/WEB-INF/page/employeeAdd.jsp</result>
</action>
</package>
</struts> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询