Author: markt
Date: Tue Jul 9 14:48:40 2013
New Revision: 1501304
URL: http://svn.apache.org/r1501304
Log:
Clean-up.
Extracted from a patch by Jeremy Boynes.
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=1501304&r1=1501303&r2=1501304&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Tue Jul 9 14:48:40 2013
@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.jasper;
import java.io.BufferedReader;
@@ -30,7 +29,6 @@ import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
-import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
@@ -1414,15 +1412,11 @@ public class JspC extends Task implement
}
}
- protected void initServletContext() {
- try {
- context =new JspCServletContext
- (new PrintWriter(System.out),
- new URL("file:" + uriRoot.replace('\\','/') + '/'));
- tldLocationsCache = TldLocationsCache.getInstance(context);
- } catch (MalformedURLException me) {
- System.out.println("**" + me);
- }
+ protected void initServletContext() throws IOException {
+ // TODO: should we use the Ant Project's log?
+ PrintWriter log = new PrintWriter(System.out);
+ URL resourceBase = new
File(uriRoot).getCanonicalFile().toURI().toURL();
+ context = new JspCServletContext(log, resourceBase);
rctxt = new JspRuntimeContext(context, this);
jspConfig = new JspConfig(context);
tagPluginManager = new TagPluginManager(context);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]