81,092
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
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>列车车次查询</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 bgcolor="#ffffff">
<h1><center>列车车次查询系统</center></h1>
<form action="trainAction.do" method="post">
<br>
<br>
列车车次:<input type="text" name="traincode"><br>
<br>
<input type="submit" value="查询" name="query">
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@page import="com.suncreate.Train" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>显示查询结果</title>
</head>
<%
Train t=(Train)session.getAttribute("result");
session.removeAttribute("result");
%>
<body bgcolor="#ffffff">
<h1><center>列车车次查询结果</center></h1>
<table align="center" border=0 cellspacing=5 cellpadding=1 width=80%>
<tr width="80%">
<td width="50%">列车车次:
</td>
<td width="50%">
<%=new String(t.getTrainCode().getBytes("ISO8859_1")) %>
</td>
</tr>
<tr width="80%">
<td width="50%">始发站:
</td>
<td width="50%">
<%=new String(t.getStartStation().getBytes("ISO8859_1")) %>
</td>
</tr>
<tr width="80%">
<td width="50%">始发时间:
</td>
<td width="50%">
<%=t.getStartTime() %>
</td>
</tr>
<tr width="80%">
<td width="50%">终点站:
</td>
<td width="50%">
<%=new String(t.getTerminal().getBytes("ISO8859_1")) %>
</td>
</tr>
<tr width="80%">
<td width="50%">到达时间:
</td>
<td width="50%">
<%=t.getTerminalTime() %>
</td>
</tr>
<tr width="80%">
<td width="50%">全程票价:
</td>
<td width="50%">
<%=new String(t.getPrice().getBytes("ISO8859_1")) %>
</td>
</tr>
</table>
</body>
</html>