使用replaceAll()方法怎样将“/”字符替换为“\”字符呢?在线等待。。。 dirPath = dirPath.replaceAll("/","\\\\");转义再转义 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <%String dirPath = "/public/";out.println(dirPath+"<br/>");dirPath = dirPath.replaceAll("\\/","\\\\");out.println(dirPath+"<br/>");%>http://free86.x168.comhttp://freecn.dns0755.net:8080/testjsp/test.jsp String newdirPath = dirPath.replaceAll("/","\\");应该要这样,可能替换的时候,变量地址给改变问题 String newdirPath = dirPath.replaceAll('/','\\); String newdirPath = dirPath.replaceAll('/','\\'); 求个上传头像的flash插件 nested exception is java.sql.SQLException: 无法从套接字读取更多的数据 JS简单的判断 三天了还是实现不了,急求 JSP表单上传进度条 Ext+JS 怎么解决JPA Enitity的LAZY问题 jsp中的过滤器的问题 盘点机的读取 如何获取服务器域名?或者本地的域名 一个关于Bean的问题 高分求一个很简单的问题,哪里有jb7中的那个关于ejb的esite的开发过程的文档? 如何遍历一个树性表? 关于使用org.apache.commons.net.ftp下载gif图片文件的问题
String dirPath = "/public/";
out.println(dirPath+"<br/>");
dirPath = dirPath.replaceAll("\\/","\\\\");
out.println(dirPath+"<br/>");
%>http://free86.x168.com
http://freecn.dns0755.net:8080/testjsp/test.jsp
应该要这样,可能替换的时候,变量地址给改变问题