- 浏览: 108208 次
- 性别:
- 来自: 武汉
文章分类
最新评论
-
ldwtill:
overwrite呢?
overload,overwrite和override比较 -
dafeiwang:
...
过滤器和拦截器的区别
刚刚做了三个文件上传的Demo
a.在jsp中简单利用Commons-fileupload组件实现
b.在struts1.2中实现
c.在sturts2中实现
现在把Code与大家分享一下..
注:此为三个简单Demo,仅供练习用,并没有做太多上传限制
如有兴趣可以自行查看相关文档说明
一.在JSP环境中利用Commons-fileupload组件实现文件上传
1.页面upload.jsp清单如下:
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>The FileUpload Demo</title>
- </head>
- <body>
- <form action="UploadFile" method="post" enctype="multipart/form-data">
- <p><input type="text" name="fileinfo" value="">文件介绍</p>
- <p><input type="file" name="myfile" value="浏览文件"></p>
- <p><input type="submit" value="上 传"></p>
- </form>
- </body>
- </html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>The FileUpload Demo</title> </head> <body> <form action="UploadFile" method="post" enctype="multipart/form-data"> <p><input type="text" name="fileinfo" value="">文件介绍</p> <p><input type="file" name="myfile" value="浏览文件"></p> <p><input type="submit" value="上 传"></p> </form> </body> </html>
注意:在上传表单中,既有普通文本域也有文件上传域
2.FileUplaodServlet.java清单如下:
- package org.chris.fileupload;
- import java.io.File;
- import java.io.IOException;
- import java.util.Iterator;
- import java.util.List;
- import javax.servlet.ServletException;
- import javax.servlet.http.*;
- import org.apache.commons.fileupload.FileItem;
- import org.apache.commons.fileupload.FileItemFactory;
- import org.apache.commons.fileupload.disk.DiskFileItemFactory;
- import org.apache.commons.fileupload.servlet.ServletFileUpload;
- public class FileUplaodServlet extends HttpServlet {
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doPost(request, response);
- }
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- request.setCharacterEncoding("UTF-8");
- //文件的上传部分
- boolean isMultipart = ServletFileUpload.isMultipartContent(request);
- if(isMultipart)
- {
- try {
- FileItemFactory factory = new DiskFileItemFactory();
- ServletFileUpload fileload = new ServletFileUpload(factory);
- // 设置最大文件尺寸,这里是4MB
- fileload.setSizeMax(4194304);
- List<FileItem> files = fileload.parseRequest(request);
- Iterator<FileItem> iterator = files.iterator();
- while(iterator.hasNext())
- {
- FileItem item = iterator.next();
- if(item.isFormField())
- {
- String name = item.getFieldName();
- String value = item.getString();
- System.out.println("表单域名为: " + name + "值为: " + value);
- }else
- {
- //获得获得文件名,此文件名包括路径
- String filename = item.getName();
- if(filename != null)
- {
- File file = new File(filename);
- //如果此文件存在
- if(file.exists()){
- File filetoserver = new File("d:\\upload\\",file.getName());
- item.write(filetoserver);
- System.out.println("文件 " + filetoserver.getName() + " 上传成功!!");
- }
- }
- }
- }
- } catch (Exception e) {
- System.out.println(e.getStackTrace());
- }
- }
- }
- }
package org.chris.fileupload; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.*; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; public class FileUplaodServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); //文件的上传部分 boolean isMultipart = ServletFileUpload.isMultipartContent(request); if(isMultipart) { try { FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload fileload = new ServletFileUpload(factory); // 设置最大文件尺寸,这里是4MB fileload.setSizeMax(4194304); List<FileItem> files = fileload.parseRequest(request); Iterator<FileItem> iterator = files.iterator(); while(iterator.hasNext()) { FileItem item = iterator.next(); if(item.isFormField()) { String name = item.getFieldName(); String value = item.getString(); System.out.println("表单域名为: " + name + "值为: " + value); }else { //获得获得文件名,此文件名包括路径 String filename = item.getName(); if(filename != null) { File file = new File(filename); //如果此文件存在 if(file.exists()){ File filetoserver = new File("d:\\upload\\",file.getName()); item.write(filetoserver); System.out.println("文件 " + filetoserver.getName() + " 上传成功!!"); } } } } } catch (Exception e) { System.out.println(e.getStackTrace()); } } } }
3.web.xml清单如下:
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <servlet>
- <servlet-name>UploadFileServlet</servlet-name>
- <servlet-class>
- org.chris.fileupload.FileUplaodServlet
- </servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>UploadFileServlet</servlet-name>
- <url-pattern>/UploadFile</url-pattern>
- </servlet-mapping>
- <welcome-file-list>
- <welcome-file>/Index.jsp</welcome-file>
- </welcome-file-list>
- </web-app>
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>UploadFileServlet</servlet-name> <servlet-class> org.chris.fileupload.FileUplaodServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>UploadFileServlet</servlet-name> <url-pattern>/UploadFile</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>/Index.jsp</welcome-file> </welcome-file-list> </web-app>
二.在strut1.2中实现
1.上传页面file.jsp 清单如下:
- <%@ page language="java" pageEncoding="ISO-8859-1"%>
- <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
- <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
- <html>
- <head>
- <title>JSP for FileForm form</title>
- </head>
- <body>
- <html:form action="/file" enctype="multipart/form-data">
- <html:file property="file1"></html:file>
- <html:submit/><html:cancel/>
- </html:form>
- </body>
- </html>
<%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <html> <head> <title>JSP for FileForm form</title> </head> <body> <html:form action="/file" enctype="multipart/form-data"> <html:file property="file1"></html:file> <html:submit/><html:cancel/> </html:form> </body> </html>
2.FileAtion.java的清单如下:
- /*
- * Generated by MyEclipse Struts
- * Template path: templates/java/JavaClass.vtl
- */
- package action;
- import java.io.*;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.Action;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionForward;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.upload.FormFile;
- import form.FileForm;
- /**
- * @author Chris
- * Creation date: 6-27-2008
- *
- * XDoclet definition:
- * @struts.action path="/file" name="fileForm" input="/file.jsp"
- */
- public class FileAction extends Action {
- /*
- * Generated Methods
- */
- /**
- * Method execute
- * @param mapping
- * @param form
- * @param request
- * @param response
- * @return ActionForward
- */
- public ActionForward execute(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
- FileForm fileForm = (FileForm) form;
- FormFile file1=fileForm.getFile1();
- if(file1!=null){
- //上传路径
- String dir=request.getSession(true).getServletContext().getRealPath("/upload");
- OutputStream fos=null;
- try {
- fos=new FileOutputStream(dir+"/"+file1.getFileName());
- fos.write(file1.getFileData(),0,file1.getFileSize());
- fos.flush();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }finally{
- try{
- fos.close();
- }catch(Exception e){}
- }
- }
- //页面跳转
- return mapping.findForward("success");
- }
- }
/* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */ package action; import java.io.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; import form.FileForm; /** * @author Chris * Creation date: 6-27-2008 * * XDoclet definition: * @struts.action path="/file" name="fileForm" input="/file.jsp" */ public class FileAction extends Action { /* * Generated Methods */ /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { FileForm fileForm = (FileForm) form; FormFile file1=fileForm.getFile1(); if(file1!=null){ //上传路径 String dir=request.getSession(true).getServletContext().getRealPath("/upload"); OutputStream fos=null; try { fos=new FileOutputStream(dir+"/"+file1.getFileName()); fos.write(file1.getFileData(),0,file1.getFileSize()); fos.flush(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ try{ fos.close(); }catch(Exception e){} } } //页面跳转 return mapping.findForward("success"); } }
3.FileForm.java的清单如下:
- package form;
- import javax.servlet.http.HttpServletRequest;
- import org.apache.struts.action.ActionErrors;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.upload.FormFile;
- /**
- * @author Chris
- * Creation date: 6-27-2008
- *
- * XDoclet definition:
- * @struts.form name="fileForm"
- */
- public class FileForm extends ActionForm {
- /*
- * Generated Methods
- */
- private FormFile file1;
- /**
- * Method validate
- * @param mapping
- * @param request
- * @return ActionErrors
- */
- public ActionErrors validate(ActionMapping mapping,
- HttpServletRequest request) {
- // TODO Auto-generated method stub
- return null;
- }
- /**
- * Method reset
- * @param mapping
- * @param request
- */
- public void reset(ActionMapping mapping, HttpServletRequest request) {
- // TODO Auto-generated method stub
- }
- public FormFile getFile1() {
- return file1;
- }
- public void setFile1(FormFile file1) {
- this.file1 = file1;
- }
- }
package form; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; /** * @author Chris * Creation date: 6-27-2008 * * XDoclet definition: * @struts.form name="fileForm" */ public class FileForm extends ActionForm { /* * Generated Methods */ private FormFile file1; /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub return null; } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub } public FormFile getFile1() { return file1; } public void setFile1(FormFile file1) { this.file1 = file1; } }
4.struts-config.xml的清单如下:
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
- <struts-config>
- <data-sources />
- <form-beans >
- <form-bean name="fileForm" type="form.FileForm" />
- </form-beans>
- <global-exceptions />
- <global-forwards />
- <action-mappings >
- <action
- attribute="fileForm"
- input="/file.jsp"
- name="fileForm"
- path="/file"
- type="action.FileAction"
- validate="false">
- <forward name="success" path="/file.jsp"></forward>
- </action>
- </action-mappings>
- <message-resources parameter="ApplicationResources" />
- </struts-config>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"> <struts-config> <data-sources /> <form-beans > <form-bean name="fileForm" type="form.FileForm" /> </form-beans> <global-exceptions /> <global-forwards /> <action-mappings > <action attribute="fileForm" input="/file.jsp" name="fileForm" path="/file" type="action.FileAction" validate="false"> <forward name="success" path="/file.jsp"></forward> </action> </action-mappings> <message-resources parameter="ApplicationResources" /> </struts-config>
5.web.xml代码清单如下:
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <servlet>
- <servlet-name>action</servlet-name>
- <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
- <init-param>
- <param-name>config</param-name>
- <param-value>/WEB-INF/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>debug</param-name>
- <param-value>3</param-value>
- </init-param>
- <init-param>
- <param-name>detail</param-name>
- <param-value>3</param-value>
- </init-param>
- <load-on-startup>0</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>action</servlet-name>
- <url-pattern>*.do</url-pattern>
- </servlet-mapping>
- </web-app>
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> </web-app>
三.在struts2中实现(以图片上传为例)
1.FileUpload.jsp代码清单如下:
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@ taglib prefix="s" uri="/struts-tags" %>
- <html>
- <head>
- <title>The FileUplaodDemo In Struts2</title>
- </head>
- <body>
- <s:form action="fileUpload.action" method="POST" enctype="multipart/form-data">
- <s:file name="myFile" label="MyFile" ></s:file>
- <s:textfield name="caption" label="Caption"></s:textfield>
- <s:submit label="提交"></s:submit>
- </s:form>
- </body>
- </html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>The FileUplaodDemo In Struts2</title> </head> <body> <s:form action="fileUpload.action" method="POST" enctype="multipart/form-data"> <s:file name="myFile" label="MyFile" ></s:file> <s:textfield name="caption" label="Caption"></s:textfield> <s:submit label="提交"></s:submit> </s:form> </body> </html>
2.ShowUpload.jsp的功能清单如下:
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@ taglib prefix="s" uri="/struts-tags" %>
- <html>
- <head>
- <title>ShowUpload</title>
- </head>
- <body>
- <div style ="padding: 3px; border: solid 1px #cccccc; text-align: center" >
- <img src ='UploadImages/<s:property value ="imageFileName"/> '/>
- <br />
- <s:property value ="caption"/>
- </div >
- </body>
- </html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>ShowUpload</title> </head> <body> <div style ="padding: 3px; border: solid 1px #cccccc; text-align: center" > <img src ='UploadImages/<s:property value ="imageFileName"/> '/> <br /> <s:property value ="caption"/> </div > </body> </html>
3.FileUploadAction.java的代码清单如下 :
- package com.chris;
- import java.io.*;
- import java.util.Date;
- import org.apache.struts2.ServletActionContext;
- import com.opensymphony.xwork2.ActionSupport;
- public class FileUploadAction extends ActionSupport{
- private static final long serialVersionUID = 572146812454l ;
- private static final int BUFFER_SIZE = 16 * 1024 ;
- //注意,文件上传时<s:file/>同时与myFile,myFileContentType,myFileFileName绑定
- //所以同时要提供myFileContentType,myFileFileName的set方法
- private File myFile; //上传文件
- private String contentType;//上传文件类型
- private String fileName; //上传文件名
- private String imageFileName;
- private String caption;//文件说明,与页面属性绑定
- public void setMyFileContentType(String contentType) {
- System.out.println("contentType : " + contentType);
- this .contentType = contentType;
- }
- public void setMyFileFileName(String fileName) {
- System.out.println("FileName : " + fileName);
- this .fileName = fileName;
- }
- public void setMyFile(File myFile) {
- this .myFile = myFile;
- }
- public String getImageFileName() {
- return imageFileName;
- }
- public String getCaption() {
- return caption;
- }
- public void setCaption(String caption) {
- this .caption = caption;
- }
- private static void copy(File src, File dst) {
- try {
- InputStream in = null ;
- OutputStream out = null ;
- try {
- in = new BufferedInputStream( new FileInputStream(src), BUFFER_SIZE);
- out = new BufferedOutputStream( new FileOutputStream(dst), BUFFER_SIZE);
-
byte [] bu
发表评论
-
struts2 工作原理(配合工作原理流程图)
2011-09-12 09:52 1407------------------------------- ... -
Struts通配符
2011-09-09 17:05 970如struts中配有如下几个action,Man ... -
struts2中使用ModelDriven
2011-09-09 16:19 757在Struts 2中,提供了另外一种直接使用领域对象的方式 ... -
OGNL使用小结
2011-09-08 16:24 706最近一直使用struts2,表现层采用JSP,用的st ... -
OGNL 详细资料
2011-05-05 16:46 1029OGNL是XWork引入的一个非常有效的数据处理的工具。我们已 ... -
OGNL学习笔记
2011-05-05 13:00 797Java代码 <%@ page ... -
sruts2.0 web.xml 配置文件
2011-05-04 16:51 1044任何MVC框架都需要与Web ... -
Sturt2-文件上传
2011-05-02 09:55 9061、新建文件夹upload内含upload.jsp,res ... -
Sturt2-文件下载
2011-05-02 09:53 912Java代码 <body> ... -
搭建一个Struts2项目的开发环境,你知道多少呢?
2011-05-02 09:25 820搭建一个Struts2项目的开发环境时,我们一般需要做以下 ... -
仿百度、google分页的实现
2011-05-02 09:23 1091前段时间写了个仿百度、google分页,现 ... -
struts2详解(二)---->>单个文件上传
2011-05-02 09:20 800实现原理: Struts 2是通过Commons ... -
struts2文件上传的采用的三种方式解析
2011-05-02 09:18 730struts2文件上传的采用的三种方式解析 文件 ... -
基于 Struts 2 拦截器实现细粒度的基于角色的存取控制
2011-05-02 08:55 602本文介绍如何利用 Struts ... -
详解Struts1在web.xml中的基本配置
2011-05-02 08:53 976<servlet> <ser ... -
Struts 工作原理
2011-05-02 08:43 950MVC即Model-View-Controller的 ... -
struts1 struts-config.xml 详细介绍
2011-05-02 08:30 951关于struts1的struts-config.x ... -
struts1 struts2 区别 整理
2011-05-02 08:28 601Action 类:• Struts1要求Act ... -
struts2+fckeditor 注意要点
2011-05-01 18:46 834fckeditor是老外的东西,跟struts2配合时,要多注 ... -
过滤器和拦截器的区别
2011-05-01 18:23 1577Java代码 过滤器和拦截器的区别 ...
相关推荐
jsp中 struts1.2 包 asdasdasd dasd a
ext+struts1.2图书管理系统让你了解ext框架以及与struts1.2的整合
公文管理、申请审批、公告管理、会议管理、权限管理、个人办公、客户管理、人事等等。项目技术:Struts1.2 + Hibernate3.0 + Spring2 +DWR。java毕业设计 jsp毕业设计 ssh毕业设计
jsp+myeclispe+struts1.2登陆例子jsp+myeclispe+struts1.2登陆例子jsp+myeclispe+struts1.2登陆例子
四个页面:index.jsp logon.jsp show.jsp error.jsp 两个Form:RootForm.java LogonForm.java 两个Action:RootAction.java LogonForm.java 说明文档链接:...
绝对经典的struts1.2+ajax+jsp+sql2000开发的课程设计的好题目。。
一个简单的bbs论坛,jsp + struts 1.2
struts1.2、jstl、jsp三种标签教程
myeclipse 工程 上传页:index.html ...一个是 jspsmart + strust 1.2 另一个用的 struts 自带的 formfile 环境:winxp jdk1.4.2 tomcat5.0或weblogic8.1 发布前,最好先编译一下,毕竟JDK版本太老了
学习对象:熟悉JavaScript, 了解JSTL, servlet/JSP, Struts 1.2, Hibernate, Spring, Ajax技术。 该示例使用MyEclipse 5.5 IDE用来整合四个技术(Struts 1.2, Spring 2.0, Hibernate 3.2和Ajax技术)的轻量级的...
struts1.2 图片文件上传(单个/动态多个) 单个的采用通用Action 需要ActionForm的,而动态多个上传是采用动态代理类(DispatchAction) 希望对大家有用,另JSP在IE测试通过,JS我就不再处理了!
★ JSP调用页面(全面支持struts1.2)(增、删、改、查),分页功能自动实现 (如果数据库是sqlserver,又需要分页的,请使用sqlserver2005) 2、特色 ☆ 一键生成,简洁使用。 ☆ 生成的代码全部开源,没有任何通过...
系统分析一个完整的电子商城系统包括信息流。资金流与物理流3个要素,3者相符相成。信息流就是通过电子网络向客户展示所售商品的相关信息
Jsp+JavaBean+Struts1.2+MySQL5.0购物网,可以作为毕业设计,错过是你遗憾
在线音乐吧,包含需求,各种图,源码, JSP + Struts + SQL Server 2005
数据库jar都在里边,项目发布就可以运行 系统采用java+struts1.2+jsp+SqlServer 带数据库文件
OA办公自动化管理系统(Struts1.2+Hibernate3.0+Spring2+DWR)是一个基于Java EE技术的Web应用系统,旨在提高企事业单位的工作效率和管理水平。该项目采用了Struts1.2作为前端框架,Hibernate3.0作为数据库持久层...
利用 struts1.2 + Hibernate + Ajax 实现省市县的三级联动,具体利用Ajax 的功能把从后台数据库中查询出所对应的结果存放进XML中的值取出显示到前台
里面为struts1.2+spring+hibernate 编写的简单的单表和多表维护,多表带个简单的excel报表生成,忙活了一阵的成果吧 进入地址为工程名/main.jsp
jsp源码OA办公自动化管理系统(Struts1.2+Hibernate3.0+Spring2+DWR)本资源系百度网盘分享地址