访问action的注意事项
2008-07-24 13:07
169 查看
1.确定是否已经在struts.xml中进行action的配置
2.确定在该action中是否有该方法的存在
3.确定包名空间是否正确namespace="/cya"
如下配置文件:
<struts>
<package name="cya" namespace="/cya" extends="struts-default">
<interceptors>
<!-- 定义权限控制拦截器 -->
<interceptor name="authority"
class="com.topsoft.cya.web.interceptor.AuthorizationInterceptor" />
</interceptors>
<!-- 定义全局处理结果 -->
<global-results>
<result name="login">/admin/index.jsp</result>
</global-results>
<!-- 信息操作 -->
<action name="*_Info" method="{1}"
class="com.topsoft.cya.web.action.info.InfoAction">
<interceptor-ref name="defaultStack" />
<interceptor-ref name="authority" />
<result name="ZuiXinGG">/admin/info/ZuiXinGG.jsp</result>
</action>
</package>
</struts>
4.要访问InfoAction中的某一方法时的访问路径应该如下:
cya/save_Info.action
注:save 是InfoAction类中的一个方法
2.确定在该action中是否有该方法的存在
3.确定包名空间是否正确namespace="/cya"
如下配置文件:
<struts>
<package name="cya" namespace="/cya" extends="struts-default">
<interceptors>
<!-- 定义权限控制拦截器 -->
<interceptor name="authority"
class="com.topsoft.cya.web.interceptor.AuthorizationInterceptor" />
</interceptors>
<!-- 定义全局处理结果 -->
<global-results>
<result name="login">/admin/index.jsp</result>
</global-results>
<!-- 信息操作 -->
<action name="*_Info" method="{1}"
class="com.topsoft.cya.web.action.info.InfoAction">
<interceptor-ref name="defaultStack" />
<interceptor-ref name="authority" />
<result name="ZuiXinGG">/admin/info/ZuiXinGG.jsp</result>
</action>
</package>
</struts>
4.要访问InfoAction中的某一方法时的访问路径应该如下:
cya/save_Info.action
注:save 是InfoAction类中的一个方法
相关文章推荐
- Linux下Redis配置远程访问注意事项
- struts 2的action中配置result视图结果加反斜杠的注意事项
- 使用Castle.ActiveRecord的注意事项之四:using (new SessionScope(FlushAction.Never))
- oracle跨数据库跨用户访问注意事项
- [无法访问]myeclipse、eclipse中项目复制后(可能无法访问)注意事项 .
- 使用Castle.ActiveRecord的注意事项四:using (new SessionScope(FlushAction.Never))
- C# 访问SafeNet加密锁注意事项
- oracle 事务简介,锁的概念,java访问数据库注意事项
- .net 2.0 访问Oracle --与Sql Server的差异,注意事项,常见异常
- 网站域名不能访问显示无法连接:注意几个事项
- 使用fiddler监控android模拟器网络访问情况的注意事项
- myeclipse、eclipse中项目复制后(可能无法访问)注意事项
- windows7 访问xp的若干注意事项
- myeclipse中的web项目导入到eclipse中注意事项,项目部署到tomcat后无法访问jsp文件
- myeclipse、eclipse中项目复制后(可能无法访问)注意事项 .
- Java之访问权限控制符以及结合继承体系引发的注意事项
- Android 网络访问 线程注意事项
- 升级Xcode8访问相机 麦克风注意事项
- .net 2.0 访问Oracle --与Sql Server的差异,注意事项,常见异常
- 配置调用action的步骤以及注意事项