<%@ page contentType="text/html;charset=GBK" %>
<html>
<head>
<title>设置Bean的一个属性与输入参数关联</title>
</head>
<body>
<jsp:useBean id="bean" scope="page" class="myBean.NameBean" />
<%
	String str = request.getParameter("str");
	if(str == null || str.trim().length()==0) {
		out.print("输入参数str为空");
		return;
	}
%>
<jsp:setProperty name="bean" property="name" param="str" />
<p>从参数中关联后：
<%
	out.print(bean.getName());
%>
</body>
</html>