geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject resource visibility
Date Thu, 25 Jan 2007 20:31:14 GMT
Hi,

I have a question on resource visibly to classloaders. Here's an
example. I have a following JSP page packaged in .war file. The JSP
tries to load some descriptors packaged in the war file in two
different ways. The question is should the fist method work?

The JSP does:

System.out.println(getClass().getResource("/WEB-INF/web.xml"));
    System.out.println(getServletConfig().getServletContext().getResource("/WEB-INF/web.xml"));

and first method returns null but second works as expected. Anybody
knows quick answer to this?

Thanks,
Jarek

Mime
View raw message