摘要:eclipse项目发布到tomcat后的默认部署路径是不确定的,但是可以通过在项目中打印的方式显示eclipse默认的部署路径,比如在springmvc中String basePath=ContextLoader.getCurrentWebApplicationContext().getServletContext().getRealPath("/") ;System.out.println(basePath);这样就可以在控制台看到路径了。
阅读全文
摘要:http://olex.openlogic.com/packages/jetty#package_detail_tabs
阅读全文
摘要:在ssh框架下使用ajax ,success error 方法都没有执行,大概是前台没有从输出流中得到任何数据,所以success和error方法都没有执行。这个时候想输出流中写一些数据,比如使用 PrintWriter writer = ServletActionContext.getResponse().getWriter(); writer.print("success"); return null;上面那样就可以了。
阅读全文
摘要:json-lib 之jsonConfig详细使用
阅读全文
摘要:http://www.cnblogs.com/leshem/archive/2009/09/28/1575792.html
阅读全文
摘要:http://blog.csdn.net/c5153000/article/details/7255233http://tchen8.iteye.com/blog/1041067
阅读全文
摘要:http://blog.csdn.net/kingviker/article/details/7476403
阅读全文
摘要:String path= ContextLoader.getCurrentWebApplicationContext().getServletContext().getRealPath("/WEB-INF/spring/config.properties") ; Properties p=new Properties(); try { p.load(new FileInputStream(path)); System.out.println(p.getProperty("uploadPath")); } catch (Exception e) { e.p
阅读全文
摘要:response.setContentType("text/plain; charset=utf-8"); PrintWriter pw = response.getWriter(); response.setContentType一定要放在response.getWriter()的前边。
阅读全文
摘要:ServletActionContext.getServletContext().getRealPath("/upload/index");
阅读全文
摘要:http://blog.csdn.net/zjl_wzw/article/details/3041349http://wenku.baidu.com/view/e3e0257c8e9951e79b892798.htmlhttp://blog.sina.com.cn/s/blog_9844e5a8010108f3.html
阅读全文
摘要:http://www.cnblogs.com/kunpengit/archive/2011/12/13/2285933.html
阅读全文
摘要:Eclipse中工程重命名后,启动tomcat,出现异常:Sep 8, 2011 1:41:52 PM org.apache.catalina.startup.ContextConfig parseWebXmlSEVERE: Parse error in application web.xml file at jndi:/localhost/gzpetro-portal/WEB-INF/web.xmljava.lang.IllegalArgumentException: Can't convert argument: nullat org.apache.tomcat.util.dige
阅读全文
摘要:<%@ page contentType="application/vnd.ms-word; charset=utf-8"%><%@ page pageEncoding="utf-8"%> <% String fileName = "jsp导出word.doc"; //对中文文件名编码 //fileName = URLEncoder.encode(fileName, "utf-8"); byte[] yte = fileName.getBytes("GB2312")
阅读全文
摘要:utf8和UTF-8的不同,像下面这种情况,就要用UTF-8,而mysql中可能有要用到utf8struts2base1 @Action(value="m3",results={@Result(name="method3",type="redirect",location="${url}")}) public String method3() throws IOException { String username="中国"; username=URLEncoder.encode(usernam
阅读全文
摘要:如果json传值出现了乱码,多半是因为response没有进行编码设置: response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8");
阅读全文
摘要:http://sunjun041640.blog.163.com/blog/static/2562683220080154293363/
阅读全文
摘要:http://sarin.iteye.com/blog/685354
阅读全文
摘要:http://www.javawind.net/help/html/jstl_el.htm
阅读全文
摘要:http://wenda.tianya.cn/question/7ade6dc9324bed88
阅读全文