TAILIEUCHUNG - Dynamic Web Pages using JSP - Lab Deliverable 10

Làm việc với người sử dụng đầu vào 1. Tạo một người dùng trang chi tiết. Các trang nên có First Name, Last Name, và các lĩnh vực địa chỉ Email. Trên nhấp vào nút gửi, một trang Web mới sẽ hiển thị các chi tiết được nhập vào bởi người sử dụng. Gợi ý: Sử dụng getAttribute để hiển thị các chi tiết của người dùng. | Lab Deliverable 10 Working with User Input Part II 1. Create a user details page. The page should have First Name Last Name and Email address fields. On clicking the submit button a new Web page should display the details entered by the user. Hint Use getAttribute to display the user details. Solution The files used in this exercise are 1. 2. 3. 4. @ page language java @ taglib uri WEB-INF prefix html html head title Sample Struts Application title head body h3 User Details h3 html form action Name name nameForm type table width 80 border 0 tr td b First Name b html text property name td tr tr td b Last Name b html text property last td tr tr td b Email nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp b Working with User Input Ver 2005 Aptech Limited 1 html text property email td tr tr td html submit td tr table html form body html Enter the code in Notepad and save the file as index .jsp in TOMCAT_HOME webapps details. html head title Sample Struts Display Name title head body h2 Confirm the Details You Entered h2 table width 80 border 0 tr td b First Name b NAME td tr tr td b Last Name b LAST td tr tr td b Email b EMAIL tr c td table body html Enter the code in Notepad and save the file as displayname .jsp in TOMCAT_HOME webapps details. 2 Ver 2005 Aptech Limited JSP and Struts package example import j import import public class NameForm extends ActionForm private String name null private String last null private String email null public String getName return name public String getLast return last public String getEmail return email public void setName String name name public void setLast String last last public void setEmail String email email public void reset .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.