dev@jersey.java.net

Classpath scanning in a servlet container

From: Enrico Maria Crisostomo <enrico.m.crisostomo_at_gmail.com>
Date: Tue, 17 Nov 2009 19:46:08 +0100

Hi.

Out of curiosity, I was having a look at jersey-server code to
understand how ServletContainer.java (and its dependencies), scan the
web application looking for resource classes. I'm quickly examining
the code and as far as I understand, by default, /WEB-INF/lib and
/WEB-INF/classes are scanned looking for appropriately annotated
classes. I see that calls to ServletContext.getRealPath are made. Out
of curiosity, how do you manage the case in which a web application is
served from its compressed war archive and ServletContext.getRealPath
returns null?

Thank you in advance,
Enrico