使用c:import 请求到旧资源

在使用c:import直接去请求资源,jsp渲染的仍是旧的资源缓存

解决方法:jsp

在请求页面时,能够加上随机数,如自动生成的时间戳,这样请求时每次都是新的url,就没必要从缓存中直接去取资源了this

用c:import标签请求缓存的缘由是源码中并无在url中加随机数的机制,因此才会出现这样的问题url

public void setUrl(String url) throws JspTagException {
        this.url = url;
    }资源

    // for tag attribute
    public void setContext(String context) throws JspTagException {
        this.context = context;
    }源码

    // for tag attribute
    public void setCharEncoding(String charEncoding) throws JspTagException {
        this.charEncoding = charEncoding;
    }io

相关文章
相关标签/搜索