Hi, Yoav.

As requested by Mark I send my reply on this list.

My Tomcat version is 4.0.29. I know it is old, therefore I retested the work 
directory settings with Tomcat 5.5.12 and all that I mention now will be that 
current release.

It seems to me that Tomcat completely ignores the work directory settings. Both 
compiled jsps and ".ser" files are created in the catalina_home/work directory, 
although I set it to c:\temp for that context.
My test web application is minimalistic, it contains simply one jsp page that 
lists all context parameters. My server.xml is attached (derived from 
server-minimal.xml).

So (for me) the standard distribution does not do what I need regarding the 
work directory. I thought of writing my own session manager, but it seems that 
this alone is not enough, as the work directory and sessions.ser is still 
created.

Any ideas?

Hiran


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Yoav Shapira
Gesendet: Mittwoch, 7. Dezember 2005 16:22
An: Tomcat Developers List
Betreff: Re: Tomcat session serialisation & work directory

Hi,
What Tomcat version are you using?

On Tomcat 5.5, the default Manager's pathname attribute is relative to the 
context's workDir, so simply setting the custom workDir as you're doing should 
be sufficient.  (The file will be created, but where you want it).
Alternatively setting pathname to the empty string "" should also work.

Yoav

On 12/7/05, Chaudhuri, Hiran <[EMAIL PROTECTED]> wrote:
>
> Hi there.
>
> In my special setup I need Tomcat to use a different work directory.
> This is set in server.xml with the context attribute workDir.
> Tomcat will compile all JSPs in the desired location, so far so good.
>
> But I also see the file SESSIONS.ser being created after each Tomcat 
> run, and that file is in the default work dir location. I need not 
> have the file, but I must not have it inside my tomcat installation 
> directory. I tried to deactivate session persistence as documented but 
> the file always gets created. Meanwhile I created a new Manager that 
> just does nothing in its load() and store() methods, but still the 
> SESSIONS.ser file gets created.
>
> How can I completely deactivate that file, or move it to the context's 
> work directory?
>
> Hiran
>
>


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com
<Server port="8005" shutdown="SHUTDOWN">

  <GlobalNamingResources>
    <!-- Used by Manager webapp -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="8080" />

    <!-- This is here for compatibility only, not required -->
    <Connector port="8009" protocol="AJP/1.3" />

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" />
      <Host name="localhost" appBase="webapps">
	    <Context docbase="pamina" path="pamina" workDir="C:/Temp">
                  <Manager classname="org.apache.catalina.session.StandardManager" pathname="C:/Temp"/>
            </Context>
      </Host>
    </Engine>
    
  </Service>
</Server>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to