scope="request"
package req;
public class User{
private String name="shuxue";
public void setName(String str)
{
name=str;
}
public String getName()
{
return name;
}
}
<jsp:useBean id="User" class="req.User" scope="request"/>
<jsp:setProperty name="User" property="name" value="math"/>
<jsp:getProperty name="User" property="name"/>
<%
req.User user=new req.User();
out.print(user.getName());
%>