views:

168

answers:

2

I'm trying to specify a relative directory in the web.xml file. I basically want it to read the "data" folder underneath "web-inf", but nothing I've tried seems to work.

"/data" translates to the data folder in the root directory (I'm using windows).

"data" translates to "C:\Program Files\Eclipes\data"

"${CATALINA_HOME}/[etc...]" doesn't seem to work either.

Any ideas?

A: 

I think you can use this to obtain an absolute path from your relative path:

ServletContext ctx = ....;
String absolutePath = ctx.getRealPath("/WEB-INF/" + relativePath);
Andrea Polci
A: 

Figured it out...

WTP uses the variable "${catalina.home}", not "${CATALINA_HOME}"...

ilitirit