<html>
<head id="Head1" runat="server">
<title>无标题页 </title>
<script type="text/javascript">
function MultiSelector(list_target, max)
{
// Where to write the list
this.list_target = list_target;
// How many elements?
this.count = 0;
// How many elements?
this.id = 0;
// Is there a maximum?
if (max){this.max = max;}else{this.max = -1;}
/**
* Add a new file input element
*/
this.addElement = function(element)
{
// Make sure it's a file input element
if (element.tagName == 'INPUT' && element.type == 'file')
{ ......
<jsp:directive.page import="zero.space.ch03.BookBean"/>
相当于
<%@ page import="zero.space.ch03.BookBean" %>
但是也有区别:两个用法的作用范围不同,<%@ page import="zero.space.ch03.BookBean" %> 可用于多个页面内而<jsp:directive.page import="zero.space.ch03.BookBean"/>只能用于一个页面,不能跨页调用。
例如:如果你把所有类包的引入放在一个JSP中,在其他jsp中通include引入那个jsp。这时引入类就必须采用
<%@ page import="zero.space.ch03.BookBean" %> 这样的写法。
<jsp:directive.page import="zero.space.ch03.BookBean"/>这种写法只能在同一个jsp页面中使用,不能跨页调用 ......
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>
<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">
......
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="config/config_SelfHelp.jsp"%>
<%@ include file="sh_Bookmark_Data.jsp"%>
<html xmlns:v>
<head>
<title>我的书签</title>
<style type="text/css">
table#border{
border-collapse: collapse;
border-top:#0076BE 1px solid;
border-left:#0076BE 1px solid;
}
table#border td{
border-bottom:#0076BE 1px solid;
border-right:#0076BE 1px solid;
}
a.button:link {
text-decoration: none;
color:black;
}
a.button:visited {
text-decoration: none;
color:black;
display:inline-block;
  ......
1.request对象
客户端的请求信息被封装在request对象中,通过它才能了解到客户的需求,然后做出响应。它是HttpServletRequest类的实例。
序号 方 法 说 明
1 object getAttribute(String name) 返回指定属性的属性值
2 Enumeration getAttributeNames() 返回所有可用属性名的枚举
3 String getCharacterEncoding() 返回字符编码方式
4 int getContentLength() 返回请求体的长度(以字节数)
5 String getContentType() 得到请求体的MIME类型
6 ServletInputStream getInputStream() 得到请求体中一行的二进制流
7 String getParameter(String name) 返回name指定参数的参数值
8 Enumeration getParameterNames() 返回可用参数名的枚举
9 String[] getParameterValues(String name) 返回包含参数name的所有值的数组
10 String getProtocol() 返回请求用的协议类型及版本号
11 String getScheme() 返回请求用的计划名,如:http.https及ftp等
12 String getServerName() 返回接受请求的服务器主机名
13 int getServerPort() 返回服务器接受此请求所用的端口号
14 BufferedReader getReader() 返回解码过了的请求体
15 String getRemoteAddr() 返回发送此请求的 ......
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>120</session-timeout> 分钟
</session-config> ......