intercept拦截器如何得到action的method名

streemwu 2008-10-23 02:58:40
小弟刚学struts2
在struts.xml文件中配置
<action name="register" class="com.test.action.RegisterAction" method="test">
<interceptor-ref name="myStack">
</interceptor-ref>
<result name="success">/success.jsp</result>
<result name="input">/register2.jsp</result>
</action>

如何用intercept获得method的方法
在public String intercept(ActionInvocation invocation) throws Exception{
}
用invocation.getInvocationContext().getName()可以获得action名为register
不知道用什么方法可以获得方法名为test
...全文
112 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
streemwu 2008-10-23
  • 打赏
  • 举报
回复
已经自己解决
streemwu 2008-10-23
  • 打赏
  • 举报
回复
是不是问题太简单,没人回答

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧