ASF Bugzilla – Attachment 17956 Details for
Bug 33453
Jasper should recompile JSP files whose datestamps change in either direction (not just newer)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Generator.java diff
Generator.java.diff (text/plain), 3.33 KB, created by
Jonathan Leech
on 2006-03-23 20:11:23 UTC
(
hide
)
Description:
Generator.java diff
Filename:
MIME Type:
Creator:
Jonathan Leech
Created:
2006-03-23 20:11:23 UTC
Size:
3.33 KB
patch
obsolete
>--- Generator.java.original 2005-03-26 14:22:44.000000000 -0700 >+++ Generator.java 2006-03-23 09:50:57.131117100 -0700 >@@ -31,6 +31,8 @@ > import java.util.Iterator; > import java.util.List; > import java.util.Vector; >+import java.net.URL; >+import java.net.URLConnection; > > import javax.servlet.jsp.tagext.TagAttributeInfo; > import javax.servlet.jsp.tagext.TagInfo; >@@ -430,6 +432,21 @@ > // Static data for getDependants() > out.printil("private static java.util.Vector _jspx_dependants;"); > out.println(); >+ out.printil("private static java.util.HashMap _jspx_dependant_to_last_modified = new java.util.HashMap();"); >+ out.println(); >+ out.printin("private static long _jspx_last_modified = "); >+ try { >+ String jsp = ctxt.getJspFile(); >+ URL jspUrl = ctxt.getResource(jsp); >+ URLConnection uc = jspUrl.openConnection(); >+ long jspLastModified = uc.getLastModified(); >+ uc.getInputStream().close(); >+ out.print(Long.toString(jspLastModified)); >+ } >+ catch (java.io.IOException ioe) { >+ throw new JasperException(ioe); >+ } >+ out.println("L;"); > List dependants = pageInfo.getDependants(); > Iterator iter = dependants.iterator(); > if (!dependants.isEmpty()) { >@@ -438,10 +455,25 @@ > out.printin("_jspx_dependants = new java.util.Vector("); > out.print("" + dependants.size()); > out.println(");"); >- while (iter.hasNext()) { >+ while (iter.hasNext()) { >+ String include = (String)iter.next(); > out.printin("_jspx_dependants.add(\""); >- out.print((String)iter.next()); >+ out.print(include); > out.println("\");"); >+ out.printin("_jspx_dependant_to_last_modified.put(\""); >+ out.print(include); >+ out.print("\", new java.lang.Long("); >+ try { >+ URL includeUrl = ctxt.getResource(include); >+ URLConnection includeUconn = includeUrl.openConnection(); >+ long includeLastModified = includeUconn.getLastModified(); >+ out.print(Long.toString(includeLastModified)); >+ includeUconn.getInputStream().close(); >+ } >+ catch (java.io.IOException ioe) { >+ throw new JasperException(ioe); >+ } >+ out.println("L));"); > } > out.popIndent(); > out.printil("}"); >@@ -479,7 +511,18 @@ > out.popIndent(); > out.printil("}"); > out.println(); >- >+ out.printil("public java.util.Map getDependantToLastModified() {"); >+ out.pushIndent(); >+ out.printil("return _jspx_dependant_to_last_modified;"); >+ out.popIndent(); >+ out.printil("}"); >+ out.println(); >+ out.printil("public long getLastModified() {"); >+ out.pushIndent(); >+ out.printil("return _jspx_last_modified;"); >+ out.popIndent(); >+ out.printil("}"); >+ out.println(); > if (isPoolingEnabled && !tagHandlerPoolNames.isEmpty()) { > generateInit(); > generateDestroy();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33453
:
16489
|
16492
|
16493
|
16599
|
17955
| 17956 |
17957
|
17958
|
27040