0

This question relates to a question I asked earlier and in order not to include the same code snippets, I would be glad if you would view it here.

I deploy the application on Tomcat 8.5. and now I see the return value of getMessage() from the HelloWorld managed bean displayed in the browser.

Now when I edit the value in the getMessage() function for instance instead of "Hello World!" I use "Hello World!................" and save and redeploy, the old value keeps displaying in the browser. Even if I restart Tomcat, it is the same old value. I just don't understand why.

I don't know if the problem is a cache problem or what. What I don't understand it is even after shutting down the server and restart it, I get the same old value.

halfer
  • 19,824
  • 17
  • 99
  • 186
Eddy Freeman
  • 3,207
  • 6
  • 35
  • 55

2 Answers2

0

I can think of few thing;

  1. clear tomcat cache (Tomcat - want to clear cache of app being undeployed)

  2. You may be compiling or deploying wrong archive (Verify the .class file generated is latest one, you can even use a de-compiler to verify this)

Asela Senanayake
  • 351
  • 2
  • 6
  • 21
0

I agree with Asela Senanayake steps but sometimes for me even after the Cleaning up the Tomcat Directory the code was not deployed properly. What you can do is manually delete your project from the tomcat working directory and do the build and publish again for your project. You can find the project deployment location for tomcat below:

your_project_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0

utkarsh31
  • 1,439
  • 2
  • 13
  • 20
  • IF you use Eclipse and IF you deploy in that location – Kukeltje Jun 06 '17 at 07:58
  • Yup actually this is a followup question and he mentioned using eclipse in the previous question so didn't mention these points...thanks anyways for adding – utkarsh31 Jun 06 '17 at 08:55