Thursday, August 25, 2011

Re: HTML5 Offline Web-Application

> Do I have to rename the returned offline manifest to match the name
> described in the HTML file? (appcache.nocache.manifest)

No,

1) get the servlet context at init time

private ServletContext context;
@Override public void init(FilterConfig arg0) throws ServletException {
context = arg0.getServletContext();

}

2) use that to forward the file
response.setContentType("text/cache-manifest");

context.getRequestDispatcher("/" +
"appcache.nocache.manifest.gecko1_8").include(request, response);

> Because now I return appcache.nocache.manifest.gecko1_8 for example...

If the request asks for appcache.nocach.manifest, then that is what
will be returned - athough the contexts will be
appcache.nocache.manifest.gecko1_8


Is appcache.nocache.manifest.gecko1_8 OK? It doens't have to end with
.manifest ??? I don't know that.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment