读书人

普普通通html中lt;formgt;标签和struts2中

发布时间: 2012-11-04 10:42:41 作者: rapoo

普通html中<form>标签和struts2中<s:form>标签action属性的不同
普通html中<form>标签和struts2中<s:form>标签action属性值不同到底有什么不同呢?
看个例子:

运用struts2标签<s:form>



运用html标签<form>


说明:
user是struts2配置文件package标签的命名空间,paymentMsg是action的name属性值,searchPaymentMsg是action类中的方法名!

结论:
运用struts2标签的时候注意路径,因为struts2标签<s:form>默认的将struts2配置文件中的<package>标签中的 namespace属性值自动添加了。







读书人网 >CSS

热点推荐