Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting the previous page even after restarting TomCat

 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I created a jsp page and named it askForJar.jsp



I opened it in the browser (IE 6) and it showed me the hyperlink Get File.

Then I changed the jsp page to following and restarted Tomcat :--



Even after restarting Tomcat it did not show the changed jsp , on opening the page in the
browser it again showed the hyperlink "Get File" . Why is it so ?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Simran,
Sometimes the browser caches pages. Did you try CNRL-F5 (reload page) or starting up a new IE (so no new tab)?

Regards,
Frits
 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I didn't try ctrl+F5 but every time I restarted Tomcat I opened a new IE window.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it should actually work like that (CNTRL-F5), if it doesn't work check your console window if your server is starting without any problems (if it has problems it can show the cached page).

As a last resort you can always define your JSP as a servlet-element in your web.xml and add a load-on-startup element, like this:

This way you are sure it will load the servlet everytime your start tomcat (make sure you use the /askForJar.do in your URL)
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Delete Tomcat's 'work' directory after JSP change, otherwise Tomcat may use cached versions of the JSP
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this http://www.coderanch.com/t/493280/Tomcat/Tomcat-cache . it *may* help you
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic