01 2014 档案
摘要:shangchuang.jsp(上传页面) chenggong.jsp(下载页面) 下载 CopyOfCopyOfShangAction.java(Action);(上传action)package com.file;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.util.ArrayList;import java.util.List;import org....
阅读全文
posted @ 2014-01-21 11:36
老汉!
摘要:ApplicationContext context =new ClassPathXmlApplicationContext("applicationContext.xml");
阅读全文
摘要:${pageContext.request.contextPath}
阅读全文
摘要:jsp; action; // 封装上传文件域的属性 private File image; // 封装上传文件类型的属性 private String imageContentType; // 封装上传文件名的属性 private String imageFileName; // // 接受依赖注入的属性 private String savePath;package com.file;import java.io.File;import java.io.FileInputStrea...
阅读全文
摘要:工厂设计模式,创建分发各种bean。配置好它们之间的写作关系,参与bean的生命周期。BeanFactory factory = new XmlBeanFactory(new ClassPathResource("applicationContext.xml"));bean工厂只把bean的定义信息载进来,用到的时候才实例化。factory.getBean("mybean");就可得到一个bean。三种经常用到的实现:1.ClassPathXmlApplicationContext:从类路径中加载。2.FileSystemXmlApplicationCo
阅读全文
摘要:public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException { // TODO Auto-generated method stub arg0.setCharacterEncoding("utf-8"); arg2.doFilter(arg0, arg1); arg1.setContentType("text/html...
阅读全文
摘要:package com.test;import java.util.List;import org.hibernate.HibernateException;import org.hibernate.Query;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.Transaction;import org.hibernate.cfg.Configuration;import com.hibernate.Usertest.Usertest;public class Test
阅读全文
摘要:dl.jsp; 用户登录 /yz.action" method="post"> 用户名 密码 action; private String name; private String password; private String tip; public String getTip() { return tip; } public void setTip(String tip) { this.tip = tip; } public String getName() { return name; } public void setName(String na.
阅读全文
摘要:dl页面;用户登录 /yz!login.action" method="post"> 用户名 密码 hy页面; /yz!reglster.action">退出 View Code Action ;package com.st.action;import com.opensymphony.xwork2.ActionSupport;public class YzAction extends ActionSupport { public String login() throws Exception { System.out.println(&qu
阅读全文
浙公网安备 33010602011771号