About WebWork Verification

xiaoxiao2021-03-06  22

In the learning webwork, you want to make an example of user login verification. If you verify it, you can prompt information in XWork, but you have always wanted to generate JavaScript tips at the client, it is really puzzling. Press XIAXIN's learning document Moxie's document repeatedly, can't. This is the source: a Action, two jsp pages, a file validation.xml, xwork.xmlpackage com.mystore; import com.opensymphony.xwork.ActionSupport; public class LoginAction extends ActionSupport {private User user = new User (); public User getUser () {return user;} public void setUser (User user) {this.user = user;} public String execute () throws Exception {// TODO Auto-generated method stubreturn SUCCESS;}} input.jsp <% @ Taglib prefix = "ww" URI = "Webwork"%>

result.jsp <% @ taglib prefix = "ww" URI = "Webwork"%> hi, the result of validation this is my jsp Page.

Name

Email

Web.xml < Servlet-name> Webwork com.opensymphony.webwork.dispatcher.servletdispatcher Webwork *. Action input.jsp Webwork /web-inf/webwork.tld xwork.xml input.jsp Result.jsp 转载请注明原文地址:https://www.9cbs.com/read-60484.html


New Post(0)