E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
getRealPath()
生成静态文件,解决中文乱码
1.解决中文乱码的问题,需要考虑不同的字符集; 2.文件路径,需要考虑window和linux的兼容性,用File.separator String xmlPath = request.
getRealPath
lwt_cedric
·
2009-08-31 09:00
java
html
linux
xml
request.
getRealPath
()的替代方法
替代方法是: 写道 request.getSession().getServletContect().
getRealPath
()得到站点的绝对地址 在Servlet
tgyd2006
·
2009-08-25 15:00
struts
servlet
request.
getRealPath
()的替代方法
替代方法是: 写道 request.getSession().getServletContect().
getRealPath
()得到站点的绝对地址 在Servlet
tgyd2006
·
2009-08-25 15:00
struts
servlet
web获取项目绝对路径
ActionContext.getContext(); ServletContextsc=(ServletContext)ac.get(ServletActionContext.SERVLET_CONTEXT); Stringx=sc.
getRealPath
magicsa
·
2009-08-18 15:05
职场
休闲
Java在不同环境下获取当前路径的方法--this.getClass().getResource("")
在Servlet\Filter等Servlet web环境中,只要获得javax.servlet.ServletContext类型,则可以通过
getRealPath
("...
baiseda
·
2009-08-17 17:00
java
.net
Web
servlet
workflow
Java在不同环境下获取当前路径的方法--this.getClass().getResource("")
在Servlet/Filter等Servlet web环境中,只要获得javax.servlet.ServletContext类型,则可以通过
getRealPath
("...
chengxuetao
·
2009-08-17 17:00
getresource
在servlet中获得项目路径
servlet中获得项目绝对路径String filePath=this.getServletConfig().getServletContext().
getRealPath
("/"
lzkyo
·
2009-08-12 17:00
jsp
Web
servlet
在Java代码中获得WebRoot的物理路径
Servlet , Action , Controller, 或则Filter , Listener , 拦截器等相关类时, 我们只需要获得ServletContext, 然后通过ServletContext.
getRealPath
oldboy
·
2009-08-12 10:00
java
spring
应用服务器
Web
servlet
Html 相关知识总结
从request获取各种路径总结 从request获取各种路径总结 request.
getRealPath
("url");//虚拟目录映射为实际目录
381573578
·
2009-08-10 10:00
html
Web
Blog
struts2之路径问题
getContextPath() + "/"; String baseFullCxtPath = ServletActionContext.getServletContext().
getRealPath
peirenlei
·
2009-08-08 22:00
apache
tomcat
Java各种路径和参数
1.JSP中获得当前应用的相对路径和绝对路径: 根目录所对应的绝对路径:request.getRequestURI() 文件的绝对路径:application.
getRealPath
(request.getRequestURI
minner
·
2009-08-04 17:00
java
tomcat
虚拟机
weblogic
OS
servlet/jsp 获取绝对路径和相对路径
servlet中获得项目绝对路径 String filePath=this .getServletConfig().getServletContext().
getRealPath
wangxiaoxu
·
2009-08-03 16:00
jsp
Web
servlet
jsp获取当前目录下的文件和目录,获取windows盘符
判断是否为目录或是文件 4转换字符串方法toString (1) 创建一个file对象dir, 然后用listFiles()方法返回当前目录下所有文件 String path=request.
getRealPath
huibin
·
2009-07-31 18:00
html
jsp
windows
.net
Blog
jsp获取当前目录下的文件和目录,获取windows盘符
判断是否为目录或是文件 4转换字符串方法toString (1) 创建一个file对象dir, 然后用listFiles()方法返回当前目录下所有文件 String path=request.
getRealPath
huibin
·
2009-07-31 18:00
html
.net
jsp
windows
Blog
java web ServletContext.
getRealPath
(String str)方法的使用
由于数据库的配置我想做成配置在一个XML文件里,不过,怎么读取都不成功,,后来我在网上查找,通过下面的方式在servlet获取文件的绝对路径,不过由于多了一个/,还是错误 ServletContext context = getServletContext(); String path = context.ge
xuehu2009
·
2009-07-26 17:00
java
Web
xml
servlet
java web ServletContext.
getRealPath
(String str)方法的使用
由于数据库的配置我想做成配置在一个XML文件里,不过,怎么读取都不成功,,后来我在网上查找,通过下面的方式在servlet获取文件的绝对路径,不过由于多了一个/,还是错误 ServletContext context = getServletContext(); String path = context.ge
xuehu2009
·
2009-07-26 17:00
java
xml
Web
servlet
获取web服务器下的文件路径
获取web服务器项目的真实物理路径 request.getSession().getServletContext().
getRealPath
("/"); 一 相对路径的获得
learnmore
·
2009-07-20 13:00
jsp
Web
servlet里经常会用到一些GET方法
servletContext.getContextPath()= servletContext.
getRealPath
("/")=F:\ess-bra
bobbie.zou
·
2009-07-17 11:00
apache
tomcat
Web
servlet
F#
getRealPath
()过期解决方法
request.
getRealPath
("")这个方法已经不推荐使用了,那代替它的是什么方法呢?
jxst051665
·
2009-07-15 16:00
servlet
struts
获得tomcat 路径
publicStringgetSavePath(){ returnServletActionContext.getRequest().
getRealPath
(savePath); }
lick4050312
·
2009-07-15 13:00
tomcat
String
getRealPath
()获得是当前运行文件在服务器上的绝对路径
request.
getRealPath
()这个方法已经不推荐使用了,代替方法是:request.getSession().getServletContext().
getRealPath
() 在servlet
switzerland
·
2009-06-30 13:00
jsp SmartUpload 实现上传功能代码
上传页面");out.print("");}else{//取得文件的大小intfileSize=myFile.getSize();//保存路径Stringaa=getServletContext().
getRealPath
·
2009-06-24 11:31
Request中getContextPath、getServletPath、getRequestURI、request.
getRealPath
的区别
Request中getContextPath、getServletPath、getRequestURI、request.
getRealPath
的区别假定你的webapplication名称为news,你在浏览器中输入请求路径
yudaoai
·
2009-06-01 10:00
Web
浏览器
application
java相对路径与绝对路径
servlet中获得项目绝对路径 String filePath=this.getServletConfig().getServletContext().
getRealPath
("/"
leifeng2
·
2009-05-31 22:00
java
jsp
应用服务器
Web
servlet
request.
getRealPath
()的替代方法
获得要路径的几种方法1,request.
getRealPath
("/");这个方法已不推荐用2,在Servlet里用this.getServletContect().
getRealPath
("/");
alex197963
·
2009-05-31 20:00
servlet
struts
取发布路径-新建文件夹及文件
root=request.getSession().getServletContext().
getRealPath
("/upload/aaa");//项目发布路径(request.
getRealPath
chainli
·
2009-05-26 18:46
职场
休闲
Struts2中获取当前工程的绝对路径
Action中有时候需要获取当前工程的绝对路径,具体实现: String projectRealPath= ServletActionContext.getServletContext().
getRealPath
njyu
·
2009-05-26 01:00
apache
tomcat
一个项目中调用另外一个项目中下载文件的servlet来下载本项目中的资源
int s = context.
getRealPath
("/").lastIndexOf("web_upload");String downloadpath =
jinchun1223
·
2009-05-11 16:00
Web
servlet
jsp动态生成xml文件
strXML.append("");strXML.append("");//out.print(strXML);try{Stringxml=newString(strXML);Stringpath=request.
getRealPath
happypolo
·
2009-05-07 08:00
tomcat
xml
jsp
String
url
encoding
在spring的bean中获取ServletContext
进而引申到我需要知道servletContext,因为servletContext有一个servletContext.
getRealPath
("/");方法,这个方法就能获取项目的绝对路径。
kongqz
·
2009-04-28 11:00
spring
bean
应用服务器
单元测试
Google
JUnit
Java在不同环境下获取当前路径的方法
在Servlet\Filter等Servlet web环境中,只要获得javax.servlet.ServletContext类型,则可以通过
getRealPath
("...
marb
·
2009-04-27 14:00
java
Web
.net
workflow
servlet
jsp获取当前目录下的文件和目录,获取windows盘符
isFile()方法判断是否为目录或是文件4转换字符串方法toString(1)创建一个file对象dir,然后用listFiles()方法返回当前目录下所有文件Stringpath=request.
getRealPath
huoyuming
·
2009-04-16 21:00
windows
jsp
String
File
Path
border
java 获取路径
(1)、request.
getRealPath
("/");  
geeksun
·
2009-03-27 19:00
java
tomcat
编程
jsp
Web
request.
getRealPath
("")
request.
getRealPath
("") 就是取得你当前运行文件在服务器上的绝对路径. request.
getRealPath
("/") 取得当前站点的根目录
sunxin1001
·
2009-03-21 11:00
request
java web工程中获取根目录的方法
1若是在JSP或是servlet中要获得虚拟根目录的话,可以使用config.getServletContext().
getRealPath
("/")或者是application.
getRealPath
xiao_jun_0820
·
2009-03-11 10:00
java
jsp
Web
servlet
String
Path
获取web工程绝对路径
//获取web工程绝对路径StringabsPath=new java.io.File(application().
getRealPath
(request().getRequestURI())).
lenolong
·
2009-03-04 20:00
jxl学习笔记
commons-fileupload-1.2.jar,commons-io-1.3.2.jar 2.检测文件格式等,上传到服务器文件夹 path = getServletContext().
getRealPath
guodongbingtuan
·
2009-02-25 18:00
sql
mysql
jsp
Excel
在Java代码中获得WebRoot的物理路径
Servlet , Action , Controller, 或则Filter , Listener , 拦截器等相关类时, 我们只需要获得ServletContext, 然后通过ServletContext.
getRealPath
zhykhs
·
2009-02-24 17:00
java
spring
应用服务器
Web
servlet
如何将java中的反斜线替换为"/"
在windows下使用request.
getRealPath
()获得的路径是反斜线,如何将反斜线替换为"/"呢?
txf2004
·
2009-02-22 15:00
java
C++
c
windows
C#
如何将java中的反斜线替换为"/"
在windows下使用request.
getRealPath
()获得的路径是反斜线,如何将反斜线替换为"/"呢?
cjc
·
2009-02-22 15:00
java
C++
c
windows
C#
如何将java中的反斜线替换为"/"
阅读更多在windows下使用request.
getRealPath
()获得的路径是反斜线,如何将反斜线替换为"/"呢?
cjc
·
2009-02-22 15:00
Java
Windows
C
C++
C#
如何将java中的反斜线替换为"/"
在windows下使用request.
getRealPath
()获得的路径是反斜线,如何将反斜线替换为"/"呢?
baozhengw
·
2009-02-22 15:00
java
c
windows
String
JAVA路径
在Web应用中,一般使用request.getSession(true).getServletContext().
getRealPath
("/")得到Web应用的根目录的绝对路径
trwhoya
·
2009-02-20 15:00
request.
getRealPath
(arg0); 报警告:
The method
getRealPath
(String) from the type ServletRequest is deprecated request.
getRealPath
("
royzhou1985
·
2009-02-20 10:00
java
struts
servlet
idea
jsp获取当前目录下的文件和目录,获取windows盘符
isFile()方法判断是否为目录或是文件4转换字符串方法toString(1)创建一个file对象dir,然后用listFiles()方法返回当前目录下所有文件Stringpath=request.
getRealPath
huoyuming
·
2009-02-19 16:00
windows
jsp
String
File
Path
border
web开发中的几种路径
(转帖)WEB中的几种路径: servletContext.
getRealPath
("/") , 这个是得到应用的绝对路径, 比如:F:\apache-tomcat-5.5.17
honda418
·
2009-02-17 17:00
apache
tomcat
Web
jsp
workflow
JSP中与路径相关的常用的几个方法 转
test.jsp --> application-javax.servlet.ServletContext application.
getRealPath
笔记本
·
2009-02-11 11:00
JSP中与路径相关的常用的几个方法
test.jsp --> application-javax.servlet.ServletContext application.
getRealPath
liguohuaty
·
2009-02-10 16:00
Quartz取本項目路徑的問題
但是在輸出報表的時候,發現 ServletActionContext.getServletContext().
getRealPath
("/") 獲取不到本 web 的根目錄。
xuganggogo
·
2009-02-01 16:00
Web
框架
quartz
Blog
F#
操作文件的方法集合
包括文件的建立/检查与删除,目录的建立/检查与删除,取出目录中文件,文件属性的取得,对文件数据进行读写等等: 文件路径问题: 绝对路径如:E:\\test 在JSP中String path=request.
getRealPath
siye1982
·
2009-02-01 15:00
C++
c
servlet
C#
F#
上一页
17
18
19
20
21
22
23
24
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他