编写一个JavaBean的小程序(包括利用setProperty,getProperty设定属性或获得属性)

来源:百度知道 编辑:UC知道 时间:2024/05/27 14:51:46
用jsp语言,谢谢啦

<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="Box" %>
<jsp:useBean id="box" class="Box" scope="page">
</jsp:useBean>
<jsp:setProperty name="box" property="length" param="length"/>
<jsp:setProperty name="box" property="width" param="width"/>
<jsp:setProperty name="box" property="height" param="height"/>
<html>
<head>
<title>用HTML表单设置JavaBean的属性</title>
</head>
<body>
<div align="center">
<center>
<table border="1" width="46%">
<form name="form1" action="" method="post">
<tr>
<td width="44%">请输入盒子的长:</td>
<td width="56%&q