81,111
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath %>">
<title>My JSP 'register2.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<table align="center" width="40%" border="0">
<tr>
<td>
<s:fielderror cssStyle="color:red" /><!-- 显示action级错误 -->
</td>
</tr>
</table>
<!-- 提交到register的action theme="simple"取消strus表单提供的类型转换错误输出 同时label标签失效-->
<s:form action="register" theme="simple">
<table align="center" width="40%" border="0">
<tr>
<td>
username
</td>
<td>
<s:textfield name="username" label="用户帐号" theme="simple" ></s:textfield>
</td>
</tr>
<tr>
<td>
password
</td>
<td>
<s:password name="password" label="密码" theme="simple"></s:password>
</td>
</tr>
<tr>
<td>
re-password
</td>
<td>
<s:password name="repassword" label="重复密码" theme="simple"></s:password>
</td>
</tr>
<tr>
<td>
age
</td>
<td>
<s:textfield name="age" label="年龄" ></s:textfield>
</td>
</tr>
<tr>
<td>
birthday
</td>
<td>
<s:textfield name="birthday" label="出生日期" theme="simple"></s:textfield>
</td>
</tr>
<tr>
<td>
graduation
</td>
<td>
<s:textfield name="graduation" label="毕业日期" theme="simple"></s:textfield>
</td>
</tr>
<tr>
<td>
<s:submit label="submit"></s:submit>
</td>
<td>
<s:reset value="重置"></s:reset>
</td>
</tr>
</table>
</s:form>
</body>
</html>