Write a JavaBean object that encapsulates user information, and output the user's registration information by manipulating the JavaBean action ID.

Source: Internet
Author: User

 Packagecome.hanqi.test; Public classYhbean {PrivateString username; PrivateString password; PrivateString Email; PrivateString Dizhi;  PublicString GetUserName () {returnusername; }     Public voidSetusername (String username) { This. Username =username; }     PublicString GetPassword () {returnpassword; }     Public voidSetPassword (String password) { This. Password =password; }     PublicString Getemail () {returnemail; }     Public voidsetemail (String email) { This. email =email; }     PublicString Getdizhi () {returnDizhi; }     Public voidSetdizhi (String Dizhi) { This. Dizhi =Dizhi; }    }
<%@ Page Language="Java"ContentType="text/html; Charset=utf-8"pageencoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Registered</title></Head><Body><formAction= "testyhbean2.jsp"Method= "POST"><TableAlign= "Center"width= "The "Height= "$"Border= "1"cellspacing= "0"cellpadding= "0"><TR><TDAlign= "Center"Height= " the"colspan= "2">Please enter the registration information</TD></TR><TR><TD>Account:</TD><TD><inputtype= "text"name= "username"></TD></TR><TR><TD>Password:</TD><TD><inputtype= "Password"name= "Password"></TD></TR><TR><TD>Mailbox:</TD><TD><inputtype= "text"name= "Email"></TD></TR><TR><TD>Address:</TD><TD><inputtype= "text"name= "Dizhi"></TD></TR><TR><TDAlign= "Center"colspan= "2"><inputtype= "Submit"value= "Submit"></TD></TR></Table></form></Body></HTML>
<%@ Page Language="Java"ContentType="text/html; Charset=utf-8"pageencoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Register display</title></Head><Body><%request.setcharacterencoding ("UTF-8");%><Jsp:usebeanID= "Person"class= "Come.hanqi.test.YhBean"><Jsp:setpropertyname= "Person" Property="*"/></Jsp:usebean>your registration information is:<BR>Account Number:<Jsp:getproperty Property= "username"name= "Person"/><BR>Password:<Jsp:getproperty Property= "Password"name= "Person"/><BR>Email:<Jsp:getproperty Property= "Email"name= "Person"/><BR>Address:<Jsp:getproperty Property= "Dizhi"name= "Person"/><BR></Body></HTML>

Write a JavaBean object that encapsulates user information, and output the user's registration information by manipulating the JavaBean action ID.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.