< % --
Created by IntelliJ IDEA.
User: 空间
Date: 2020 / 9 / 22
Time: 15 : 51
To change this template use File | Settings | File Templates.
-- % >
< % @ page contentType= "text/html;charset=UTF-8" language= "java" % >
< jsp: useBean id= "user" class = "user" scope= "session" >
< / jsp: useBean>
< jsp: setProperty name= "user" property= "*" >
< / jsp: setProperty>
< jsp: getProperty name= "user" property= "name" / >
< jsp: getProperty name= "user" property= "address" / >
< jsp: getProperty name= "user" property= "age" / >
< % --
Created by IntelliJ IDEA.
User: 空间
Date: 2020 / 9 / 22
Time: 16 : 18
To change this template use File | Settings | File Templates.
-- % >
< % @ page contentType= "text/html;charset=UTF-8" language= "java" % >
< html>
< head>
< form action= "neirong.jsp" method= "post" >
姓名:< input type= "text" id= "name" name= "name" > < br>
地址:< input type= "text" id= "address" name= "address" > < br>
年龄:< input type= "text" id= "age" name= "age" > < br>
< input type= "submit" value= "提交" >
< / form>
< body>
< / body>
< / html>
public class user { private String name;
private String address;
private int age;
public String getName ( ) {
return name;
}
public void setName ( String name) {
this . name = name;
}
public String getAddress ( ) {
return address;
}
public void setAddress ( String address) {
this . address = address;
}
public int getAge ( ) {
return age;
}
public void setAge ( int age) {
this . age = age;
}
}
! [ 在这里插入图片描述] ( https: / / img- blog. csdnimg. cn/ 20200922180000111. png? x- oss- process= image/ watermark, type_ZmFuZ3poZW5naGVpdGk, shadow_10, text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJeWluU2lvbg== , size_16, color_FFFFFF, t_70#pic_center)
! [ 在这里插入图片描述] ( https: / / img- blog. csdnimg. cn/ 20200922180028882. png? x- oss- process= image/ watermark, type_ZmFuZ3poZW5naGVpdGk, shadow_10, text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJeWluU2lvbg== , size_16, color_FFFFFF, t_70#pic_center)