You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2000/02/08 19:17:38 UTC

workDir location problems in Tomcat 3.0 and 3.1M1

Hi,

I am working on using Tomcat in a development environment for JSP and Servlets that runs under Windows NT. As a result, I need to configure where the workDir is located regardless of the current working directory.  This has revealed two problems.

1.  The "-workdir" command line argument doesn't work for Tomcat 3.0 and 3.1M1.  This currently occurs because the jakarta-tomcat/src/share/org/apache/tomcat/shell/Constants.java file doesn't have "Attribute.WorkDir" listed under WEBSERVER_ATTRIBUTES.  Instead it appears under SERVICE_ATTRIBUTES.  Adding it to WEBSERVER_ATTRIBUTES, fixes the problem, though I don't know if this is the correct solution given what is changing.

2.  In the server.xml file, the workDir parameter of the Server configuration has no effect in Tomcat 3.1M1.  This is occurring because of changes in the jakarta-tomcat/src/share/org/apache/tomcat/shell/Startup.java file where the Server's workDir setting is not being applied to the contextManager.  As a result, the contextManager always supplies the default "work" as the workDir.  I added the indicated line below to fix this:

    ContextManager contextManager = new ContextManager();
    contextManager.setWorkDir(serverConfig.getWorkDir());	Added

Again, this works but may not be the correct solution.

Thanks.

Larry

__________
Larry Isaacs		
Larry.Isaacs@sas.com
SAS Institute Inc.