Note that there are some explanatory texts on larger screens.

plurals
  1. POcache control on subdomain in Tomcat 7
    primarykey
    data
    text
    <p>I can handle cache on core domain say (www.domain.com) using below filter </p> <pre><code>public class cacheControl implements Filter{ FilterConfig filterConfig; public cacheControl() { filterConfig = null; } @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String sCache = filterConfig.getInitParameter("cache"); if (sCache != null) { Date _currentDate = new Date(); ((HttpServletResponse) response).setHeader("Cache-Control", sCache); ((HttpServletResponse) response).setHeader("Expires", new Date(_currentDate.getYear(), _currentDate.getMonth(), _currentDate.getDate() + 10).toString()); ((HttpServletResponse) response).setHeader("X-Content-Type-Options", "nosniff"); ((HttpServletResponse) response).setHeader("X-XSS-Protection", "1; mode=block"); ((HttpServletResponse) response).setHeader("X-Frame-Options", "SAMEORIGIN"); ((HttpServletResponse) response).setHeader("X-UA-Compatible", "IE=edge, chrome=1"); } chain.doFilter(request, response); } @Override public void destroy() { filterConfig = null; } } </code></pre> <p>But i put static content like javascripts, css, images on (static.domain.com) and I want to set expiry header for content coming from that static domain. I googled but there is no perfect solution. Please help me to set expiry header for static domain....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload