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

JSP实例三、sql分页(1)

index.jsp
<%@ page language="java" import="java.sql.*" import="java.lang.*" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%!
    int CountPage = 0;
    int CurrPage = 1;
    int PageSize = 5;
    int CountRow = 0;
    public Connection Con() {
        try
        {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            Connection Con = DriverManager.getConnection("jdbc:mysql://localhost:3306/userdb?user=root&password=zhz&useUnicode=true&characterEncoding=gb2312");
            return Con;
        }
        catch(Exception e)
        {
            return null;
        }
    }
%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>利用 SQL 语句实现分页</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"


相关文档:

jsp验证码代码

在开发中验证码是比较常用到有效防止这种问题对某一个特定注册用户用特定程序破解方式进行不断的登陆尝试的方式。
此演示程序包括三个文件:
1.login.jsp:登录页面
2.code.jsp:生成验证码图片页面
3.check.jsp:验证结果
code.jsp
 程序代码 ==================================================
<%@ page co ......

FCKeditor jsp 配置 使用

FCKeditor jsp 配置 使用
2009-04-07 16:57
FCKeditor是一款跨平台的在线编辑器,到我发布本文,FCKeditor的官方版本已经发展到了2.6.4
点击进入 官网
1、首先登陆www.fckeditor.net/download下载FCKeditor的最新版本,需要下载2个压缩包,一个是基本应用,另一个是在为在jsp下所准备的配置。
     ......

JSP实例二、登录验证

方法一、
login.html
<html>
  <head>
    <title>用户登录</title>
    <meta http-equiv="content-type" content="text/html; charset=gb2312">
  </head>
 
  <script language="javascript">
  &nbs ......

jsp文件下载完整方法

第一种:
就是直接给出下载的地址,这种方式很不好,因为会暴露你的地址,带来很多不安全的因素,可以说是千万不要用这种
第二种:
下载页面
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<html>
<head>
<title>download</title>
</head>
< ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号