<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
<form action="result.jsp" method="post" enctype="multipart/form-data">
Information: <input type="text" name="info"><br>
File: <input type="file" name="file"><br>
<input type="submit" name="submit" value=" submit ">
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
<form action="/struts2/UploadServlet" method="post" enctype="multipart/form-data">
username: <input type="text" name="username"><br>
password: <input type="password" name="password"><br>
file1: <input type="file" name="file1"><br>
file2: <input type="file" name="file2"><br>
<input type="submit" value="submit">
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ page import="java.io.*" %>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
<%
InputStream is = request.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String buffer = null;
while((buffer = br.readLine()) != null)
{
out.print(buffer + "<br>");
}
%>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
username: ${requestScope.username }<br>
password: ${requestScope.password }<br>
file1: ${requestScope.file1 }<br>
file2: ${requestScope.file2 }
</body>
</html>
<%@ 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 'register.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%">
<tr>
<td style="color:red">
<s:fielderror></s:fielderror>
</td>
</tr>
</table>
<form action="register.action" method="post">
<table align="center" width="40%" border="1">
<tr>
<td>
username
</td>
<td>
<input type="text" name="username" value="${requestScope.username}">
</td>
</tr>
<tr>
<td>
password
</td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td>
re-password
</td>
<td>
<input type="password" name="repassword">
</td>
</tr>
<tr>
<td>
age
</td>
<td>
<input type="text" name="age">
</td>
</tr>
<tr>
<td>
birthday
</td>
<td>
<input type="text" name="birthday">
</td>
</tr>
<tr>
<td>
graduation
</td>
<td>
<input type="text" name="graduation">
</td>
</tr>
<tr>
<td>
<input type="submit" value=" submit ">
</td>
<td>
<input type="reset" value=" reset ">
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
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 'result.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>
username:<%= request.getParameter("username") %><br>
password:<%= request.getParameter("password") %>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
<h1><font color="blue">请选择喜欢的运动项目</font></h1>
<s:form action="viewResult">
<s:checkbox name="interest" label="足球" fieldValue="football" labelposition="left"></s:checkbox>
<s:checkbox name="interest" label="篮球" fieldValue="basketball" labelposition="left"></s:checkbox>
<s:checkbox name="interest" label="排球" fieldValue="volleyball" labelposition="left"></s:checkbox>
<s:checkbox name="interest" label="羽毛球" fieldValue="badminton" labelposition="left"></s:checkbox>
<!--
<s:checkboxlist list="#{'computer' : '计算机' , 'math' : '数学'}" name="interest" label="浪曦" labelposition="top">
</s:checkboxlist>
-->
<s:submit value="提交"></s:submit>
</s:form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!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=GB18030">
<title>Insert title here</title>
<script type="text/javascript">
function addMore()
{
var td = document.getElementById("more");
var br = document.createElement("br");
var input = document.createElement("input");
var button = document.createElement("input");
input.type = "file";
input.name = "file";
button.type = "button";
button.value = "Remove";
button.onclick = function()
{
td.removeChild(br);
td.removeChild(input);
td.removeChild(button);
}
td.appendChild(br);
td.appendChild(input);
td.appendChild(button);
}
</script>
</head>
<body>
<table align="center" width="50%">
<tr>
<td>
<s:fielderror cssStyle="color:red" />
</td>
</tr>
</table>
<s:form action="upload" theme="simple" enctype="multipart/form-data">
<table align="center" width="50%" border="1">
<tr>
<td>
username
</td>
<td>
<s:textfield name="username"></s:textfield>
</td>
</tr>
<tr>
<td>
password
</td>
<td>
<s:password name="password"></s:password>
</td>
</tr>
<tr>
<td>
file
</td>
<td id="more">
<s:file name="file"></s:file><input type="button" value="Add More.." onClick="addMore()">
</td>
</tr>
<tr>
<td>
<s:submit value=" submit "></s:submit>
</td>
<td>
<s:reset value=" reset "></s:reset>
</td>
</tr>
</table>
</s:form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
username: <s:property value="username"/><br>
password: <s:property value="password"/><br>
file: <s:property value="fileFileName"/>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body>
${exception.message }
</body>
</html>
分享到:
相关推荐
jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序 jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序jsp web程序 jsp web程序jsp web程序...
jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与实现jsp论坛设计与...
电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影售票系统JSP电影...
基于 Servlet+jsp+mysql 开发 javaWeb 学生宿舍管理系统基于 Servlet+jsp+mysql 开发 javaWeb 学生宿舍管理系统基于 Servlet+jsp+mysql 开发 javaWeb 学生宿舍管理系统基于 Servlet+jsp+mysql 开发 javaWeb 学生宿舍...
JSP程序设计实训与案例教程源代码JSP程序设计实训与案例教程源代码JSP程序设计实训与案例教程源代码JSP程序设计实训与案例教程源代码JSP程序设计实训与案例教程源代码JSP程序设计实训与案例教程源代码JSP程序设计实...
JSP(java server page) 1.JSP介绍: JSP是服务器端运行的页面,JSP本身就是一个Servlet,他不仅可以包含静态的HTML代码,也可以包含动态的JAVA代码,服务器容器可以将JSP转换成Servlet发布,并接受请求。 Jsp文件...
采用纯jsp页面+Mysql的方法实现功能 项目编码是gb2312,要转换格式的请自己装换,界面简洁,功能简单,实现容易,非常适合初学者 有助于加深初学者对jsp的理解和使用Mysql数据库 String DBDRIVER = ...
jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp建立的博客jsp...
jsp网站源码jsp网站源码jsp网站源码jsp网站源码jsp网站源码jsp网站源码jsp网站源码
《JSP程序设计从入门到精通》电子书 第1篇 入门篇 7 第1章 Jsp概述 技术分析 7 1.1 Jsp简介与历史背景 7 1.1.1 日新月异的Web技术 7 1.1.2 什么是JSP 8 1.1.3 JSP技术有以下几个显著的优点 9 ...
JSP下载文件说明包括两部分内容,一部分是JSP基础知识;另一部分是综合实例。读者可根据相应的使用说明直接使用这些源代码。 一、基础知识部分 此部分是指文件夹名为第1~9章中的内容(如表1),这些是书中介绍JSP...
6、通常应用(<jsp:useBean>)动作标识可以在JSP页面中创建一个Bean实例,并且通过属性的设置可以将该实例存储到JSP中的指定范围内。 7、在JSP内置对象中,(request)对象是从客户端向服务器端发出请求,包括用户提交的...
1)在JSP中,要定义一个方法,需要用到以下()元素。(选择一项) a) <%= %> b) c) ! %> d) 2)JSP页面经过编译之后,将创建一个()。(选择一项) a) applet b) servlet c) ...
使用jsp自定义标签的功能实现权限的控制。(如果用户没有某个模块的删除权限,就不现实这个删除按钮) 在整个项目中所有的页面都可以引入自定义的标签去做到权限的控制。 自定义标签文件 删除 可以控制页面中的每...
JSP程序设计教程课件及所有40M源码 作者:郭珍 王国辉 出版时间:5/1/2008 所属丛书:21世纪高等学校计算机规划教材——精品系列 源程序使用方法 (1)需要安装Eclipse、JDK1.6、Tomcat 6.0、SQL Server 2000。 (2...
第一部分 jsp入门 第一章 概述 第二章 预备知识 第三章 jsp开发平台的建立--tomcat 第四章 jsp的语法和语义 第五章 作为xml的jsp 第六章 jsp基础实例 第七章 用jsp实现常见的web应用 第二部分 高级jsp技术 ...
jsp实现级联菜单jsp实现级联菜单jsp实现级联菜单jsp实现级联菜单jsp实现级联菜单
jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp模板jsp...
大三下学期JSP作业实验三SWQ 里面没有学号。 文件夹 PATH 列表 卷序列号为 4E8D-6931 C:. │ .txt │ 实验三 JSP应用开发进阶.doc │ 报告三学号姓名.doc │ ├─代码 │ 1.html │ 1.jsp │ 2.jsp │ 3.jsp │ 4....