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

jsp 简单分页

//总记录数
                int count = personDao.getCount();
                //每页显示5条
                int pageSize = 5;
                //当前页
                int currentPage = 1;
                int pageCount = (count + pageSize - 1) / pageSize;
                String _currentPgae = request.getParameter("currentPage");
                if (_currentPgae != null) {
                    currentPage = Integer.parseInt(_currentPgae);
                }
                if (currentPage < 1) {
                    currentPage = 1;
                }
                if (currentPage > pageCount)
                    currentPage = pageCount;
                List list = personDao.getPageList((currentPage - 1) * pageSize,
                        pageSize);
                Iterator it = list.iterator();
 &


相关文档:

JSP(HTML)中((br/))的应用

今天在如下代码中:
********************************************************
<p><font color="blue">操作步骤:1、选择输出可选项 2、查询 3、输出
             <br>
 
************************************************** ......

jsp访问MySQL数据库错误

不知道是不是驱动加载有问题,在MyEclipse中写了简单的数据库测试程序找不到驱动类,希望大虾能给予帮助,谢了。
严重: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.aspectj.lang.Signature
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClas ......

Resin下配置JSP虚拟主机

1.添加 host 块
每一个JSP虚拟主机有它自己的 host 块。每一个至少要定义id来指定虚拟主机的名字和一个root应用程序。一个 <root-directory>通常用来为主机定一个默认的web应用程序。
配置文件片段:
<server>
<host id='gryffindor.caucho.com'>
  <root-directory>/home/www/gryf ......

JSP内置对象及常用方法

1.request对象
客户端的请求信息被封装在request对象中,通过它才能了解到客户的需求,然后做出响应。它是HttpServletRequest类的实例。
序号 方 法 说 明
1 object getAttribute(String name) 返回指定属性的属性值
2 Enumeration getAttributeNames() 返回所有可用属性名的枚举
3 String getCharacterEncoding( ......

JSP 容器的初始化和销毁 ServletContext(转)

ServletContext 被 Servlet 程序用来与 Web 容器通信。例如写日志,转发请求。每一个 Web
应用程序含有一个Context,被Web应用内的各个程序共享。因为Context可以用来保存资源并且共享,所以我所知道的
ServletContext 的最大应用是Web缓存----把不经常更改的内容读入内存,所以服务器响应请求的时候就不需要进行慢速的磁 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号