摘要:
jsp + javabean循序渐进教程(一)
--------------------------------------------------------------------------------
jsp + javabean循序渐进教程(一) (文/刘玉锋)
目前,jsp作为一个很好的动态网站开发语言得到了越来越广泛的应用,在各类jsp应用程序中,......
摘要:
在前一篇文章中,我们详细的介绍了struts 1.1 的工作原理,接着将会介绍它的安装,以及一个具体的应用。1. struts 1.1 安装安装struts 1.1 比较简单。假设我们使用的是tomcat 5.0,并且安装在d: omcat下。首先,请到http://jakarta.apache.org/struts/ 下载struts 1.1,解压缩后,可以看到jakarta......
使用struts,ibaits和JSTL开发简便通用的文件上传系统
使用struts,ibaits与jstl开发简便通用的文件上传系统首先我们要在struts-config里加上一句,来指定临时目录以及限制大小. 【程序编程相关:
在.NET运行时了解类型信息(3)】文件上传也是一个老生常谈的问题了.struts提供了很方便的文件上传组件,利用struts,很容易开发文件上传的系统.本文结合ibatis与jstl开发一个简便而通用的文件上传系统.通过本文,你可以学到如何在struts里配置文件上传功能.struts1.1的动态form配置与使用.如果简单的使用ibatis,如果简单使用的jstl. 【推荐阅读:
使用.NET的IO(1)】然后只要在form中加上enctype="multipart/form-data" 就可以实现struts的上传了,十分简单吧? 【扩展信息:
在.NET运行时了解类型信息(1)】<controller maxfilesize="2m" tempdir="d:/temp"/> 下面我们在数据库中建立一张表.create sequence attachment_seq;drop table attachment;create table attachment(attachid int not null, --自动增长号 attachfilename varchar2(250) null, --文件名 attachfilesize int not null, --文件大小 attachmimetype varchar2(70) null, --文件类型 attachdesc varchar2(250) null, --说明 attachcreationip varchar2(20) not null, --上传的ip attachcreationdate timestamp not null, --创建时间 attachmodifieddate timestamp not null, --文件保存路径 attachfilepath varchar2 (250) not null,primary key (attachid));create or replace trigger attach_trig_autoincbefore insert on attachmentfor each rowbeginif (:new.attachid is null) then select attachment_seq.nextval into :new.attachid from dual;end if;end;字段的内容都很简单.下面建立ibatis的sql map文件.建立标准的insert.update.delete与find的sql.相信看过前面系列文章的朋友对此已经很熟悉了....
下一页 摘要:
在struts中分页的一种实现
我的项目中的分页功能
1, 思路
使用一个页面控制类,它记录页面信息,如上页,下页,当前页等。在查询的action中,将这个控制类和查询条件一起传递给数据库访问bean,然后将这两个参数保存在用户session中。在分页控制action中,利用接收到的分页参数调用数据库访问的bean.
2,实现
(1)分页控制类
......