- 博客(4)
- 收藏
- 关注
原创 对任意目录中的文件提供下载服务
我们有两种方式: 1.递归操作文件(不提议使用,因为递归太耗空间资源,所以递归容易造成栈内存溢出) 2.接住队列来操作文件下载 在这里使用第二种方式: 1.得到根目录 2.将更目录添加到队列中 3.判断目录是否空目录 如果是空目录,无理采 如果该目录中文件,就将该目录从队列中删除,并得到该目录的引用,得到该目录中的文件,然后遍历显示即可 队列的方法: add...
2020-06-16 20:28:56 228
原创 Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
在comcat报错:Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7.
2020-06-16 19:21:00 178
原创 文件下载
String filename = request.getParameter("path"); String path = getServletContext().getRealPath(filename); //User-Agent Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/77.0 //浏览器的种类 String web = request.getHeader("U...
2020-06-16 19:20:13 80
原创 文件上传
jsp页页面: <c:if test="${not empty msg }"> <div style="color:red;">${msg }</div> </c:if> <form action=" ${pageContext.request.contextPath }/fleUPload" method="post" enctype="multipart/form-data"> <input type="file" na...
2020-06-16 19:19:43 186
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人