<s:bean> Tags: for creating JavaBean instances on JSP pages, you can use <s:param> to pass in parameters.
Name: Specifies the implementation class of the instantiated JavaBean
ID: Instantiating the name of an object
<s:set> Tags: The set tag defines a new variable and assigns an existing variable to the new variable, and it can also place the new variable in the specified range
Name: Specify a new variable
Scope: Specifies the scope of use of the new variable, action,page,request,response,session,application
Value: Assigning values to new variables
Package bean;
public class Student {
private String name;
Private String sex;
Private String age;
Public String GetName () {return
name;
}
public void SetName (String name) {
this.name = name;
}
Public String Getsex () {return
sex;
}
public void Setsex (String sex) {
this.sex = sex;
}
Public String Getage () {return age
;
}
public void Setage (String age) {
this.age = age;
}
}
<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%> <%@ taglib prefix= "s" uri= "/struts-tags" %> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >