在jsp页面中:
<%
String path = application.getRealPath("").replace("\\","\\\\");
%>
在java代码中:
String path = request.getServletContext().getRealPath("").replace("\\","\\\\");微信扫一扫
在jsp页面中:
<%
String path = application.getRealPath("").replace("\\","\\\\");
%>
在java代码中:
String path = request.getServletContext().getRealPath("").replace("\\","\\\\");相关推荐