You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kiran Badi <ki...@poonam.org> on 2012/05/03 01:35:54 UTC

Re: How to run Tomcat as Service on windows start up.

I just want to have one instance of tomcat up and running always 
whenever I start my system exactly the way I have httpd service running 
always.

ok now moving forward, I installed the tomcat 7.0.27 as service,made 
changes to shutdown ports/APR ports etc and now its runing fine as a 
service.I have now 2 tomcats sitting in same apache directory one is 
7.0.11(this runs with netbeans) and another is 7.0.27(this runs as 
windows service).

Now I want to deploy the my app war file to 7.0.27.But for some reasons 
Manager App is not accepting my credentials.Here is what I did,
I copied the tomcat users file of 7.0.11 to 7.0.27 and after copying 
restarted the service again,and tried to give the same credentials which 
are working fine in 7.0.11,but to my surprise,those are not working in 
7.0.27
here is tomcat users file,(Sorry for pasting some commented section in 
below file,but its imp for me not to delete anything for which I dont 
have much information or knowledge).Pls note that his tomcat users file 
works perfect fine in 7.0.11 for user kiran/kiran

<?xml version='1.0' encoding='cp1252'?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<tomcat-users>
<user name="admin" password="kiran" roles="admin-gui,manager-gui" />
<!--
   NOTE:  By default, no user is included in the "manager-gui" role required
   to operate the "/manager/html" web application.  If you wish to use 
this app,
   you must define such a user - the username and password are arbitrary.
-->
<!--
   NOTE:  The sample user and role entries below are wrapped in a comment
   and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<tomcat-users>
<!--
   NOTE:  By default, no user is included in the "manager-gui" role required
   to operate the "/manager/html" web application.  If you wish to use 
this app,
   you must define such a user - the username and password are arbitrary.
-->
<!--
   NOTE:  The sample user and role entries below are wrapped in a comment
   and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<role rolename="AdminRole"/>
<role rolename="UserRole"/>
<user password="tomcat" roles="tomcat,role1" username="both"/>
<user password="tomcat" roles="UserRole" username="role1"/>
<user password="tomcat" roles="AdminRole,manager-script,admin" 
username="tomcat"/>
<role rolename="manager-gui"/>
<user username="kiran" password="kiran" roles="manager-gui"/>
<role rolename="probeuser" />
<role rolename="poweruser" />
<role rolename="poweruserplus" />
<role rolename="manager" />
<user username="admin" password="t0psecret" roles="manager" />
</tomcat-users>


Any ideas why its not working in 7.0.27 ?

My system is win 7 32 bit home premium with JDK 1.6.32
>> ________________________________
>> From: André Warnier<aw...@ice-sa.com>
>> To: Tomcat Users List<us...@tomcat.apache.org>
>> Sent: Sunday, April 29, 2012 2:18 PM
>> Subject: Re: How to run Tomcat as Service on windows start up.
>
>>> Mark Eggers wrote:
>>> NetBeans will complain that it cannot find the startup.bat and shutdown.bat
>>> required to do these tasks if you install the service.
>> Presumably then, you could replace startup.bat and shutdown.bat
>> by similarly-named .bat files which respectively do
>> net start "Apache Tomcat"
>> and
>> net stop "Apache Tomcat"
>> (to keep it simple)
>>
> I suppose you could. I don't know how intrusive NetBeans' investigation of the scripts are. In Windows Vista and Windows 7, UAC might become a problem. I'm not a Windows person, so I'd have to investigate this.
>
>> Similarly, it should be possible to create .bat files which run the Tomcat 
>> wrapper tomcatX.exe with the appropriate arguments to start, stop, or run 
>> Tomcat in debug mode.
>  From my recollection of the service, don't you have to configure the service for debug using the service configuration program? I'm not sure how you would handle that through NetBeans, since I believe it simply does what start.bat / catalina.bat require (pass the debug argument to catalina.bat).
>
> So, you might need a single startup.bat and shutdown.bat that would determine which service to run, and which service was running . . . .
>
>> No ?
>>
>> (Although, if I understood the OP's request correctly, the point here would
>> be to start Tomcat as a service as soon as Windows starts.  So presumably,
>> the necessity of having a "startup.bat" is not evident anymore).
> It's a little unclear as to what the OP request is. It sounds like the OP has two requirements:
>
> 1. Deal with Tomcat in a development environment using NetBeans
>
> To me this means starting, stopping, debugging, launching with the security manager, etc. That's hard to do when you don't own / completely control the service.
>
> The same problem exists in Linux. People want a system-wide Tomcat but want to use NetBean's deploy and debug facilities. There are all sorts of interesting permissions problems with this.
>
> NetBeans operates by deploying a context.xml file as [app-name].xml in the appropriate Engine/host directory. The application is actually run out of [project-name]/build. This works fine, and you can do a lot of dynamic updates in this fashion.
>
> What happens when the user of the IDE doesn't have access to post a context. xml to the appropriate directory? What happens when Tomcat doesn't have access to read a user's [project-name]/build directory?
>
> So for this use case, it's far easier and cleaner to maintain your own copy of Tomcat that can be registered, managed, and controlled by NetBeans.
>
> 2. Demonstrate works in progress to other developers
>
> Putting aside for the moment that turning development box into a demonstration server may not be a good thing, it's sometimes handy. For this I was recommending a system-wide Tomcat (run as a service). You then just use the manager application to update it with the latest demonstration-ready software.
>
> I think this has a few advantages. You don't show off intermediate (and potentially embarrassing) code. The service is up regardless of whether you're developing or not (OP's original request).
>
>
> . . . . just my two cents.
>
> /mde/
>
> ---------------------------------------------------------------------
> 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: How to run Tomcat as Service on windows start up.

Posted by Pid <pi...@pidster.com>.
On 04/05/2012 04:58, Kiran Badi wrote:
> 
> 
> 
> On 5/4/2012 7:32 AM, Caldarale, Charles R wrote:
>>> From: Kiran Badi [mailto:kiran@poonam.org]
>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>>>>>> Please don't top-post.
>>> What do you mean by this ?
>> http://lmgtfy.com/?q=top+post
>>
>>   - Chuck
> 
> Thanks Got it Chuck .Interesting stuff which I wasn't aware in spite of
> using usenet/online forums for years now.
> 
> Not sure as how relevant this topic is now given that most of the time
> even in our work environment,we often scroll down towards the bottom of
> the mail to see as what exactly is the communication about and each
> reply goes to the top of previous mail.

Relevant?!

Well, just imagine how much easier it would be if you read statements &
responses inline in chronological order, rather than having to
frantically scroll down and then up constantly to keep track of the
conversation.


p

> However I will ensure that I dont top post at least to this list.
> 
>>
>>
>> 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
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


-- 

[key:62590808]


Re: How to run Tomcat as Service on windows start up.

Posted by Kiran Badi <ki...@poonam.org>.


On 5/4/2012 7:32 AM, Caldarale, Charles R wrote:
>> From: Kiran Badi [mailto:kiran@poonam.org]
>> Subject: Re: How to run Tomcat as Service on windows start up.
>>>>>> Please don't top-post.
>> What do you mean by this ?
> http://lmgtfy.com/?q=top+post
>
>   - Chuck

Thanks Got it Chuck .Interesting stuff which I wasn't aware in spite of 
using usenet/online forums for years now.

Not sure as how relevant this topic is now given that most of the time 
even in our work environment,we often scroll down towards the bottom of 
the mail to see as what exactly is the communication about and each 
reply goes to the top of previous mail.

However I will ensure that I dont top post at least to this list.

>
>
> 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
>
>


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


RE: How to run Tomcat as Service on windows start up.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kiran Badi [mailto:kiran@poonam.org] 
> Subject: Re: How to run Tomcat as Service on windows start up.

> > >>>Please don't top-post.

> What do you mean by this ?

http://lmgtfy.com/?q=top+post

 - 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: How to run Tomcat as Service on windows start up.

Posted by Kiran Badi <ki...@poonam.org>.
Got this fixed, you were correct, tomcat user file was mess.Aligned it 
correctly now.

Now I am getting some other issue while deploying my app war file.Let me 
start a different thread on that.

>>>Please don't top-post.

What do you mean by this ?



On 5/3/2012 7:55 PM, Pid wrote:
> On 03/05/2012 15:02, Kiran Badi wrote:
>> No Luck Andre :-( , Removed one of the tomcat users tag,how do i
>> validate xml ?
>>
>> I tried with below tomcat users file,
>>
>> <tomcat-users>
>> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
>> <role rolename="AdminRole"/>
>> <role rolename="UserRole"/>
>> <user password="tomcat" roles="tomcat,role1" username="both"/>
>> <user password="tomcat" roles="UserRole" username="role1"/>
>> <user password="tomcat" roles="AdminRole,manager-script,admin"
>> username="tomcat"/>
>> <role rolename="manager-gui"/>
>> <user username="kiran" password="kiran" roles="manager-gui"/>
>> <role rolename="probeuser" />
>> <role rolename="poweruser" />
>> <role rolename="poweruserplus" />
>> <role rolename="manager" />
>> <user username="admin" password="t0psecret" roles="manager" />
>> </tomcat-users>
> Please don't top-post.
>
> Have you actually read the list of roles&  users you have?
>
> Perhaps if you tidied it up&  put them all in a sensible order, you see
> some of the problems you're making for yourself.
>
>
> p
>
>
>
>> On 5/3/2012 12:58 PM, André Warnier wrote:
>>> Kiran Badi wrote:
>>>> I just want to have one instance of tomcat up and running always
>>>> whenever I start my system exactly the way I have httpd service
>>>> running always.
>>>>
>>>> ok now moving forward, I installed the tomcat 7.0.27 as service,made
>>>> changes to shutdown ports/APR ports etc and now its runing fine as a
>>>> service.I have now 2 tomcats sitting in same apache directory one is
>>>> 7.0.11(this runs with netbeans) and another is 7.0.27(this runs as
>>>> windows service).
>>>>
>>>> Now I want to deploy the my app war file to 7.0.27.But for some
>>>> reasons Manager App is not accepting my credentials.Here is what I did,
>>>> I copied the tomcat users file of 7.0.11 to 7.0.27 and after copying
>>>> restarted the service again,and tried to give the same credentials
>>>> which are working fine in 7.0.11,but to my surprise,those are not
>>>> working in 7.0.27
>>>> here is tomcat users file,(Sorry for pasting some commented section
>>>> in below file,but its imp for me not to delete anything for which I
>>>> dont have much information or knowledge).Pls note that his tomcat
>>>> users file works perfect fine in 7.0.11 for user kiran/kiran
>>> If it does, then there is severe bug somewhere.  As shown below, that
>>> file has 2 openin<tomcat-users>  tags, and only one closing
>>> </tomcat-users>  tag. That is invalid xml.
>>> Try again.
>>>
>>> It is usually a better idea to make a copy of the original file as it
>>> was in the distribution (adding some suffix like ".original"), and
>>> then make a "working" version, removing all superfluous comments and
>>> leaving only what is really effective.
>>> It also makes it a lot easier for people on the list to spot the
>>> errors, without having to waft through kazillions of comment lines
>>> which may be badly-formatted in an email..
>>>
>>>
>>>
>>>> <?xml version='1.0' encoding='cp1252'?>
>>>> <!--
>>>>    Licensed to the Apache Software Foundation (ASF) under one or more
>>>>    contributor license agreements.  See the NOTICE file distributed with
>>>>    this work for additional information regarding copyright ownership.
>>>>    The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>>    (the "License"); you may not use this file except in compliance with
>>>>    the License.  You may obtain a copy of the License at
>>>>
>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>
>>>>    Unless required by applicable law or agreed to in writing, software
>>>>    distributed under the License is distributed on an "AS IS" BASIS,
>>>>    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>>    See the License for the specific language governing permissions and
>>>>    limitations under the License.
>>>> -->
>>>> <tomcat-users>
>>>> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
>>>> <!--
>>>>    NOTE:  By default, no user is included in the "manager-gui" role
>>>> required
>>>>    to operate the "/manager/html" web application.  If you wish to use
>>>> this app,
>>>>    you must define such a user - the username and password are arbitrary.
>>>> -->
>>>> <!--
>>>>    NOTE:  The sample user and role entries below are wrapped in a comment
>>>>    and thus are ignored when reading this file. Do not forget to remove
>>>> <!.. ..>  that surrounds them.
>>>> -->
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <!--
>>>>    Licensed to the Apache Software Foundation (ASF) under one or more
>>>>    contributor license agreements.  See the NOTICE file distributed with
>>>>    this work for additional information regarding copyright ownership.
>>>>    The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>>    (the "License"); you may not use this file except in compliance with
>>>>    the License.  You may obtain a copy of the License at
>>>>
>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>
>>>>    Unless required by applicable law or agreed to in writing, software
>>>>    distributed under the License is distributed on an "AS IS" BASIS,
>>>>    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>>    See the License for the specific language governing permissions and
>>>>    limitations under the License.
>>>> -->
>>>> <tomcat-users>
>>>> <!--
>>>>    NOTE:  By default, no user is included in the "manager-gui" role
>>>> required
>>>>    to operate the "/manager/html" web application.  If you wish to use
>>>> this app,
>>>>    you must define such a user - the username and password are arbitrary.
>>>> -->
>>>> <!--
>>>>    NOTE:  The sample user and role entries below are wrapped in a comment
>>>>    and thus are ignored when reading this file. Do not forget to remove
>>>> <!.. ..>  that surrounds them.
>>>> -->
>>>> <role rolename="AdminRole"/>
>>>> <role rolename="UserRole"/>
>>>> <user password="tomcat" roles="tomcat,role1" username="both"/>
>>>> <user password="tomcat" roles="UserRole" username="role1"/>
>>>> <user password="tomcat" roles="AdminRole,manager-script,admin"
>>>> username="tomcat"/>
>>>> <role rolename="manager-gui"/>
>>>> <user username="kiran" password="kiran" roles="manager-gui"/>
>>>> <role rolename="probeuser" />
>>>> <role rolename="poweruser" />
>>>> <role rolename="poweruserplus" />
>>>> <role rolename="manager" />
>>>> <user username="admin" password="t0psecret" roles="manager" />
>>>> </tomcat-users>
>>>>
>>>>
>>>> Any ideas why its not working in 7.0.27 ?
>>>>
>>>> My system is win 7 32 bit home premium with JDK 1.6.32
>>>>>> ________________________________
>>>>>> From: André Warnier<aw...@ice-sa.com>
>>>>>> To: Tomcat Users List<us...@tomcat.apache.org>
>>>>>> Sent: Sunday, April 29, 2012 2:18 PM
>>>>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>>>>>> Mark Eggers wrote:
>>>>>>> NetBeans will complain that it cannot find the startup.bat and
>>>>>>> shutdown.bat
>>>>>>> required to do these tasks if you install the service.
>>>>>> Presumably then, you could replace startup.bat and shutdown.bat
>>>>>> by similarly-named .bat files which respectively do
>>>>>> net start "Apache Tomcat"
>>>>>> and
>>>>>> net stop "Apache Tomcat"
>>>>>> (to keep it simple)
>>>>>>
>>>>> I suppose you could. I don't know how intrusive NetBeans'
>>>>> investigation of the scripts are. In Windows Vista and Windows 7,
>>>>> UAC might become a problem. I'm not a Windows person, so I'd have to
>>>>> investigate this.
>>>>>
>>>>>> Similarly, it should be possible to create .bat files which run the
>>>>>> Tomcat wrapper tomcatX.exe with the appropriate arguments to start,
>>>>>> stop, or run Tomcat in debug mode.
>>>>>    From my recollection of the service, don't you have to configure
>>>>> the service for debug using the service configuration program? I'm
>>>>> not sure how you would handle that through NetBeans, since I believe
>>>>> it simply does what start.bat / catalina.bat require (pass the debug
>>>>> argument to catalina.bat).
>>>>>
>>>>> So, you might need a single startup.bat and shutdown.bat that would
>>>>> determine which service to run, and which service was running . . . .
>>>>>
>>>>>> No ?
>>>>>>
>>>>>> (Although, if I understood the OP's request correctly, the point
>>>>>> here would
>>>>>> be to start Tomcat as a service as soon as Windows starts.  So
>>>>>> presumably,
>>>>>> the necessity of having a "startup.bat" is not evident anymore).
>>>>> It's a little unclear as to what the OP request is. It sounds like
>>>>> the OP has two requirements:
>>>>>
>>>>> 1. Deal with Tomcat in a development environment using NetBeans
>>>>>
>>>>> To me this means starting, stopping, debugging, launching with the
>>>>> security manager, etc. That's hard to do when you don't own /
>>>>> completely control the service.
>>>>>
>>>>> The same problem exists in Linux. People want a system-wide Tomcat
>>>>> but want to use NetBean's deploy and debug facilities. There are all
>>>>> sorts of interesting permissions problems with this.
>>>>>
>>>>> NetBeans operates by deploying a context.xml file as [app-name].xml
>>>>> in the appropriate Engine/host directory. The application is
>>>>> actually run out of [project-name]/build. This works fine, and you
>>>>> can do a lot of dynamic updates in this fashion.
>>>>>
>>>>> What happens when the user of the IDE doesn't have access to post a
>>>>> context. xml to the appropriate directory? What happens when Tomcat
>>>>> doesn't have access to read a user's [project-name]/build directory?
>>>>>
>>>>> So for this use case, it's far easier and cleaner to maintain your
>>>>> own copy of Tomcat that can be registered, managed, and controlled
>>>>> by NetBeans.
>>>>>
>>>>> 2. Demonstrate works in progress to other developers
>>>>>
>>>>> Putting aside for the moment that turning development box into a
>>>>> demonstration server may not be a good thing, it's sometimes handy.
>>>>> For this I was recommending a system-wide Tomcat (run as a service).
>>>>> You then just use the manager application to update it with the
>>>>> latest demonstration-ready software.
>>>>>
>>>>> I think this has a few advantages. You don't show off intermediate
>>>>> (and potentially embarrassing) code. The service is up regardless of
>>>>> whether you're developing or not (OP's original request).
>>>>>
>>>>>
>>>>> . . . . just my two cents.
>>>>>
>>>>> /mde/
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>


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


Re: How to run Tomcat as Service on windows start up.

Posted by Pid <pi...@pidster.com>.
On 03/05/2012 15:02, Kiran Badi wrote:
> No Luck Andre :-( , Removed one of the tomcat users tag,how do i
> validate xml ?
> 
> I tried with below tomcat users file,
> 
> <tomcat-users>
> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
> <role rolename="AdminRole"/>
> <role rolename="UserRole"/>
> <user password="tomcat" roles="tomcat,role1" username="both"/>
> <user password="tomcat" roles="UserRole" username="role1"/>
> <user password="tomcat" roles="AdminRole,manager-script,admin"
> username="tomcat"/>
> <role rolename="manager-gui"/>
> <user username="kiran" password="kiran" roles="manager-gui"/>
> <role rolename="probeuser" />
> <role rolename="poweruser" />
> <role rolename="poweruserplus" />
> <role rolename="manager" />
> <user username="admin" password="t0psecret" roles="manager" />
> </tomcat-users>

Please don't top-post.

Have you actually read the list of roles & users you have?

Perhaps if you tidied it up & put them all in a sensible order, you see
some of the problems you're making for yourself.


p



> On 5/3/2012 12:58 PM, André Warnier wrote:
>> Kiran Badi wrote:
>>> I just want to have one instance of tomcat up and running always
>>> whenever I start my system exactly the way I have httpd service
>>> running always.
>>>
>>> ok now moving forward, I installed the tomcat 7.0.27 as service,made
>>> changes to shutdown ports/APR ports etc and now its runing fine as a
>>> service.I have now 2 tomcats sitting in same apache directory one is
>>> 7.0.11(this runs with netbeans) and another is 7.0.27(this runs as
>>> windows service).
>>>
>>> Now I want to deploy the my app war file to 7.0.27.But for some
>>> reasons Manager App is not accepting my credentials.Here is what I did,
>>> I copied the tomcat users file of 7.0.11 to 7.0.27 and after copying
>>> restarted the service again,and tried to give the same credentials
>>> which are working fine in 7.0.11,but to my surprise,those are not
>>> working in 7.0.27
>>> here is tomcat users file,(Sorry for pasting some commented section
>>> in below file,but its imp for me not to delete anything for which I
>>> dont have much information or knowledge).Pls note that his tomcat
>>> users file works perfect fine in 7.0.11 for user kiran/kiran
>>
>> If it does, then there is severe bug somewhere.  As shown below, that
>> file has 2 openin <tomcat-users> tags, and only one closing
>> </tomcat-users> tag. That is invalid xml.
>> Try again.
>>
>> It is usually a better idea to make a copy of the original file as it
>> was in the distribution (adding some suffix like ".original"), and
>> then make a "working" version, removing all superfluous comments and
>> leaving only what is really effective.
>> It also makes it a lot easier for people on the list to spot the
>> errors, without having to waft through kazillions of comment lines
>> which may be badly-formatted in an email..
>>
>>
>>
>>>
>>> <?xml version='1.0' encoding='cp1252'?>
>>> <!--
>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>   contributor license agreements.  See the NOTICE file distributed with
>>>   this work for additional information regarding copyright ownership.
>>>   The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>>   (the "License"); you may not use this file except in compliance with
>>>   the License.  You may obtain a copy of the License at
>>>
>>>       http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>   Unless required by applicable law or agreed to in writing, software
>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>   See the License for the specific language governing permissions and
>>>   limitations under the License.
>>> -->
>>> <tomcat-users>
>>> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
>>> <!--
>>>   NOTE:  By default, no user is included in the "manager-gui" role
>>> required
>>>   to operate the "/manager/html" web application.  If you wish to use
>>> this app,
>>>   you must define such a user - the username and password are arbitrary.
>>> -->
>>> <!--
>>>   NOTE:  The sample user and role entries below are wrapped in a comment
>>>   and thus are ignored when reading this file. Do not forget to remove
>>> <!.. ..> that surrounds them.
>>> -->
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!--
>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>   contributor license agreements.  See the NOTICE file distributed with
>>>   this work for additional information regarding copyright ownership.
>>>   The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>>   (the "License"); you may not use this file except in compliance with
>>>   the License.  You may obtain a copy of the License at
>>>
>>>       http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>   Unless required by applicable law or agreed to in writing, software
>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>   See the License for the specific language governing permissions and
>>>   limitations under the License.
>>> -->
>>> <tomcat-users>
>>> <!--
>>>   NOTE:  By default, no user is included in the "manager-gui" role
>>> required
>>>   to operate the "/manager/html" web application.  If you wish to use
>>> this app,
>>>   you must define such a user - the username and password are arbitrary.
>>> -->
>>> <!--
>>>   NOTE:  The sample user and role entries below are wrapped in a comment
>>>   and thus are ignored when reading this file. Do not forget to remove
>>> <!.. ..> that surrounds them.
>>> -->
>>> <role rolename="AdminRole"/>
>>> <role rolename="UserRole"/>
>>> <user password="tomcat" roles="tomcat,role1" username="both"/>
>>> <user password="tomcat" roles="UserRole" username="role1"/>
>>> <user password="tomcat" roles="AdminRole,manager-script,admin"
>>> username="tomcat"/>
>>> <role rolename="manager-gui"/>
>>> <user username="kiran" password="kiran" roles="manager-gui"/>
>>> <role rolename="probeuser" />
>>> <role rolename="poweruser" />
>>> <role rolename="poweruserplus" />
>>> <role rolename="manager" />
>>> <user username="admin" password="t0psecret" roles="manager" />
>>> </tomcat-users>
>>>
>>>
>>> Any ideas why its not working in 7.0.27 ?
>>>
>>> My system is win 7 32 bit home premium with JDK 1.6.32
>>>>> ________________________________
>>>>> From: André Warnier<aw...@ice-sa.com>
>>>>> To: Tomcat Users List<us...@tomcat.apache.org>
>>>>> Sent: Sunday, April 29, 2012 2:18 PM
>>>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>>>
>>>>>> Mark Eggers wrote:
>>>>>> NetBeans will complain that it cannot find the startup.bat and
>>>>>> shutdown.bat
>>>>>> required to do these tasks if you install the service.
>>>>> Presumably then, you could replace startup.bat and shutdown.bat
>>>>> by similarly-named .bat files which respectively do
>>>>> net start "Apache Tomcat"
>>>>> and
>>>>> net stop "Apache Tomcat"
>>>>> (to keep it simple)
>>>>>
>>>> I suppose you could. I don't know how intrusive NetBeans'
>>>> investigation of the scripts are. In Windows Vista and Windows 7,
>>>> UAC might become a problem. I'm not a Windows person, so I'd have to
>>>> investigate this.
>>>>
>>>>> Similarly, it should be possible to create .bat files which run the
>>>>> Tomcat wrapper tomcatX.exe with the appropriate arguments to start,
>>>>> stop, or run Tomcat in debug mode.
>>>>  From my recollection of the service, don't you have to configure
>>>> the service for debug using the service configuration program? I'm
>>>> not sure how you would handle that through NetBeans, since I believe
>>>> it simply does what start.bat / catalina.bat require (pass the debug
>>>> argument to catalina.bat).
>>>>
>>>> So, you might need a single startup.bat and shutdown.bat that would
>>>> determine which service to run, and which service was running . . . .
>>>>
>>>>> No ?
>>>>>
>>>>> (Although, if I understood the OP's request correctly, the point
>>>>> here would
>>>>> be to start Tomcat as a service as soon as Windows starts.  So
>>>>> presumably,
>>>>> the necessity of having a "startup.bat" is not evident anymore).
>>>> It's a little unclear as to what the OP request is. It sounds like
>>>> the OP has two requirements:
>>>>
>>>> 1. Deal with Tomcat in a development environment using NetBeans
>>>>
>>>> To me this means starting, stopping, debugging, launching with the
>>>> security manager, etc. That's hard to do when you don't own /
>>>> completely control the service.
>>>>
>>>> The same problem exists in Linux. People want a system-wide Tomcat
>>>> but want to use NetBean's deploy and debug facilities. There are all
>>>> sorts of interesting permissions problems with this.
>>>>
>>>> NetBeans operates by deploying a context.xml file as [app-name].xml
>>>> in the appropriate Engine/host directory. The application is
>>>> actually run out of [project-name]/build. This works fine, and you
>>>> can do a lot of dynamic updates in this fashion.
>>>>
>>>> What happens when the user of the IDE doesn't have access to post a
>>>> context. xml to the appropriate directory? What happens when Tomcat
>>>> doesn't have access to read a user's [project-name]/build directory?
>>>>
>>>> So for this use case, it's far easier and cleaner to maintain your
>>>> own copy of Tomcat that can be registered, managed, and controlled
>>>> by NetBeans.
>>>>
>>>> 2. Demonstrate works in progress to other developers
>>>>
>>>> Putting aside for the moment that turning development box into a
>>>> demonstration server may not be a good thing, it's sometimes handy.
>>>> For this I was recommending a system-wide Tomcat (run as a service).
>>>> You then just use the manager application to update it with the
>>>> latest demonstration-ready software.
>>>>
>>>> I think this has a few advantages. You don't show off intermediate
>>>> (and potentially embarrassing) code. The service is up regardless of
>>>> whether you're developing or not (OP's original request).
>>>>
>>>>
>>>> . . . . just my two cents.
>>>>
>>>> /mde/
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 


-- 

[key:62590808]


Re: How to run Tomcat as Service on windows start up.

Posted by Kiran Badi <ki...@poonam.org>.
No Luck Andre :-( , Removed one of the tomcat users tag,how do i 
validate xml ?

I tried with below tomcat users file,

<tomcat-users>
<user name="admin" password="kiran" roles="admin-gui,manager-gui" />
<role rolename="AdminRole"/>
<role rolename="UserRole"/>
<user password="tomcat" roles="tomcat,role1" username="both"/>
<user password="tomcat" roles="UserRole" username="role1"/>
<user password="tomcat" roles="AdminRole,manager-script,admin" 
username="tomcat"/>
<role rolename="manager-gui"/>
<user username="kiran" password="kiran" roles="manager-gui"/>
<role rolename="probeuser" />
<role rolename="poweruser" />
<role rolename="poweruserplus" />
<role rolename="manager" />
<user username="admin" password="t0psecret" roles="manager" />
</tomcat-users>
On 5/3/2012 12:58 PM, André Warnier wrote:
> Kiran Badi wrote:
>> I just want to have one instance of tomcat up and running always 
>> whenever I start my system exactly the way I have httpd service 
>> running always.
>>
>> ok now moving forward, I installed the tomcat 7.0.27 as service,made 
>> changes to shutdown ports/APR ports etc and now its runing fine as a 
>> service.I have now 2 tomcats sitting in same apache directory one is 
>> 7.0.11(this runs with netbeans) and another is 7.0.27(this runs as 
>> windows service).
>>
>> Now I want to deploy the my app war file to 7.0.27.But for some 
>> reasons Manager App is not accepting my credentials.Here is what I did,
>> I copied the tomcat users file of 7.0.11 to 7.0.27 and after copying 
>> restarted the service again,and tried to give the same credentials 
>> which are working fine in 7.0.11,but to my surprise,those are not 
>> working in 7.0.27
>> here is tomcat users file,(Sorry for pasting some commented section 
>> in below file,but its imp for me not to delete anything for which I 
>> dont have much information or knowledge).Pls note that his tomcat 
>> users file works perfect fine in 7.0.11 for user kiran/kiran
>
> If it does, then there is severe bug somewhere.  As shown below, that 
> file has 2 openin <tomcat-users> tags, and only one closing 
> </tomcat-users> tag. That is invalid xml.
> Try again.
>
> It is usually a better idea to make a copy of the original file as it 
> was in the distribution (adding some suffix like ".original"), and 
> then make a "working" version, removing all superfluous comments and 
> leaving only what is really effective.
> It also makes it a lot easier for people on the list to spot the 
> errors, without having to waft through kazillions of comment lines 
> which may be badly-formatted in an email..
>
>
>
>>
>> <?xml version='1.0' encoding='cp1252'?>
>> <!--
>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>   contributor license agreements.  See the NOTICE file distributed with
>>   this work for additional information regarding copyright ownership.
>>   The ASF licenses this file to You under the Apache License, Version 
>> 2.0
>>   (the "License"); you may not use this file except in compliance with
>>   the License.  You may obtain a copy of the License at
>>
>>       http://www.apache.org/licenses/LICENSE-2.0
>>
>>   Unless required by applicable law or agreed to in writing, software
>>   distributed under the License is distributed on an "AS IS" BASIS,
>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>> implied.
>>   See the License for the specific language governing permissions and
>>   limitations under the License.
>> -->
>> <tomcat-users>
>> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
>> <!--
>>   NOTE:  By default, no user is included in the "manager-gui" role 
>> required
>>   to operate the "/manager/html" web application.  If you wish to use 
>> this app,
>>   you must define such a user - the username and password are arbitrary.
>> -->
>> <!--
>>   NOTE:  The sample user and role entries below are wrapped in a comment
>>   and thus are ignored when reading this file. Do not forget to remove
>> <!.. ..> that surrounds them.
>> -->
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>   contributor license agreements.  See the NOTICE file distributed with
>>   this work for additional information regarding copyright ownership.
>>   The ASF licenses this file to You under the Apache License, Version 
>> 2.0
>>   (the "License"); you may not use this file except in compliance with
>>   the License.  You may obtain a copy of the License at
>>
>>       http://www.apache.org/licenses/LICENSE-2.0
>>
>>   Unless required by applicable law or agreed to in writing, software
>>   distributed under the License is distributed on an "AS IS" BASIS,
>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>> implied.
>>   See the License for the specific language governing permissions and
>>   limitations under the License.
>> -->
>> <tomcat-users>
>> <!--
>>   NOTE:  By default, no user is included in the "manager-gui" role 
>> required
>>   to operate the "/manager/html" web application.  If you wish to use 
>> this app,
>>   you must define such a user - the username and password are arbitrary.
>> -->
>> <!--
>>   NOTE:  The sample user and role entries below are wrapped in a comment
>>   and thus are ignored when reading this file. Do not forget to remove
>> <!.. ..> that surrounds them.
>> -->
>> <role rolename="AdminRole"/>
>> <role rolename="UserRole"/>
>> <user password="tomcat" roles="tomcat,role1" username="both"/>
>> <user password="tomcat" roles="UserRole" username="role1"/>
>> <user password="tomcat" roles="AdminRole,manager-script,admin" 
>> username="tomcat"/>
>> <role rolename="manager-gui"/>
>> <user username="kiran" password="kiran" roles="manager-gui"/>
>> <role rolename="probeuser" />
>> <role rolename="poweruser" />
>> <role rolename="poweruserplus" />
>> <role rolename="manager" />
>> <user username="admin" password="t0psecret" roles="manager" />
>> </tomcat-users>
>>
>>
>> Any ideas why its not working in 7.0.27 ?
>>
>> My system is win 7 32 bit home premium with JDK 1.6.32
>>>> ________________________________
>>>> From: André Warnier<aw...@ice-sa.com>
>>>> To: Tomcat Users List<us...@tomcat.apache.org>
>>>> Sent: Sunday, April 29, 2012 2:18 PM
>>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>>
>>>>> Mark Eggers wrote:
>>>>> NetBeans will complain that it cannot find the startup.bat and 
>>>>> shutdown.bat
>>>>> required to do these tasks if you install the service.
>>>> Presumably then, you could replace startup.bat and shutdown.bat
>>>> by similarly-named .bat files which respectively do
>>>> net start "Apache Tomcat"
>>>> and
>>>> net stop "Apache Tomcat"
>>>> (to keep it simple)
>>>>
>>> I suppose you could. I don't know how intrusive NetBeans' 
>>> investigation of the scripts are. In Windows Vista and Windows 7, 
>>> UAC might become a problem. I'm not a Windows person, so I'd have to 
>>> investigate this.
>>>
>>>> Similarly, it should be possible to create .bat files which run the 
>>>> Tomcat wrapper tomcatX.exe with the appropriate arguments to start, 
>>>> stop, or run Tomcat in debug mode.
>>>  From my recollection of the service, don't you have to configure 
>>> the service for debug using the service configuration program? I'm 
>>> not sure how you would handle that through NetBeans, since I believe 
>>> it simply does what start.bat / catalina.bat require (pass the debug 
>>> argument to catalina.bat).
>>>
>>> So, you might need a single startup.bat and shutdown.bat that would 
>>> determine which service to run, and which service was running . . . .
>>>
>>>> No ?
>>>>
>>>> (Although, if I understood the OP's request correctly, the point 
>>>> here would
>>>> be to start Tomcat as a service as soon as Windows starts.  So 
>>>> presumably,
>>>> the necessity of having a "startup.bat" is not evident anymore).
>>> It's a little unclear as to what the OP request is. It sounds like 
>>> the OP has two requirements:
>>>
>>> 1. Deal with Tomcat in a development environment using NetBeans
>>>
>>> To me this means starting, stopping, debugging, launching with the 
>>> security manager, etc. That's hard to do when you don't own / 
>>> completely control the service.
>>>
>>> The same problem exists in Linux. People want a system-wide Tomcat 
>>> but want to use NetBean's deploy and debug facilities. There are all 
>>> sorts of interesting permissions problems with this.
>>>
>>> NetBeans operates by deploying a context.xml file as [app-name].xml 
>>> in the appropriate Engine/host directory. The application is 
>>> actually run out of [project-name]/build. This works fine, and you 
>>> can do a lot of dynamic updates in this fashion.
>>>
>>> What happens when the user of the IDE doesn't have access to post a 
>>> context. xml to the appropriate directory? What happens when Tomcat 
>>> doesn't have access to read a user's [project-name]/build directory?
>>>
>>> So for this use case, it's far easier and cleaner to maintain your 
>>> own copy of Tomcat that can be registered, managed, and controlled 
>>> by NetBeans.
>>>
>>> 2. Demonstrate works in progress to other developers
>>>
>>> Putting aside for the moment that turning development box into a 
>>> demonstration server may not be a good thing, it's sometimes handy. 
>>> For this I was recommending a system-wide Tomcat (run as a service). 
>>> You then just use the manager application to update it with the 
>>> latest demonstration-ready software.
>>>
>>> I think this has a few advantages. You don't show off intermediate 
>>> (and potentially embarrassing) code. The service is up regardless of 
>>> whether you're developing or not (OP's original request).
>>>
>>>
>>> . . . . just my two cents.
>>>
>>> /mde/
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: How to run Tomcat as Service on windows start up.

Posted by André Warnier <aw...@ice-sa.com>.
Kiran Badi wrote:
> I just want to have one instance of tomcat up and running always 
> whenever I start my system exactly the way I have httpd service running 
> always.
> 
> ok now moving forward, I installed the tomcat 7.0.27 as service,made 
> changes to shutdown ports/APR ports etc and now its runing fine as a 
> service.I have now 2 tomcats sitting in same apache directory one is 
> 7.0.11(this runs with netbeans) and another is 7.0.27(this runs as 
> windows service).
> 
> Now I want to deploy the my app war file to 7.0.27.But for some reasons 
> Manager App is not accepting my credentials.Here is what I did,
> I copied the tomcat users file of 7.0.11 to 7.0.27 and after copying 
> restarted the service again,and tried to give the same credentials which 
> are working fine in 7.0.11,but to my surprise,those are not working in 
> 7.0.27
> here is tomcat users file,(Sorry for pasting some commented section in 
> below file,but its imp for me not to delete anything for which I dont 
> have much information or knowledge).Pls note that his tomcat users file 
> works perfect fine in 7.0.11 for user kiran/kiran

If it does, then there is severe bug somewhere.  As shown below, that file has 2 openin 
<tomcat-users> tags, and only one closing </tomcat-users> tag. That is invalid xml.
Try again.

It is usually a better idea to make a copy of the original file as it was in the 
distribution (adding some suffix like ".original"), and then make a "working" version, 
removing all superfluous comments and leaving only what is really effective.
It also makes it a lot easier for people on the list to spot the errors, without having to 
waft through kazillions of comment lines which may be badly-formatted in an email..



> 
> <?xml version='1.0' encoding='cp1252'?>
> <!--
>   Licensed to the Apache Software Foundation (ASF) under one or more
>   contributor license agreements.  See the NOTICE file distributed with
>   this work for additional information regarding copyright ownership.
>   The ASF licenses this file to You under the Apache License, Version 2.0
>   (the "License"); you may not use this file except in compliance with
>   the License.  You may obtain a copy of the License at
> 
>       http://www.apache.org/licenses/LICENSE-2.0
> 
>   Unless required by applicable law or agreed to in writing, software
>   distributed under the License is distributed on an "AS IS" BASIS,
>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>   See the License for the specific language governing permissions and
>   limitations under the License.
> -->
> <tomcat-users>
> <user name="admin" password="kiran" roles="admin-gui,manager-gui" />
> <!--
>   NOTE:  By default, no user is included in the "manager-gui" role required
>   to operate the "/manager/html" web application.  If you wish to use 
> this app,
>   you must define such a user - the username and password are arbitrary.
> -->
> <!--
>   NOTE:  The sample user and role entries below are wrapped in a comment
>   and thus are ignored when reading this file. Do not forget to remove
> <!.. ..> that surrounds them.
> -->
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>   Licensed to the Apache Software Foundation (ASF) under one or more
>   contributor license agreements.  See the NOTICE file distributed with
>   this work for additional information regarding copyright ownership.
>   The ASF licenses this file to You under the Apache License, Version 2.0
>   (the "License"); you may not use this file except in compliance with
>   the License.  You may obtain a copy of the License at
> 
>       http://www.apache.org/licenses/LICENSE-2.0
> 
>   Unless required by applicable law or agreed to in writing, software
>   distributed under the License is distributed on an "AS IS" BASIS,
>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>   See the License for the specific language governing permissions and
>   limitations under the License.
> -->
> <tomcat-users>
> <!--
>   NOTE:  By default, no user is included in the "manager-gui" role required
>   to operate the "/manager/html" web application.  If you wish to use 
> this app,
>   you must define such a user - the username and password are arbitrary.
> -->
> <!--
>   NOTE:  The sample user and role entries below are wrapped in a comment
>   and thus are ignored when reading this file. Do not forget to remove
> <!.. ..> that surrounds them.
> -->
> <role rolename="AdminRole"/>
> <role rolename="UserRole"/>
> <user password="tomcat" roles="tomcat,role1" username="both"/>
> <user password="tomcat" roles="UserRole" username="role1"/>
> <user password="tomcat" roles="AdminRole,manager-script,admin" 
> username="tomcat"/>
> <role rolename="manager-gui"/>
> <user username="kiran" password="kiran" roles="manager-gui"/>
> <role rolename="probeuser" />
> <role rolename="poweruser" />
> <role rolename="poweruserplus" />
> <role rolename="manager" />
> <user username="admin" password="t0psecret" roles="manager" />
> </tomcat-users>
> 
> 
> Any ideas why its not working in 7.0.27 ?
> 
> My system is win 7 32 bit home premium with JDK 1.6.32
>>> ________________________________
>>> From: André Warnier<aw...@ice-sa.com>
>>> To: Tomcat Users List<us...@tomcat.apache.org>
>>> Sent: Sunday, April 29, 2012 2:18 PM
>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>
>>>> Mark Eggers wrote:
>>>> NetBeans will complain that it cannot find the startup.bat and 
>>>> shutdown.bat
>>>> required to do these tasks if you install the service.
>>> Presumably then, you could replace startup.bat and shutdown.bat
>>> by similarly-named .bat files which respectively do
>>> net start "Apache Tomcat"
>>> and
>>> net stop "Apache Tomcat"
>>> (to keep it simple)
>>>
>> I suppose you could. I don't know how intrusive NetBeans' 
>> investigation of the scripts are. In Windows Vista and Windows 7, UAC 
>> might become a problem. I'm not a Windows person, so I'd have to 
>> investigate this.
>>
>>> Similarly, it should be possible to create .bat files which run the 
>>> Tomcat wrapper tomcatX.exe with the appropriate arguments to start, 
>>> stop, or run Tomcat in debug mode.
>>  From my recollection of the service, don't you have to configure the 
>> service for debug using the service configuration program? I'm not 
>> sure how you would handle that through NetBeans, since I believe it 
>> simply does what start.bat / catalina.bat require (pass the debug 
>> argument to catalina.bat).
>>
>> So, you might need a single startup.bat and shutdown.bat that would 
>> determine which service to run, and which service was running . . . .
>>
>>> No ?
>>>
>>> (Although, if I understood the OP's request correctly, the point here 
>>> would
>>> be to start Tomcat as a service as soon as Windows starts.  So 
>>> presumably,
>>> the necessity of having a "startup.bat" is not evident anymore).
>> It's a little unclear as to what the OP request is. It sounds like the 
>> OP has two requirements:
>>
>> 1. Deal with Tomcat in a development environment using NetBeans
>>
>> To me this means starting, stopping, debugging, launching with the 
>> security manager, etc. That's hard to do when you don't own / 
>> completely control the service.
>>
>> The same problem exists in Linux. People want a system-wide Tomcat but 
>> want to use NetBean's deploy and debug facilities. There are all sorts 
>> of interesting permissions problems with this.
>>
>> NetBeans operates by deploying a context.xml file as [app-name].xml in 
>> the appropriate Engine/host directory. The application is actually run 
>> out of [project-name]/build. This works fine, and you can do a lot of 
>> dynamic updates in this fashion.
>>
>> What happens when the user of the IDE doesn't have access to post a 
>> context. xml to the appropriate directory? What happens when Tomcat 
>> doesn't have access to read a user's [project-name]/build directory?
>>
>> So for this use case, it's far easier and cleaner to maintain your own 
>> copy of Tomcat that can be registered, managed, and controlled by 
>> NetBeans.
>>
>> 2. Demonstrate works in progress to other developers
>>
>> Putting aside for the moment that turning development box into a 
>> demonstration server may not be a good thing, it's sometimes handy. 
>> For this I was recommending a system-wide Tomcat (run as a service). 
>> You then just use the manager application to update it with the latest 
>> demonstration-ready software.
>>
>> I think this has a few advantages. You don't show off intermediate 
>> (and potentially embarrassing) code. The service is up regardless of 
>> whether you're developing or not (OP's original request).
>>
>>
>> . . . . just my two cents.
>>
>> /mde/
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 


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