Tomcat 7 keeps using an old jsp after an update

前端 未结 6 1937
深忆病人
深忆病人 2021-01-20 23:40

We (the people at my company) have created an application for Tomcat that uses servlets and jsp\'s as a GUI a while ago.

We\'ve just now finished an update where one of

相关标签:
6条回答
  • 2021-01-20 23:44

    The problem persists even after the computer was restarted.

    If you've deleted the JSPs, then the problem has to be compiled JSPs in the work directory tree. Take off and nuke them from orbit :-)

    0 讨论(0)
  • 2021-01-20 23:46

    Does deleting all traces also imply a "clean" on the server? You probably know that it keeps some classes(especially compiled jsps) in the "work" folder

    0 讨论(0)
  • 2021-01-20 23:49

    This may be because of the caching. First of all make confirm that the project is cleaned properly. and check the html of the page if the page contains old code or the latest one if old code is there then browser is getting the old files so try to clear the cache of your browser and then try to execute.

    how to cleare cache firefox chrome

    0 讨论(0)
  • 2021-01-20 23:58
    • Stop the server.
    • Delete webapps/APP_NAME folder
    • Replace webapps/APP_NAME.war with the new one.
    • Start the server.

    this should help :)

    0 讨论(0)
  • 2021-01-21 00:06

    The problem very likely is caused by timestamp mismatch. The newly uploaded JSP page or servlet has an older timestamp than that of the cached page or servlet on the server. To avoid the problem, ensure the system clock on the machine where the JSP or servlet uploaded from is in sync with the system clock of the machine where the server is running on. To remedy the problem, check the following:

    • Make sure the file transfer client (like winscp known to cause problem) date, time and time zone is in sync with the Apache Tomcat server. • Verify the JSP date, time and time zone is up to date with the Apache Tomcat server. If not, re-deploy the JSP with the correct timestamp. • If updating the JSP timestamp failed, the last thing you want to do is to remove the JSP in Apache Tomcat work directory if you don’t have important sessions to keep.

    0 讨论(0)
  • 2021-01-21 00:11

    I had the same problem but it wasn't the tomcat.
    My Apache was set to allow browsercaching for text/html and text/plain types for 1 month. The call of that page was made per JavaScript and even if you reload the page with Ctrl+F5 those JavaScript calls are still loaded from the browsercache.

    After clearing the browsercache i got the right page.
    From now on i don't enable browsercaching for those types in apache anymore.

    0 讨论(0)
提交回复
热议问题