读书人

动态步骤调用的两种方式

发布时间: 2012-09-07 10:38:15 作者: rapoo

动态方法调用的两种方式
动态方法调用的两种方式
1 . 使用!+方法名调用指定方法
假设访问某一个action的url为 http://localhost:8080/hellword/dept/list.action
再假设在action中有个login()方法
要调用login方法的url为 http://localhost:8080/hellword/dept/list!login.action
如果要禁止这种访问方式,在struts.xml中可以配置参数



此方式在api中已经过时,不推介使用这种方式
2 . 使用通配符定义action


要访问login方法的url为 http://localhost:8080/hellword/dept/lis_login.action

读书人网 >软件架构设计

热点推荐