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

相关文章:

  • 2021-11-29
  • 2021-07-19
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-02-07
  • 2022-12-23
  • 2021-11-27
  • 2021-11-29
  • 2021-11-30
相关资源
相似解决方案