您的位置:首页 > 其它

weblogic和tomcat获取的应用路径不一样

2010-10-19 09:48 253 查看
tomcat获取路径时包括一个“/”

weblogic获取路径时不包括最后的“/”

String strVendor="weblogic";
//得到系统路径
if ("weblogic".equals(strVendor)){

ServletContext app=(ServletContext)pageContext.getServletContext();
String strSysPath = app.getRealPath("/") + "/NEUUpdate/";
}else{
ServletContext app=(ServletContext)pageContext.getServletContext();
String strSysPath = app.getRealPath("/") + "NEUUpdate/";
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: