#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0

    Smile Include file not changing


    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. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    Thats great, thanks. Will it have any effect on the speed of the app?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    United States of Europe (USE)
    Posts
    4
    Rep Power
    0
    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??
  6. #4
  7. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    how would I compile them? I only compile my class files, I save my jsp files, am I missing something...
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    United States of Europe (USE)
    Posts
    4
    Rep Power
    0
    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.
  10. #6
  11. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    thanks a lot for your help, I'll try that.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    361
    Rep Power
    13
    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...
  14. #8
  15. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    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
  16. #9
  17. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    thats interesting, tomcat 4.04
  18. #10
  19. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    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 .
    -james

IMN logo majestic logo threadwatch logo seochat tools logo