You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "R. S. Patil" <kp...@gmail.com> on 2009/11/20 18:29:58 UTC

Putting Docbase on network drive. Is it Possible ?

dear Friends,

I have mapped drive e: to \\Dell-1710\RSP_DEV\Appl\Web_Dev\Test_Proj\WebContent
there it gets latest compiled application through eclipse.

I have created a Test-E.xml in C:\Program Files\Tomcat
6.0\conf\Catalina\localhost
the contents are
<Context path="/Test-E"
	docBase="E:/"
	antiResourceLocking="false"
	allowLinking="true"
	/>

If I try with http://localhost:8080/Test-E I wont get Error response.
But if I copy all contents
of e: to c:\Test-C and create Test-C.xml with contents
<Context path="/Test-C"
	docBase="C:/test-c"
	antiResourceLocking="false"
	allowLinking="true"
	/>
http://localhost:8080/Test-C it gives index.html

I am newbie to Tomcat and would like to know whether docbase on mapped drives
are permitted or Not ? or shall I have to take any further actions to
get it working.

we are putting all our projects at central server and compiling there
only. Every time
copying contents of webContents to local c: drive is bit troublesome
and debugging is
also not possible can some experienced programmer give us a way
out.(This is our first web project).
Urls to howtos, reading material, suggestion of book will be very
useful to us so please help us.


Thanks and best regards.

Raja.

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


Re: Putting Docbase on network drive. Is it Possible ?

Posted by "R. S. Patil" <kp...@gmail.com>.
Thank You very much Chuck Caldarale
>
> In the docs:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>

I just read that and its a very valuable resource.

Thanks and best regards

Raja

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


RE: Putting Docbase on network drive. Is it Possible ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: R. S. Patil [mailto:kpr.rspatil@gmail.com]
> Subject: Re: Putting Docbase on network drive. Is it Possible ?
> 
> where can I get more info about attributes and deployment xml file ?

In the docs:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - 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: Putting Docbase on network drive. Is it Possible ?

Posted by "R. S. Patil" <kp...@gmail.com>.
Thanks Chuck Caldarale

>> <Context path="/Test-E"
>>       docBase="E:/"
>>       antiResourceLocking="false"
>>       allowLinking="true"
>>       />
>
> Take out the path attribute (it's not allowed) and the allowLinking attribute (ineffective on Windows).
>
where can I get more info about attributes and deployment xml file ?

>> If I try with http://localhost:8080/Test-E I wont get Error response.
>
> Not getting an error response is usually a good thing.  What do you get?
>
sorry it's a typo actually it should be "I get error response" "wont"
is a extra word

>> I am newbie to Tomcat and would like to know whether docbase
>> on mapped drives are permitted or Not ?
>
> Works fine for me - as long as I'm running Tomcat via the startup.bat script.  If you're running Tomcat as a service, the service has no access to any drive mappings you've made under your userid.
>
Thanks a nice explanation. I am starting tomcat with tomcat monitor.
it seems that
it starts tomcat as service. I will try with bat file and let u know.
If it does then
it will save lot of our time and debugging will also be possible.

Thanks and best regards

Raja

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


Re: Putting Docbase on network drive. Is it Possible ?

Posted by André Warnier <aw...@ice-sa.com>.
R. S. Patil wrote:
> Hi Chuck Caldarale
> 
>> Works fine for me - as long as I'm running Tomcat via the startup.bat script.  If you're running Tomcat as a service, the service has no access to any drive mappings you've made under your userid.
>>
> 
> Yes it works with startup.bat script. I just tested it and found mapped drives
> also work. Thanks for tip. BTW I have a small difficulty.
> 
> I ran the startup script in a terminal window. The terminal window wont
> come back to prompt as it does on Linux. For shutting down I have to open
> another window. Is it Normal or it has any other work around ?

Did you try CTRL-C in the command window ?

> 
> Suppose if I have to restart tomcat what I have to do ?
> simply close startup terminal window and in another terminal window
> fire startup again ?
> 
> Thanks and best regards.
> 
> RAJA
> 
> ---------------------------------------------------------------------
> 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: Putting Docbase on network drive. Is it Possible ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: R. S. Patil [mailto:kpr.rspatil@gmail.com]
> Subject: Re: Putting Docbase on network drive. Is it Possible ?
> 
> well the window from which catalina start command has been fired 
> comes to command prompt after showing four lines but it opens 
> another window which shows startup log remains open and if I 
> close that Tomcat terminates.

Exactly as expected and previously described.  Closing the Tomcat process window by any means other than CTRL-C or the shutdown.bat script is not recommended, since that will be an abrupt termination rather than an orderly shutdown.

 - 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: Putting Docbase on network drive. Is it Possible ?

Posted by "R. S. Patil" <kp...@gmail.com>.
Thanks  André Warnier

>> well the window from which catalina start command has been fired comes
>> to command
>> prompt after showing four lines but it opens another window which shows
>> startup log remains open and if I close that Tomcat terminates.
>>
> In the same window where you entered "startup.bat" to start Tomcat, enter
> "shutdown.bat" to terminate the Tomcat running in the other window.
>
it seems that when startup.bat or catalina run/start is run a separate
window or same window remains open, and its a normal behavior.
I have already tried catalina stop in window where catalina start
was fired and it closes the window showing startup log after
showing closing log.

> Alternatively, entering CTRL-C in the command window where Tomcat itself  is
> running, also shuts down that Tomcat cleanly.
> Simply closing the window where Tomcat is running, may not do a clean
> shutdown.
yes I tried ^c also in window showing log it closes after showing
closing log. Thanks for tip about closing the log window.
>
> Yet another way to shut down Tomcat :
> - have a look at the file (tomcat_install_dir)/conf/server.xml
> - there is a tag in it like this :
> <Server port="8005" shutdown="SHUTDOWN">
>
> It means that if you open a TCP connection to localhost, port 8005, and send
> the string "SHUTDOWN" on that connection, Tomcat will shut down.
> You can change the port and the string to what you prefer, like
> <Server port="8999" shutdown="stopnow">
>
> As a security, Tomcat will only accept a connection on that shutdown port,
> if it originates from localhost (the same machine).
>

thanks you for this golden information I will keep in this mind and
try this also. After couple of weeks struggling with Tomcat on
Linux and Windows, Today I have got lot of knowledge about Tomcat
basics by very kind ppl. Thanks a lot for that. You have made my day.
i have got eclipse working on Linux and windows. Now I will try with
some spring examples from the book.


Thanks and best regards

Raja.

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


Re: Putting Docbase on network drive. Is it Possible ?

Posted by André Warnier <aw...@ice-sa.com>.
R. S. Patil wrote:
> 
> well the window from which catalina start command has been fired comes
> to command
> prompt after showing four lines but it opens another window which shows
> startup log remains open and if I close that Tomcat terminates.
> 
In the same window where you entered "startup.bat" to start Tomcat, 
enter "shutdown.bat" to terminate the Tomcat running in the other window.

Alternatively, entering CTRL-C in the command window where Tomcat itself 
  is running, also shuts down that Tomcat cleanly.
Simply closing the window where Tomcat is running, may not do a clean 
shutdown.

Yet another way to shut down Tomcat :
- have a look at the file (tomcat_install_dir)/conf/server.xml
- there is a tag in it like this :
<Server port="8005" shutdown="SHUTDOWN">

It means that if you open a TCP connection to localhost, port 8005, and 
send the string "SHUTDOWN" on that connection, Tomcat will shut down.
You can change the port and the string to what you prefer, like
<Server port="8999" shutdown="stopnow">

As a security, Tomcat will only accept a connection on that shutdown 
port, if it originates from localhost (the same machine).


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


Re: Putting Docbase on network drive. Is it Possible ?

Posted by "R. S. Patil" <kp...@gmail.com>.
On Sat, Nov 21, 2009 at 12:56 AM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>> From: R. S. Patil [mailto:kpr.rspatil@gmail.com]
>> Subject: Re: Putting Docbase on network drive. Is it Possible ?
>>
>> I ran the startup script in a terminal window. The terminal window wont
>> come back to prompt as it does on Linux. For shutting down I have to
>> open another window. Is it Normal or it has any other work around ?
>
> No, that's not normal.  The startup.bat script uses the Windows "start" command to initiate the Tomcat process in a command window separate from the one the script is running in.  The original command window should return a prompt almost immediately after displaying four "Using xxx" lines.  If it doesn't do that, someone has modified - and broken - your startup.bat or catalina.bat scripts.  Download a fresh copy of Tomcat and compare what you have with the unmodified copy.

well the window from which catalina start command has been fired comes
to command
prompt after showing four lines but it opens another window which shows
startup log remains open and if I close that Tomcat terminates.

I tried with .zip installation but matter remains the same. Main terminal window
comes to prompt and even it is closed tomcat keeps running. But it opens
another window which remains open and it contains startup log. If I press ^C
in that window tomcat terminates same if I close that window.
>
> As André noted, CTRL-C can be used to cleanly terminate the Tomcat process when you've terminated the original command window.
>

raja

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


RE: Putting Docbase on network drive. Is it Possible ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: R. S. Patil [mailto:kpr.rspatil@gmail.com]
> Subject: Re: Putting Docbase on network drive. Is it Possible ?
> 
> I ran the startup script in a terminal window. The terminal window wont
> come back to prompt as it does on Linux. For shutting down I have to
> open another window. Is it Normal or it has any other work around ?

No, that's not normal.  The startup.bat script uses the Windows "start" command to initiate the Tomcat process in a command window separate from the one the script is running in.  The original command window should return a prompt almost immediately after displaying four "Using xxx" lines.  If it doesn't do that, someone has modified - and broken - your startup.bat or catalina.bat scripts.  Download a fresh copy of Tomcat and compare what you have with the unmodified copy.

As André noted, CTRL-C can be used to cleanly terminate the Tomcat process when you've terminated the original command window.

 - 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: Putting Docbase on network drive. Is it Possible ?

Posted by "R. S. Patil" <kp...@gmail.com>.
Hi Chuck Caldarale

> Works fine for me - as long as I'm running Tomcat via the startup.bat script.  If you're running Tomcat as a service, the service has no access to any drive mappings you've made under your userid.
>

Yes it works with startup.bat script. I just tested it and found mapped drives
also work. Thanks for tip. BTW I have a small difficulty.

I ran the startup script in a terminal window. The terminal window wont
come back to prompt as it does on Linux. For shutting down I have to open
another window. Is it Normal or it has any other work around ?

Suppose if I have to restart tomcat what I have to do ?
simply close startup terminal window and in another terminal window
fire startup again ?

Thanks and best regards.

RAJA

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


RE: Putting Docbase on network drive. Is it Possible ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: R. S. Patil [mailto:kpr.rspatil@gmail.com]
> Subject: Putting Docbase on network drive. Is it Possible ?
> 
> I have created a Test-E.xml in C:\Program Files\Tomcat
> 6.0\conf\Catalina\localhost
> the contents are
> <Context path="/Test-E"
> 	docBase="E:/"
> 	antiResourceLocking="false"
> 	allowLinking="true"
> 	/>

Take out the path attribute (it's not allowed) and the allowLinking attribute (ineffective on Windows).

> If I try with http://localhost:8080/Test-E I wont get Error response.

Not getting an error response is usually a good thing.  What do you get?

> I am newbie to Tomcat and would like to know whether docbase 
> on mapped drives are permitted or Not ?

Works fine for me - as long as I'm running Tomcat via the startup.bat script.  If you're running Tomcat as a service, the service has no access to any drive mappings you've made under your userid.

 - 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