首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

普普通通html中<form>标签和struts2中<s:form>标签action属性的不同

2012-11-04 
普通html中form标签和struts2中s:form标签action属性的不同普通html中form标签和struts2中s:form

普通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属性值自动添加了。







热点排行