易截截图软件、单文件、免安装、纯绿色、仅160KB

让html以及jsp页面不被缓存

对于HTM网页,加入:
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
然后,jsp页面中加入:
<%
     response.setHeader("Cache-Control","no-store");
     response.setHeader("Pragrma","no-cache");
     response.setDateHeader("Expires",0);
%>


相关文档:

jsp生成html静态页面代码

<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//在这里如果写成“WEB-INF\templates\template.htm”程序会报错
 String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm"; &nbs ......

javascript获取并分析URL(html?id=*等问题)

1.获取URL
获取url的方法,直接用location就可以了,window.location或window.loation.href也可以。
2.分析URL
运用location获取的url的属性为object,要对其进行字符串的分析操作,需要先将其转换为字符串。
用location来进行处理,首先将其转换为字符串,用函数toString(),URL.toString();
附一些URL参数
完整的U ......

JSP连接各类数据库方法大全

一、jsp连接Oracle8/8i/9i数据库(用thin模式)
  testoracle.jsp如下:
  <%@ page contentType="text/html;charset=gb2312"%>
  <%@ page import="java.sql.*"%>
  <html>
  <body>
  <%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
  Stri ......

html语法大全

HTML语言语法大全
<! - - ... - -> 批注
<!> 跑马灯
<marquee>...</marquee>普通卷动
<marquee behavior=slide>...</marquee>滑动
<marquee behavior=scroll>...</marquee>预设卷动
<marquee behavior=alternate>...</marquee>来回卷动 
& ......

jsp中通过URL地址获取该地址页面中的静态页面


try {
            URL url = new URL("http://www.163.com");
            InputStream is = url.openStream();
            byte[] buffer = new byte[1024];
           ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号