tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kavanagh <>
Subject file access (security?)
Date Wed, 03 Apr 2002 04:07:13 GMT
I'm having a problem with TC4.0.3 (Win2K, JDK1.3.1)
I have some code that reads a property file and tries to load fonts 
listed within. ClassLoader.getResource() is used to locate the prop file 
and font files
I'm attaching the servlet test code. This code works fine under TC3.2.2 
and TC3.3a
BTW, the files being loaded are in a jar in my WEB-INF/lib directory.

I've seen two problems:
1. when the font path contains a space, the resource URL is OK, but 
calling url.openStream() returns null. (works fine in TC3.x)
2. even if the input stream is good (as shown in the log below), there 
seems to be a problem creating a temp file.

Could problem 2 be caused by some security features that have been put 
in place sincee TC3?

Here is my catalina.out (the relavent section)

file = fonts/Pgl_____.ttf
resource = 
input stream =$1@5dd910 The system cannot find the path specified
    at Method)
    at java.awt.Font.createFont(
    at javax.servlet.http.HttpServlet.service(



View raw message