• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refreshing JSP and servlet in TOMCAT3.2

 
Cherry Mathew
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam using tomat3.2 for application development. When i make changes in the JSP its not getting refreshed and its giving me the old page. Even if i restart tomcat im getting the same problem. So first i got to delete the folder corresponding to the current context from the work folder and then restart the server. I dont think this is the correct thing to do. and also for servlets whenever i make some changes i got to restart the machine.
Im not using the ANT tool for building the application. will it make any difference. I dont think this will make any differnce.
Im specifying reload in my server.xml in the <Context> tag.
What else shud i do to make it refresh the JSP.
If there are any more tips using tomcat please reply.
Thanks in advance
Cherry
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Cherry,
I think your Context tag look like this
<Context path="/myproject" docBase="myproject" debug="0" reloadable="false"/>
now change it like this
<Context path="/myproject" docBase="myproject" debug="0" reloadable="true"/>
 
Cherry Mathew
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anup,
I did give reloadable = true in the context but still its not working?. Im connecting tomcat with apache
I m using tomcat 3.2
Thanks in advance
Cherry
 
Cherry Mathew
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No replies???/
 
timothy zimmerman
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sort of stuck on this too. A quote from the Jakarts FAQ O Matic
'Note that modified JSP pages are "automatically reloaded" though.
This works without the auto-reload feature, since a brand new class
is created for the modified page, and the new class simply replaces
the old class.'
But like yourself I have had to clear my work directory and restart. Anybody else have experience with this?
 
Ashwin Asani
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My tomcat installation is reloading servlets without any problems.
Whenever I had problems with jsp, I used to clear the work directory, clear the browser cache & disk cache and then run the file again. It would work fine after that.
In apache however, we have autoreloading capabilities that work fine. There is no need of a server restart in that case.
[This message has been edited by Ashwin Asani (edited July 18, 2001).]
 
Cherry Mathew
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ashwini
Clearing the work directory and restarting the sever is fine it works but its time consumuing in a development environment. If the jsp page is automatically reloaded its the better way of doing this.
I did put autoreload=true and still its not refreshing the jsp page. i think its bcos of the timestamp of the jsp page. but cant figure out how to do it.
Cherry
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had this same problem with JSP's until I changed the location where I put my JSP's. I never had the problem with servlets. I know it's also location dependent too. I am at work now, so I don't remember the exact directory off hand. I just know that Tomcat automatically reloads servlets and JSP's in a specific directory.
Bosun
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

After that, you have the correct heirarchy in the webapps folder.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited July 18, 2001).]
 
Sarah Waterson
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having the exact same problems - even with everything in the server.xml file set up for the application to be reloadable, I can't get changes to show up with out clearing EVERYTHING and starting over. I'm also using 3.2 - could this be the problem?
 
Sarah Waterson
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh... discovered the problem I was having. I was making changes to files statically INCLUDED in the .jsp files, but not resaving/re-timestamping the actual .jsp file iteslf, so it was never getting recompiled, and thus, never including my changes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic