<%@ page language="java"%>
<%@ page contentType="text/html;charset=gb2312"%>
<%!
String getStr(String str)
{
try
{
String temp=new String(str.getBytes("ISO8859_1"));
return temp;
}
catch(Exception e)
{
return null;
}
}
%>
<%
String username=getStr(request.getParameter("username"));
String password=request.getParameter("password");
String confirm=request.getParameter("confirm");
String sex=getStr(request.getParameter("sex"));
String education=getStr(request.getParameter("education"));
String favorite="";
if(request.getParameter("book")!=null)
favorite=request.getParameter("book")+"";
if(request.getParameter("music")!=null)
favorite=favorite+request.getParameter("music")+"";
if(request.getParameter("sport")!=null)
favorite=favorite+request.getParameter("sport");
favorite=getStr(favorite) ;
%>
<html>
<head>
<title>请确认你的个人资料</title>
</head>
<boby>
<p align="center"><b>以下是你填写的个人资料</b></p>
<div align="center">
<center>
<table border="0" width="300" cellpadding="0" style="font-size:9pt" cellspacing="3" bgcolor="#EEFDF8">
<tr>
<td width="50%" height="20" align="right">用户名:</td>
<td width="50%" height="20"> <%=username%></td>
</tr>
<tr>
<td width="50%" height="20" align="right">密码:</td>
<td width="50%" height="20"> <%=password%></td>
</tr>
<tr>
<td width="50%" height="20" align="right">确认密码:</td>
<td width="50%" height="20"> <%=confirm%></td>
</tr>
</table>
</center>
</div>
</boby>
</html>
这段jsp代码不知道出现什么问题了,不能显示
最新推荐文章于 2020-12-30 12:19:05 发布