Help coderanch get a
new server
by contributing to the fundraiser
  • 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

Facing problem with jsp:include tag

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently I am developing a online shop which helps in user buying different products.

I have a main template which is common to all the pages. This template includes header, footer, main contents dynamically at run time based on conditions.

The header and footer files are stored as html files and sometimes their contents will be updated dynamically by other programs.

I expect the changes to header and footer to be reflected in the pages whenever its been changed, but its not happening currently. I've to restart the application everytime to make the new changes appear in the pages.

Can someone explain this behaviour and is there any workaround to this problem ?
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jsp:include is suppose to be dynamic in nature. Can you try using c:import instead?

I think there might be some container setting which can help to determine the file being dynamically imported.

Lets wait for more inputs from others and in the mean time try out c:import
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a caching issue to me.
 
Ramkumar Rao
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. I tried using <%@ import %> tag and still the result is same.

Also after using the import tag and updating the timestamp of the main_template.jsp page, I had a check at the generate servlet class file and it contains the modified HTML data. But the same is not been reflected in the pages.

I tried clearing off the cache, cookies and other things. But none of it worked, it looks like caching issue in server side. Any suggestions to overcome this is well appreciated
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you try deleting your generated jsp's class file and java file? you'll find them under work directory of your server.
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try clearing the cache and using include
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic