马士兵struts2视频教程第十三集

来源:互联网 发布:mac版录音 编辑:程序博客网 时间:2024/04/30 07:26

struts.xml中在action标签下可以用method来指定调用action的方法,但如果method多的话,要写很多,很麻烦

可以用DMI动态调用,不用来写method

struts2默认不允许动态调用,需要在struts.xml中加入

 <constant name="struts.enable.DynamicMethodInvocation" value="true"/>

这样,通过在调用时候加上action名!方法就可以了

0 0
原创粉丝点击