• 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

restarting tomcat??

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I would like to know if there is a way to refresh included files in a jsp without restarting Tomcat.
This is a problem for me because
1) I don't want to wipe out all the active sessions on the server
2) When I do restart Tomcat, it doesn't always pick up on the changes in the include file; it keeps using the older versions. Does anyone know why this is??
Thanks very much
-Zman
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are not being very specific on what are you trying to accomplish. More details would be much more helpful for everyone in order to give you more answers.
m, phx
 
scottie zman
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yea I guess it was kind of abiguous. I'm new to JSP and I'm basically trying to accomplish some similar results (to start with, anyway) as what I'm able to get with asp.
The thing about includes in JSP is that once you compile the page it doesn't check to see if the included file ever changes. Since the posting of my last message, I've learned about using dynamic includes, which are a bit better, but those don't have any session scope other than explicit parameters sent to it. And it doesn't seem that I could pass any objects or result sets or xml to a dynamically included file (please correct me if I'm wrong)
Basically, what I'm trying to accomplish is...
to have a chunk of code -- jsp/html that is within the scope of the page/session that I can include into a jsp, and update at any time without restarting the server.
I'm still wrapping my head around tag libraries- can this be accomplished with them? or do I just have to write a bean that produces the html? that seems like it would be a bad idea. I'm sure there's a way of doing this...
thanks
Zman
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can pass parameters to the included resource.

The included resource has the request/response object of the including resource. Also you can pass in other parameters, but as far as i know, they can only be name/value string parameters.

Check this post out (my posts are at the bottom) http://www.javaranch.com/ubb/Forum7/HTML/004785.html
the part that would interest you is in my last post, where I (painfully) describe that something that is statically included can still contain dynamic content. Or.. you can dynamically include both static and dynamic content.

However, the catch being... is your servlet runner smart enough to know that when jasper (the JSP compiler) is going out to fetch the jsp to be 'dynamically included'... will it check to see if THIS resource needs to be recompiled? In other words, do you need to access the included resource individually to enable the servlet runner's 'smart' checking of "has this changed or not". I would hope it would do the dynamic include properly (ie: if you change the included file, it would pick up those changes), but I admit I've never tried it.

Hope that helped.
[This message has been edited by Mike Curwen (edited August 25, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic