如何从jsp调用java函数
我已经将jsp代码编写为如何从jsp调用java函数,java,function,jsp,call,Java,Function,Jsp,Call,我已经将jsp代码编写为 <form:form method="post" action="/getnextinvoice"> <table> <tr> <td> </td> <td><input type="submit" onclick="getnextinvoice()" value="New" /></td> &
<form:form method="post" action="/getnextinvoice">
<table>
<tr>
<td> </td>
<td><input type="submit" onclick="getnextinvoice()" value="New" /></td>
<td> </td>
<td><input type="submit" value="Submit" /></td>
</tr>
</table>
</form:form>
因此,请帮助我,并提前表示感谢。请看本教程,了解视图如何映射到操作调用
@RequestMapping("/getnextinvoice")
public String getnextinvoice(@ModelAttribute usercreation user) {
String invoice = iDaoImpl.getInvoiceNo();
System.out.println(invoice);
return "redirect:/Invoice";
}