📄 environment.java
字号:
package cn.myapps.constans;
/**
* The environment variable.
*/
public class Environment {
private String _wcpath;
private String _contextPath;
public Environment() {
}
public Environment(String wcpath) {
setWebcontextBasePath(wcpath);
}
/**
* @param wcpath
* The web context path.
*/
public void setWebcontextBasePath(String wcpath) {
_wcpath = wcpath;
}
/**
* Retrieve the web context path.
*
* @return The web context path.
*/
public String getWebcontextBasePath() {
return (_wcpath != null) ? _wcpath : "/";
}
/**
* Retrieve the web context physicsal path.
*
* @param path
* The web path.
* @return The web context physicsal path.
*/
public String getWebcontextRealPath(String path) {
return (path != null) ? getWebcontextBasePath() + path : null;
}
public String setContextPath(String cpath) {
return _contextPath = cpath;
}
public String getContextPath() {
return _contextPath;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -