Jsp 如何将这个h:form转换为xhtml格式 电邮:
对这样的事情:Jsp 如何将这个h:form转换为xhtml格式 电邮:,jsp,xhtml,jsf,Jsp,Xhtml,Jsf,对这样的事情: <h:form id="login"> Email: <h:inputText id="email" value="#{user.email}"/> <h:commandLink id="signupLink" value="signup" action="#{userManager.validate}"/> </h:form> 电邮: 让操作指向servlet URL。然后在servlet的doGet()或d
<h:form id="login">
Email: <h:inputText id="email" value="#{user.email}"/>
<h:commandLink id="signupLink" value="signup" action="#{userManager.validate}"/>
</h:form>
电邮:
让操作
指向servlet URL。然后在servlet的doGet()
或doPost()
中编写代码,以收集请求参数并存储在模型对象中并执行业务代码。在视图中,您可以使用EL中的${param.name}
重新显示请求参数。基本上与JSF在引擎盖下所做的相同
<form action="#{userManager.validate}">
Email: <input type="text" id="email" value="#{user.email}"/>
<button type="submit" value="signup"/>
</form>