标签:
1,jSP出现乱码,
解决:
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><html>
<head>
<title>使用useBean</title>
</head>
<body>
<jsp:useBean id="box" class="box.Box"/>
<jsp:setProperty name="box" property="height" value="3"/>
<jsp:setProperty name="box" property="width" value="4"/>
<jsp:setProperty name="box" property="length" value="5"/>
设置后,box的长,宽,高分别为:
<jsp:getProperty name="box" property="height"/>,
<jsp:getProperty name="box" property="width"/>,
<jsp:getProperty name="box" property="length"/><br>
box的体积为:<%=box.getV()%>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/xss1993/p/5462171.html