济宁嘉禾园小区:在bean中如何获得webroot路径

来源:百度文库 编辑:高校问答 时间:2024/10/03 15:53:16
在bean中如何获得webroot路径
很急啊!

private String serverRootPath;

public void setServerRootPath(String serverRootPath){
this.serverRootPath = serverRootPath;
}

JSP中取得WebRoot路径是request.getContextPath();