See this discussion:
http://marc.theaimsgroup.com/?l=tomcat-user&m=103904964313189&w=2
Jake
At 07:33 AM 12/5/2002 -0800, you wrote:
You can place your data file under WEB-INF/lib as a jar file, or as far
as i know, anything under WEB-INF cannot be accessed by direct
client request. So you can even have WEB-INF/data folder. As far as
accessing the resource, as recently mentioned in many posts
try ServletContext's getResourceAsStream("/WEB-INF/data/data.dat");
David Brown wrote:
Patrick Kosiol writes:
Hi,
How do I connect to a Data-File above the WEB-INF-Folder from a servlet????
For example my class is placed in
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/myApp/server/servlet.class
and my data-files are placed in $CATALINA_HOME/webapps/data/data.dat or
so. Is this possible or does anybody know a better way to place my
data-files? And how do I connect to them?
thx a lot
Patrick
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
Hello Patrick, it would be easier and more prudent to create ur own
application context, a so-called "webapp", and get away from the "ROOT"
application. for example i have an online application that uses a java
"properities" file in conjuction w/ a "webapp". this properties file is
located just above: WEB-INF after the .war expands and i access the file
w/o conflicts. if i have a "webapp" that is accessed via:
http://localhost:8080/webapp where the actual servlet class resides here:
$CATALINA_HOME/webapps/webapp/WEB-INF/classes/com/myhost/webappservlet.class
i would access my properites file at:
$CATALINA_HOME/webapps/my.properties. hope this helps, david.
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>