|
14 | 14 | * See the License for the specific language governing permissions and |
15 | 15 | * limitations under the License. |
16 | 16 | */ |
17 | | - |
18 | 17 | package org.apache.jasper; |
19 | 18 |
|
20 | 19 | import java.io.BufferedReader; |
|
30 | 29 | import java.io.PrintWriter; |
31 | 30 | import java.io.Reader; |
32 | 31 | import java.io.Writer; |
33 | | -import java.net.MalformedURLException; |
34 | 32 | import java.net.URL; |
35 | 33 | import java.net.URLClassLoader; |
36 | 34 | import java.util.ArrayList; |
@@ -1414,15 +1412,11 @@ protected void completeWebXml() { |
1414 | 1412 | } |
1415 | 1413 | } |
1416 | 1414 |
|
1417 | | - protected void initServletContext() { |
1418 | | - try { |
1419 | | - context =new JspCServletContext |
1420 | | - (new PrintWriter(System.out), |
1421 | | - new URL("file:" + uriRoot.replace('\\','/') + '/')); |
1422 | | - tldLocationsCache = TldLocationsCache.getInstance(context); |
1423 | | - } catch (MalformedURLException me) { |
1424 | | - System.out.println("**" + me); |
1425 | | - } |
| 1415 | + protected void initServletContext() throws IOException { |
| 1416 | + // TODO: should we use the Ant Project's log? |
| 1417 | + PrintWriter log = new PrintWriter(System.out); |
| 1418 | + URL resourceBase = new File(uriRoot).getCanonicalFile().toURI().toURL(); |
| 1419 | + context = new JspCServletContext(log, resourceBase); |
1426 | 1420 | rctxt = new JspRuntimeContext(context, this); |
1427 | 1421 | jspConfig = new JspConfig(context); |
1428 | 1422 | tagPluginManager = new TagPluginManager(context); |
|
0 commit comments