View | Details | Raw Unified | Return to bug 33453
Collapse All | Expand All

(-)JspCompilationContext.java (-15 / +2 lines)
Lines 21-27 Link Here
21
import java.net.MalformedURLException;
21
import java.net.MalformedURLException;
22
import java.net.URL;
22
import java.net.URL;
23
import java.net.URLClassLoader;
23
import java.net.URLClassLoader;
24
import java.net.URLConnection;
25
import java.util.Hashtable;
24
import java.util.Hashtable;
26
import java.util.Set;
25
import java.util.Set;
27
26
Lines 554-574 Link Here
554
        if (isPackagedTagFile || jspCompiler.isOutDated()) {
553
        if (isPackagedTagFile || jspCompiler.isOutDated()) {
555
            try {
554
            try {
556
                jspLoader = null;
555
                jspLoader = null;
557
                jspCompiler.compile();                
556
                jspCompiler.compile();
558
                String jsp = getJspFile();
559
                
560
                // jleech 9/21/2005
561
                // set the lastModified of the generated .java and .class files to the .jsp lastModified
562
                long jspRealLastModified = 0;
563
                URL jspUrl = getResource(jsp);                
564
                URLConnection uc = jspUrl.openConnection();
565
                jspRealLastModified = uc.getLastModified();
566
                uc.getInputStream().close();
567
                new File(getClassFileName()).setLastModified(jspRealLastModified);
568
                new File(getServletJavaFileName()).setLastModified(jspRealLastModified);
569
                
570
                jsw.setReload(true);
557
                jsw.setReload(true);
571
                jsw.setCompilationException(null);                
558
                jsw.setCompilationException(null);
572
            } catch (JasperException ex) {
559
            } catch (JasperException ex) {
573
                // Cache compilation exception
560
                // Cache compilation exception
574
                jsw.setCompilationException(ex);
561
                jsw.setCompilationException(ex);

Return to bug 33453