import javax.servlet.ServletContext;
import org.springframework.web.context.ServletContextAware;
/**
* @author Administrator
*
*/
public class PayUtil implements ServletContextAware{
public ServletContext context ;
public static String PATH = "";
/* (non-Javadoc)
* @see org.springframework.web.context.ServletContextAware#setServletContext(javax.servlet.ServletContext)
*/
public void setServletContext(ServletContext context) {
this.context = context;
}
public void myinit(){
PayUtil.PATH = context.getRealPath("");
}
}
PayUtil.PATH = D:\work\apache-tomcat-7.0.52\webapps\pra
时间: 2024-12-28 16:22:17