Jsp
royzhou20081011
这个作者很懒,什么都没留下…
展开
-
关于字符编码问题-完美解决方案
在做开发的过程中,难免会遇到了传参数出现字符乱码的问题。 使用过很多中解决方法,最后选择了下面这种…… 前台: var url = "myurl?method=mymethod&myparams"+encodeURI(encodeURI(myparam)); 注意这里必须经过两次编码。 后台: String myparams= URLDecoder.decod...2008-12-09 18:09:30 · 104 阅读 · 0 评论 -
JSP标签使用
1、开发自定义标签类,该类继承自javax.servlet.jsp.tagext.SimpleTagSupport 如果标签类包含属性,必须有对应的setter和getter方法 重写doTag()方法,负责生成页面内容 [code="java"] package com.royzhou.hello; import java.io.IOException; im...2009-06-22 10:06:36 · 93 阅读 · 0 评论 -
request.getRealPath(arg0); 报警告:
The method getRealPath(String) from the type ServletRequest is deprecated request.getRealPath("") 这个方法已经不推荐使用了,那代替它的是什么方法呢? Deprecated. As of Version 2.1 of the Java Servlet API, use ServletCont...原创 2009-02-20 10:26:15 · 99 阅读 · 0 评论 -
common-fileupload文件上传及下载
使用common-fileupload组建实现文件上传下载功能, 封装了一个WebFileService的类 [code="java"] import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; ...原创 2009-02-22 21:24:36 · 208 阅读 · 0 评论