ServletContext.getRealPath();java.lang.String getRealPath(java.lang.String path)
Returns a String containing the real path that corresponds to a virtual path.
Returns a String containing the real path that corresponds to a virtual path.
解决方案 »
- 使用jsp调用tag文件时浏览器显示中文乱码怎么办?
- js给html下拉框Select赋值不了
- tomcat的 Server Status
- (我是菜鸟级)struts2+spring+hibernate一个小问题
- 这两种编码的写法有什么不同,高手赐教。。
- <textarea name=blnr rows=4 cols=60 value=<%=blnr%>></textarea>内容只读如何设置?
- java.lang.reflect.InvocationTargetException
- [求助]为什么数据加不进去??
- 第一问:win98下,单机如何运行Jsp
- 学生求助-两个系统同步表,轮询?
- jsp中如何引用自编的JavaBeans?
- 如何用JSP实现在线人数统计?
The real path the servlet returns is in a form appropriate to the computer and operating system on which the servlet engine is running, including the proper path separators. This method returns null if the servlet engine cannot translate the virtual path to a real path for any reason.
ServletConfig config = this.getServletConfig();
ServletContext context = getServletContext();
String path = context.getRealPath("");
放一天让别人也看看,明天加分.