I'd want to say the Default context (see bug 33831 for more explanations) This is the tomcat behaviour if your put crossContext="true" (but you already have solved your needs, no ?).
On Tue, 8 Mar 2005 09:30:01 -0600 "Jeffrey Lanham" <[EMAIL PROTECTED]> wrote: > So, hitting an invalid context gets you the root context? Isn't that a > little insecure? > > Jeff > > -----Original Message----- > From: Lionel Farbos [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 08, 2005 3:49 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: Trying to retrieve the ROOT context in Servlet. > > Hi Jeffrey, > > I use Tomcat 5.0.30 and, > when I use getServletContext().getContext("/toto"), > if the Context toto doesn't exist, it returns the root context. > > On Mon, 7 Mar 2005 15:32:25 -0600 > "Jeffrey Lanham" <[EMAIL PROTECTED]> wrote: > > > 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] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]