JavaWeb
文章平均质量分 56
铁血小煜
这个作者很懒,什么都没留下…
展开
-
strut2下载文件
strut2下载文件 public String downFruit(){ Map map = iProductServ.downFruitPath(fruitid); HttpServletResponse resp = ServletActionContext.getResponse(); OutputStream out;//输出响应正文的输出流原创 2015-03-29 17:09:06 · 530 阅读 · 0 评论 -
读取src下的配置文件
db.properties为src下的数据库配置文件,路径为config/props/db.properties //读取数据库配置文件 public List readDbProps(){ List propList = new ArrayList(); ClassLoader classLoader = DBConnection.class.getClassLoader();原创 2015-03-29 17:05:53 · 520 阅读 · 0 评论 -
myeclipse不能部署项目Undefined exploded archive location
当点击 myeclipse提示Undefined exploded archive location原创 2014-08-28 16:09:33 · 590 阅读 · 0 评论 -
hibernate hql 查询前N条数据 和后N条数据
public List findTop10Metadata(){ return (List)this.getHibernateTemplate().execute(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException {原创 2014-07-29 09:57:19 · 2137 阅读 · 0 评论 -
MD5Util加密
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public final class MD5Util { public static String getMD5(String str){ String reStr=null; try { //创建具有指定算法名称原创 2014-06-27 15:36:08 · 825 阅读 · 0 评论 -
javaweb实现文件夹上传
function selectpath(){ var Oh= new ActiveXObject("Shell.Application"); var ob=Oh.BrowseForFolder(0,"Select the Directory",0,""); if(ob&&ob.Items()&&ob.Items().Item()) {原创 2014-06-27 15:29:55 · 1175 阅读 · 0 评论 -
java mysql备份和恢复
import java.io.File; import java.io.IOException; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.Map; import java.util.Properties; import org.apache.struts2.S原创 2014-06-27 15:19:12 · 433 阅读 · 0 评论 -
javaweb发送邮件
注意: 1.要开启邮箱里的 POP3/STAMP 选项 ,否则收不到邮件。 2.原创 2014-06-25 20:13:38 · 737 阅读 · 0 评论