Ok, if I could read I'd be dangerous.  I finally found the crossContext 
attribute in the context descriptor.  Man, I just glossed
right over that one.  Changed it in the web app accessing the root directory 
and voila, it works.  Duh (dull slap as hand hits
forhead with enough force to crack the skull).

-----Original Message-----
From: Jeffrey Lanham [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 3:32 PM
To: [email protected]
Subject: Trying to retrieve the ROOT context in Servlet.

I have been trying for days and tons of google searches and mail archive 
searches and can't find an answer to the quandry I find
myself in.

I need to allow users to upload to a directory in the ROOT context of my tomcat 
server.  For some reason, and it may be a security
deal, I can't retrieve the server context for "/" so I can get the actual path 
to upload the file.  It always comes back null.  I
know that the Java servlet specifications say the null may be returned if the 
container, for some reason, doesn't want to return the
context.  I don't know if it's a tomcat configuration, or if there is some 
other mechanism to use besides
getServletContext().getContext("/").  Any help would be appreciated.

 

Thanks,

Jeffrey Lanham

Miller Curtain Company

 

 



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

Reply via email to