Figured it out. Cast Context to StandardContext and call setWorkDir. Thanks!!

On 4/21/06, Trevor Miller <[EMAIL PROTECTED]> wrote:
> I assume that's in the server.xml file, which I'm not using. I'm using
> the following code with no server.xml:
>
> System.setProperty("catalina.home", getPath());
> embedded = new Embedded();
> engine = embedded.createEngine();
> engine.setDefaultHost("localhost");
> host = embedded.createHost("localhost", getPath() + "/webapps");
> engine.addChild(host);
> Context context = embedded.createContext("",getPath() + "/webapps/ROOT");
> context.addWelcomeFile("index.jsp");
> host.addChild(context);
> embedded.addEngine(engine);
> Connector connector =
> embedded.createConnector((java.net.InetAddress)null, 8123, false);
> embedded.addConnector(connector);
> embedded.start();
>
> ANy ideas. I've looked through the Javadoc API for the Context class
> but didn't find anything on workDir there.
>
> On 4/21/06, Derrick Koes <[EMAIL PROTECTED]> wrote:
> >
> > Yes, set the workDir attribute on the context element.
> >
> > -----Original Message-----
> > From: Trevor Miller [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 21, 2006 9:21 AM
> > To: users@tomcat.apache.org
> > Subject: Change location of "work" directory?
> >
> > Hi All,
> >
> > I've started working with the Tomcat embbed server and have managed to
> > get it running and serving JSPs. What I'd like to know is if there's a
> > way to explicitly specify a location of the "work" directory? I wish to
> > have this under /tmp on linux as opposed to in the tomcat directory.
> >
> > Thanks,
> > Trevor Miller
> >
> > ---------------------------------------------------------------------
> > 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]
> >
> >
>
>
> --
> Real programmers use Linux!
>


--
Real programmers use Linux!

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

Reply via email to