You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/03/07 16:09:08 UTC
svn commit: r1297987 - /tomcat/trunk/java/org/apache/jasper/JspC.java
Author: markt
Date: Wed Mar 7 15:09:07 2012
New Revision: 1297987
URL: http://svn.apache.org/viewvc?rev=1297987&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52772
Re-order checks for uriRoot validity and ensure that all the checks are
completed before it is used.
Modified:
tomcat/trunk/java/org/apache/jasper/JspC.java
Modified: tomcat/trunk/java/org/apache/jasper/JspC.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1297987&r1=1297986&r2=1297987&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Wed Mar 7 15:09:07 2012
@@ -1300,19 +1300,19 @@ public class JspC implements Options {
Localizer.getMessage("jsp.error.jspc.no_uriroot"));
}
- if( context==null ) {
+ File uriRootF = new File(uriRoot);
+ if (!uriRootF.isDirectory()) {
+ throw new JasperException(
+ Localizer.getMessage("jsp.error.jspc.uriroot_not_dir"));
+ }
+
+ if(context == null) {
initServletContext();
}
// No explicit pages, we'll process all .jsp in the webapp
if (pages.size() == 0) {
- scanFiles( new File( uriRoot ));
- }
-
- File uriRootF = new File(uriRoot);
- if (!uriRootF.exists() || !uriRootF.isDirectory()) {
- throw new JasperException(
- Localizer.getMessage("jsp.error.jspc.uriroot_not_dir"));
+ scanFiles(uriRootF);
}
initWebXml();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org