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"
相关文档:
这个问题是从项目中设计数据库和操作数据库的人不同而造成的。所用的数据库
是sybase,设计时把数据类型设计为nvarchar了,如果是中文,读取出来就会得
到乱码。我试了好多方法还是不行,最后无奈,只好将数据类型改为varchar了。
所以在此总结一下中文乱码问题。
一、JSP与页面参数之间的乱码
&nb ......
<body style="height:100%;">
-------------------------------------------------------------------一开始的页面----------------------
fdasfsdfadf
<input name="button2" onclick="ShopConfirm('fdsaf')" value="点我" type="button"/>
--------------------------------------------------------- ......
FCKeditor jsp 配置 使用
2009-04-07 16:57
FCKeditor是一款跨平台的在线编辑器,到我发布本文,FCKeditor的官方版本已经发展到了2.6.4
点击进入 官网
1、首先登陆www.fckeditor.net/download下载FCKeditor的最新版本,需要下载2个压缩包,一个是基本应用,另一个是在为在jsp下所准备的配置。
  ......
我的系统使用acegi登录认证,并且配置用户缓存
<!-- 缓存器,为userCacheBackend提供缓存管理。 -->
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
<!-- EhCache一般用途如下:Hibernate缓存,DAO缓存,安全性凭证缓存(Ace ......