最新回答 / 过客2015_YY
                                
                                                            第一个是你要下载的文件名,你要传到后台,后台再去按文件名找这个文件;第二个是页面显示的一个效果;也就是你在页面点击text.txt(第二个),后台就能拿到你传过来的第一个filename=text.txt参数。找不到文件肯定下载不了,会抛出异常
                            
                        
                        2016-11-14
                
            出错 strust Can not find a java.io.InputStream with the name [InputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
                
                    
                    2016-11-11
                
            <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
老师的源码中有这样的几句话,大家看一下,对应位置加进去就可以使用像老师使用那样的图片路径了。
                String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
老师的源码中有这样的几句话,大家看一下,对应位置加进去就可以使用像老师使用那样的图片路径了。
                    
                    2016-11-06
                
            ServletActionContext.getServletContext().getResourceAsStream("..")
                
                    
                    2016-11-05
                
            
                                已采纳回答 / Adam_Ming
                                
                                                            这是浏览器的安全策略导致的,提供一个我的解决方案吧:使用HTML5的FileReader这个API。思路就是将图片文件读取转为Base64,赋值给src属性。<...图片...>
                            
                        
                        2016-10-30
                
             
             
        












