如何从JSP到JavaBean获取按钮值

时间:2018-11-15 20:46:44

标签: java forms jsp javabeans

<form action = '' method = 'post'>
    Enter two number: <br/>
    <input type = "text" name = "firstNumber" value = "<jsp:setProperty name = 'data' property = 'firstNumber'/>"><br/>
    <input type = 'text' name = 'secondNumber' value = "<jsp:setProperty name = 'data' property = 'secondNumber'/>"><br/>
    <input type = 'submit' value = 'Add' name = 'button'>
    <input type = 'submit' value = 'reset' name = 'button'>
</form>
First Number:
<jsp:getProperty property="firstNumber" name="data"/><br/>
Second Number: 
<jsp:getProperty property="secondNumber" name="data"/><br/>
<%=data.addtion() %> 

如何在bean中查找单击了哪个提交的..?
谢谢..

0 个答案:

没有答案