How to get data from JSP to Action class by id instead of property in Struts 2?

余生长醉 提交于 2019-12-02 03:56:36
<s:textfield name="campaignName" size="50" maxlength="50" />    

or

<input type="text" name="campaignName" size="50" maxlength="50" />

The name need to be matched with the field name

The simple usage of that textbox is to use s:textfield tag.

<s:textfield name="campaignName" size="50" maxlength="50" />

You can use <s:textfield name="campaignName" size="50" maxlength="50" /> and add struts tag to your jsp ( at the top ):

<%@ taglib prefix="s" uri="/struts-tags"%>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!