You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Zeigler, Carl L" <cl...@statestreet.com> on 2010/08/11 17:17:16 UTC

Can't configure webapps to disk partition

Hello and thank you in advance for any suggestions you may have.

I am running Tomcat 6.0.24 (service) on a Windows 2003 server hosting
very simple JSP pages.

I am trying to make a configuration change to server.xml to change the
webapps directory to a different disk partition as below but I cannot
get it to work
From:
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

To:
<Host name="localhost" appBase="E:\prod\applications" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">


I have had success changing the webapps directory to various locations
on the C: Drive but when I try to use the E: partition, I receive the
"page cannot be found" message. 

The reason I need to do this is because the path (E:\prod\applications)
is the target source code deployment path required by my employer. 

I have found several posts in the forum that suggest variations on the
syntax as noted below but still, I have not been able to get anything to
work.

The WEB-INF and META-INF as well as web.xml are all present in the
E:\prod\applications\<project name> folder and I have restarted the
Tomcat service after my changes. 

I have tried many variations of these:
E://prod//applications
\E:\prod\applications


Thank you,
Carl



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Can't configure webapps to disk partition

Posted by Peter Crowther <pe...@melandra.com>.
On 11 August 2010 21:36, André Warnier <aw...@ice-sa.com> wrote:

> To point correctly to the location of this drive E:, you should probably
> use instead the UNC path, like //server/share.  That is because, depending
> on the user-id under which tomcat runs, this shared directory may not
> necessarily be mapped to a drive letter, or not to the same E: drive letter.
>
>
> That's not a "probably" - you *will* have to use the UNC path :-).  Windows
services don't completely process the profile of their user as they start,
and don't map drives to shares even if such mappings are defined in the user
profile.  It's fine if E: is a local partition, however (Carl hasn't told
us, or I missed it).

- Peter

Re: Can't configure webapps to disk partition

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: Zeigler, Carl L [mailto:clzeigler@statestreet.com]
>> Subject: Can't configure webapps to disk partition
>>
>> I have had success changing the webapps directory to various locations
>> on the C: Drive but when I try to use the E: partition, I receive the
>> "page cannot be found" message.
> 
> Is the E: drive really somewhere else on the network?  If so, it won't be visible to Tomcat running as a service.  Remember that drive mappings are by Windows account, not global for all accounts on the box.  As I recall, processes running as a service do not see any drive mappings, even when running with an account that has made some.
> 
> Try running Tomcat from the scripts (startup.bat) under the same account the drive mappings are for, rather than as a service.
> 
A bit more information :

By default, when you install a Service under Windows, it will run under the (local) user 
"LocalSystem".  This is a special user which has extended privileges on the local box 
itself, but it does not have access to "network resources" (in the Microsoft understanding 
of that term, which means for example that it does not have access to network drives 
mapped as "shares" or to network printers.  It can use TCP/IP however).

Try the following :

Note : for testing the following, use your own windows domain user-id.  To run in 
production, you will have to ask your domain administrators for some special Windows 
Domain "service" user-id.  That is a user-id that is a real domain-id (not a local one), 
so that it has access to network resources (like E:/, maybe).
Note that this account should also have a password that does not run out in time, 
otherwise some day your tomcat will not start anymore.

Anyway, do this :
- right click on the "my computer" icon and pick "Manage"
- look for "services and applications", and pick "services"
- in the right pane, find tomcat, right-click on it and choose "properties"
- in the second tab (login as..), pick the radio button "run as this user" and enter your 
own user-id and password.
- say OK etc..

Then restart the tomcat service and check if it works.

To point correctly to the location of this drive E:, you should probably use instead the 
UNC path, like //server/share.  That is because, depending on the user-id under which 
tomcat runs, this shared directory may not necessarily be mapped to a drive letter, or not 
to the same E: drive letter.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Can't configure webapps to disk partition

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Zeigler, Carl L [mailto:clzeigler@statestreet.com]
> Subject: Can't configure webapps to disk partition
> 
> I have had success changing the webapps directory to various locations
> on the C: Drive but when I try to use the E: partition, I receive the
> "page cannot be found" message.

Is the E: drive really somewhere else on the network?  If so, it won't be visible to Tomcat running as a service.  Remember that drive mappings are by Windows account, not global for all accounts on the box.  As I recall, processes running as a service do not see any drive mappings, even when running with an account that has made some.

Try running Tomcat from the scripts (startup.bat) under the same account the drive mappings are for, rather than as a service.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Can't configure webapps to disk partition

Posted by Pid * <pi...@pidster.com>.
On 11 Aug 2010, at 18:02, Christopher Schultz
<ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Carl,
>
> On 8/11/2010 11:17 AM, Zeigler, Carl L wrote:
>> I am trying to make a configuration change to server.xml to change the
>> webapps directory to a different disk partition as below but I cannot
>> get it to work
>> From:
>> <Host name="localhost" appBase="webapps" unpackWARs="true"
>> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>>
>> To:
>> <Host name="localhost" appBase="E:\prod\applications" unpackWARs="true"
>> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>
> You might have to use either double-backslashes (\\) or forward slashes
> to make this work:
>
> <Host name="localhost" appBase="E:\\prod\\applications" ...
>
> or
>
> <Host name="localhost" appBase="E:/prod/applications" ...
>
>> I have tried many variations of these:
>> E://prod//applications
>> \E:\prod\applications
>
> How about the above?

Does the user account running Tomcat have access to that drive partition?

p

>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxi160ACgkQ9CaO5/Lv0PBFYgCdEs5Nf07MnPgQ9c/0GGkn8P1L
> loMAoKQdWVWRZ/bFRmcqqpt408FTrBkC
> =DCls
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Can't configure webapps to disk partition

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carl,

On 8/11/2010 11:17 AM, Zeigler, Carl L wrote:
> I am trying to make a configuration change to server.xml to change the
> webapps directory to a different disk partition as below but I cannot
> get it to work
> From:
> <Host name="localhost" appBase="webapps" unpackWARs="true"
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
> 
> To:
> <Host name="localhost" appBase="E:\prod\applications" unpackWARs="true"
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

You might have to use either double-backslashes (\\) or forward slashes
to make this work:

<Host name="localhost" appBase="E:\\prod\\applications" ...

or

<Host name="localhost" appBase="E:/prod/applications" ...

> I have tried many variations of these:
> E://prod//applications
> \E:\prod\applications

How about the above?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxi160ACgkQ9CaO5/Lv0PBFYgCdEs5Nf07MnPgQ9c/0GGkn8P1L
loMAoKQdWVWRZ/bFRmcqqpt408FTrBkC
=DCls
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org