Tomcat, JSP file after modification, redeployment, page does not change the issue

Source: Internet
Author: User

Phenomenon:

Did not move any configuration files, today there is a modified JSP content on the page does not reflect. is still the old page content

Problem Analysis:

Since it can be used, so the system should be the detection of file updates, the reason is not recompile JSP, estimated file date problem. Because Tomcat is based on the file date to judge whether the JSP file is better than the existing translation. java files are new to determine if recompiling.

Upon enquiry, yesterday had changed the system time to 1 years later, used to test certain functions. And then changed back.

The problem has been found. Due to yesterday's date adjustment and the JSP file modified, the system records the date of the compiled file is 1 years later. After the recovery of time, no matter how modified, the file modification time can not be more than a year later, so Tomcat thought that the current compiled files more new, so do not compile again.

Problem solving:

Find the temporary working directory for Tomcat, which is the directory where Jsp->java->class is stored

Standard directory is

\tomcat\work\catalina\localhost\

Some of the use of Eclipse integrated Tomcat may be

Eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\catalina\localhost\

In short, to find the work or Catalina subdirectory as the standard, if necessary, the overall search speed faster.

When found, it is found that under the org\apache\jsp subdirectory of the project directory, there is a translation of the. Java and. class files

Remove all of the content below work\catalina\localhost\

Once again, Tomcat regenerates the missing file and the date is restored to the current


Original Paste Link: http://daidalei321.iteye.com/blog/909999

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.