标签:des style blog http io ar 使用 java for
<body>
<table border="1">
<%for(int i=0;i<3;i++){%>
<tr>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
</tr>
<%} %>
</table>
<jsp:plugin code="Clock.class" codebase="Applet" type="applet"></jsp:plugin>
其实真的很想你,只是你不知道而已 <br>
</body>
编写一个jsp程序,使用<jsp:forward>动作实现跳转,并通过<jsp:param>动作元素传递参数,在跳转页中接收参数并输出。
<%@ page language="java" 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>跳转页面1</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>
使用jsp:forward动作指令实现服务器端跳转。
<jsp:forward page="practiceforward2.jsp">
<jsp:param name="name" value="yaoming"/>
</jsp:forward>
</body>
</html>
<%@ page language="java" 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>跳转页面2</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>
使用jsp:forward动作指令实现服务器端跳转。
<jsp:forward page="practiceforward3.jsp">
<jsp:param name="name" value="James"/>
</jsp:forward>
</body>
</html>
<%@ page language="java" 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>
<h2>跳转到的页面</h2>
<p>接收到的参数</p>
<%
string strname=request.getParameter("name");
%>
<%="name参数值为"+strname %>
</body>
</html>
由于时间问题,这个程序还有一些问题,希望尽快解决!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
第四天
标签:des style blog http io ar 使用 java for
原文地址:http://www.cnblogs.com/xlq-java/p/4077216.html