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