• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A few Quick questions..

 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(1) How does the webserver decide when to recompile a JSP?
(2) Is it by the timestamp? If yes will this be true for all webservers or is this vendor-specific?
(3) Also how does the "reloadable" context property affect this decision of the webserver (to recompile)?
(4) And lastly in my deliverables (to customer) should this reloadable property be set to "false". Is there any disadvantage if it is kept "true"?
Thanks for your time ranchers.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to Sun (http://java.sun.com/blueprints/qanda/web_tier/#reload):
"The JSP 1.1 specification does not require dynamic reloading (automatic recompile of modified JSP pages). Many servers cache compiled JSP pages in memory to improve performance, and require some explicit operation (such as an explicit reload, or even a server restart) to reload a changed page."
So you should never count on a page's being recompiled if it changes (or on its not being recompiled, for that matter). Also, Tomcat's server.xml file is vendor-specific, so its Context directives may not be the same as other vendors' directives.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know if this is any use to you use the following code to force the page to be recompiled each time:
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Setting attributes on the Response Header does not force the recompile of the JSP pages it just prevents the page being cache in the client's browser cache. This means that the next time the client visits the URL the browser will be forced to send a request to the WebServer rather than just display the locally cached version.
As Gary stated there is no universal way to ensure that the JSP pages are being recompiled. Each vendor has their own settings.
reply
    Bookmark Topic Watch Topic
  • New Topic