|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi
This is a simple problem that crops up every so often and i'm never sure how to rectify it. I have a jsp page (page1) with a jsp include file (page2). When I change the include file and save it I expect to see the changes reflected in page1 when I reload it, however this doesn't always happen. I stop and start tomcat, delete my work folder, reboot, stamp my feet and sometimes it cures it but not today. What am I doing wrong? |
|
#2
|
|||
|
|||
|
Thats great, thanks. Will it have any effect on the speed of the app?
|
|
#3
|
|||
|
|||
|
Sorry about that, I left my computer unattended for a second and someone thought it would be funny to delete my reply
You will lose a little speed because you are compiling at runtime, but I don't think that it will be significant. Also, have tried compiling the individual include files before trying to view through the main jsp file?? |
|
#4
|
|||
|
|||
|
how would I compile them? I only compile my class files, I save my jsp files, am I missing something...
|
|
#5
|
|||
|
|||
|
Sorry I should of been clearer. JSP files are compiled once, the first time you view the page. So what I was trying to say is, try viewing the individual jsp pages you have changed, before viewing them within the main page.
|
|
#6
|
|||
|
|||
|
thanks a lot for your help, I'll try that.
|
|
#7
|
|||
|
|||
|
jhazard,
the changes in the includes will only be reflected in the overall page if the file that is doing the including changes too. so, to come back to your initial example, if you edit "page2" and resave it, also resave "page1" (some editors make this a hassle - i've been using dreamweaver mx recently, and i can just a space/char and then remove it again, and it'll allow me to re-save). that way, your app server sees that "page1" has changed and recompiles it - giving you the changes you made in "page2" in the final page.
__________________
Little more than a playground for the bugs that live beneath us... |
|
#8
|
|||
|
|||
|
What application server are you using? I know Tomcat 4.x can be setup to reload .class files when they are recompiled (I'd assume it would catch included jsps as well).
__________________
-james |
|
#9
|
|||
|
|||
|
thats interesting, tomcat 4.04
|
|
#10
|
|||
|
|||
|
There's a reloadable attribute in the context tag in your server.xml file. Make sure it's set to "true". If it's *already* true, well, then I guess you're stuck
. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Include file not changing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|