
Servlet
文章平均质量分 72
mikyz
这个作者很懒,什么都没留下…
展开
-
getAttribute & getParameter
1.getAttribute是取得jsp中 用setAttribute設定的attribute 2.parameter得到的是string;attribute得到的是object 3.request.getParameter()方法传递的数据,会从Web客户端传到Web服务器端,代表HTTP请求数据; request.setAttribute()和getAttribute()方法传递的数据只原创 2017-04-06 17:00:31 · 291 阅读 · 0 评论 -
ServletFileUpload.parseRequest()得不到请求内容
public void upload(HttpServletRequest request, HttpServletResponse response){ //创建解析工厂 DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setRepository(new File(this.getServletC原创 2017-04-06 17:00:20 · 5937 阅读 · 0 评论 -
exception: cannot find actionmappings or actionformbeans collection
多种情况会导致这个问题,但大致就是以下几种情况: 1。Web.xml未初始化问题 少了一个0 这样开始是没有加载这个类,就没有初始化struts-config.xml,所以找不到 actionmappings or actionformbeans collection。 2。struts-config.xml问题 3。jar包不全或版本不对 也有可能导致这个问题,从原创 2017-04-06 17:01:56 · 349 阅读 · 0 评论 -
getOutputStream() has already been called for this response
java.lang.IllegalStateException: getOutputStream() has already been called for this response getOutputStream() has already been called for this response问题的解决在jsp向页面输出图片的时候,使用response.getOutputStre原创 2017-04-06 17:02:17 · 503 阅读 · 0 评论