DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42157>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42157

           Summary: URLs returned by ServletContext.getResource() cannot
                    resolve, directories cannot be browsed...
           Product: Tomcat 5
           Version: 5.5.23
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The URLs returned by ServletContext.getResource(String) cannot resolve, ie...

URL url = getResource("/WEB-INF/");
// url = "jndi:/servername//WEB-INF/"
URI uri = url.toURI().resolve("aFile.txt");
// uri = "jndi:/servername/WEB-INF/"
// misses the double slash and
uri.toURL().openStream();
// will fail

// noticed also...
URLConnection c = url.openConnection();
c.getInputStream();
// should return a stream containing the lits of files
// (like for the "file" protocol)
// so that directories can be browsed and add to URL.
// and...
c.getContentType();
// could return some special content type so that 
// files can be ditinguished from directories or
// maybe something like...
Boolean.parse(c.getRequestProperty("is-directory"));

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to