﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-随风伴云-最新评论</title><link>http://www.blogjava.net/illu/CommentsRSS.aspx</link><description>磨练在生活的谷底</description><language>zh-cn</language><pubDate>Fri, 13 Aug 2010 08:55:10 GMT</pubDate><lastBuildDate>Fri, 13 Aug 2010 08:55:10 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: getOutputStream() has already been called for this response 的解决方法</title><link>http://www.blogjava.net/illu/archive/2010/06/02/236400.html#322570</link><dc:creator>007</dc:creator><author>007</author><pubDate>Wed, 02 Jun 2010 07:23:00 GMT</pubDate><guid>http://www.blogjava.net/illu/archive/2010/06/02/236400.html#322570</guid><description><![CDATA[        try {<br>        	//创建一个带有路径的文件<br>            File f = new File(fileDiskURL+fileName);//getDataExtractPath()<br>            <br>            //创建一个与文件对应的输入流 <br>            FileInputStream in = new FileInputStream(f);<br>            //得到一个响应，并对响应进行各种设置<br>            HttpServletResponse response = ServletActionContext.getResponse();<br>            response.setContentType(&quot;application/octet-stream&quot;);<br>            response.setHeader(&quot;Content-Disposition&quot;, &quot;attachment; filename=&quot; + new String(fileName.getBytes(&quot;ISO-8859-1&quot;),&quot;GBK&quot;));<br>            //fetch the file<br>//            OutputStream op = response.getOutputStream();<br>//            byte[] buf = new byte[in.available()];<br>//            in.read(buf);<br>//            op.write(buf);<br>//            in.close();<br>//            op.flush();<br>//            op.close();        <br>            System.out.println(&quot;aaaaaaaaaaa11111111111aaaaaaaaaaaaaa&quot;);<br>            int length = (int) f.length();<br>            if (length != 0) {<br>                byte[] buf = new byte[4096];<br>                OutputStream op = response.getOutputStream();<br>//把ServletOutputStream 换成 java.io里的outputstream就可以了<br>                //ServletOutputStream op = response.getOutputStream();<br>                while ((in != null) &amp;&amp; ((length = in.read(buf)) != -1)) {<br>                    op.write(buf, 0, length);<br>                }<br>                in.close();<br>                op.flush();<br>                op.close();<br>            }<br>            return true;<br>        } catch (FileNotFoundException e) {<br>        	e.printStackTrace();<br>        	return false;<br>        } catch (IOException e) {<br>			e.printStackTrace();<br>			return false;<br>		}<img src ="http://www.blogjava.net/illu/aggbug/322570.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/illu/" target="_blank">007</a> 2010-06-02 15:23 <a href="http://www.blogjava.net/illu/archive/2010/06/02/236400.html#322570#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案</title><link>http://www.blogjava.net/illu/archive/2010/03/13/236419.html#315350</link><dc:creator>Josh</dc:creator><author>Josh</author><pubDate>Sat, 13 Mar 2010 15:57:00 GMT</pubDate><guid>http://www.blogjava.net/illu/archive/2010/03/13/236419.html#315350</guid><description><![CDATA[	&lt;listener&gt;<br>		&lt;listener-class&gt;<br>			org.springframework.web.context.ContextLoaderServlet<br>		&lt;/listener-class&gt;<br>	&lt;/listener&gt;<br>	<br>&lt;context-param&gt;<br>   &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br>   &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;<br>  &lt;/context-param&gt;<br><br>要记住顺序，先监听，后面再写applicationContext.xml<img src ="http://www.blogjava.net/illu/aggbug/315350.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/illu/" target="_blank">Josh</a> 2010-03-13 23:57 <a href="http://www.blogjava.net/illu/archive/2010/03/13/236419.html#315350#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: getOutputStream() has already been called for this response 的解决方法</title><link>http://www.blogjava.net/illu/archive/2009/08/21/236400.html#292158</link><dc:creator>蓝鱼</dc:creator><author>蓝鱼</author><pubDate>Fri, 21 Aug 2009 12:42:00 GMT</pubDate><guid>http://www.blogjava.net/illu/archive/2009/08/21/236400.html#292158</guid><description><![CDATA[受用了！！<img src ="http://www.blogjava.net/illu/aggbug/292158.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/illu/" target="_blank">蓝鱼</a> 2009-08-21 20:42 <a href="http://www.blogjava.net/illu/archive/2009/08/21/236400.html#292158#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 很囧的Error creating form bean of class。。。</title><link>http://www.blogjava.net/illu/archive/2009/01/09/219320.html#250665</link><dc:creator>宁夏</dc:creator><author>宁夏</author><pubDate>Fri, 09 Jan 2009 05:26:00 GMT</pubDate><guid>http://www.blogjava.net/illu/archive/2009/01/09/219320.html#250665</guid><description><![CDATA[我的是包重复了！他不认默认包！所以也是没编译！<img src ="http://www.blogjava.net/illu/aggbug/250665.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/illu/" target="_blank">宁夏</a> 2009-01-09 13:26 <a href="http://www.blogjava.net/illu/archive/2009/01/09/219320.html#250665#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>