Reload/Compile Jsp pages after updating XML file on webserver
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pete_London
Posted On:   Monday, April 4, 2011 10:30 AM

I am running a jsp page (with some jar files) on a Tomcat webserver. On the page I am updating a XML file on the server based on the users input. The XML file is successfully updated (as I can see the new lines when opening the file) but I can not access the inserted data through my jsp page afterwards. Only after restarting the server manually it detects the changes in the xml file and I can display the xml-data online. I read somewhere that a parameter called reloadable can be set in the context.xml file in the META-INF folder of the webapp, but it seems that it only detects changes in java class files and not in manipulated XML files. Is there a way to let the server know about the changes in the XML file and recompile the jsp files aut   More>>

I am running a jsp page (with some jar files) on a Tomcat webserver. On the page I am updating a XML file on the server based on the users input. The XML file is successfully updated (as I can see the new lines when opening the file) but I can not access the inserted data through my jsp page afterwards. Only after restarting the server manually it detects the changes in the xml file and I can display the xml-data online.

I read somewhere that a parameter called reloadable can be set in the context.xml file in the META-INF folder of the webapp, but it seems that it only detects changes in java class files and not in manipulated XML files.

Is there a way to let the server know about the changes in the XML file and recompile the jsp files automatically?

Thanks,

Pete

   <<Less

Re: Reload/Compile Jsp pages after updating XML file on webserver

Posted By:   tim_fox  
Posted On:   Tuesday, April 12, 2011 12:08 PM

Pete,


You may actually have a caching problem as opposed to a file system or server config issue. When you build JSP's that will likely display different data each time they are displayed, you need to tell both your browser and your server not to cache the page. Off the top of my head, I can't remember the HTML tags you need, but they are easy to find using our best friend Google. Make sure you use BOTH the client and server-side commands to disable caching of the pages.


Good Luck!


TGF

About | Sitemap | Contact