Probably, I understated the problem. We were trying to download a jnlp file when user enters a URL. JNLP File is an XML Document. We have an attribute max-heap-size as part of a tag in JNLP File. When user hits a URL, we got to download the JNLP File. But before downloading to client, we got to modify the max-heap-size attribute if there was any user entered value for it(we have a separate gui where user can enter memory heap that client want to use).
So, whenever user hits the URL,
http://IP:PORT/Test we would download the JNLP file. We are doing post processing using a Filter to modify the response provided by JNLPDownloadServlet(provided by javawebstart) to make use of the user entered max-heap-size value.
For the first time, it works fine. But when i modified the max-heap-size thru the gui (same web-app with admin previlege) and tried to download this jnlp file, it was still using the same file. I found that it was not hitting the Filter every time.
As we are always requesting for a resource(Test.jnlp that is not at modified) I observed that HTTPServer caches the file and not at all forwarding the request to WebServer. Only if the request is forwarded to the webserver, it would try to download the jnlp file again.
As the resource is already cached and available with HTTP Server, request is served by HTTP Server. So, I introduced a servlet to solve this problem.
Thats where the proposed solution comes to picture.
So, From HTTP Server perspective, we would always be trying to execute a servlet and not a resource, so it is not caching the jnlp file. It always hits the servlet This solved caching problem.
Let me know if there is any drawback in this approach.
Thanks,
Balaji