syspath

Locale locale = Locale.getDefault();
ResourceBundle localResource = ResourceBundle.getBundle("/syspath", locale);
String protocol = localResource.getString("protocol");
String host = localResource.getString("host");
String port = localResource.getString("port");
String projectname = localResource.getString("projectname");
String reqpath=protocol+"://"+host+":"+port+"/"+projectname;
this.getServletContext().setAttribute("reqpath", reqpath);


syspath
## reqpath: protool://hostname:port/projectname
protocol=http
host=localhost
port=80
projectname=mycom

你可能感兴趣的:(Path)