Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Tom Burke
I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to 
automatically shut it down  restart it. One way is to control it via 
shutdown.bat  startup.bat, and run these as scheduled tasks at (say) 
3:30am and 3:31am. However, I've noticed that while shutdown.bat will 
shut it down if it was previously started as a service, startup.bat 
won't run it as a service, it starts it at a command prompt.


My question is: does this matter? If I'm running on Windows are there 
any advantages to running Tomcat as a service? Or disadvantages to 
running from the command prompt? The server is dedicated to tomcat, by 
the way.


Tom Burke 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fw: Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Tom Burke
Thanks to Peter and other who made this, in retrospect, obvious 
suggestion! I'm pleased to say it works perfectly.


Tom Burke


- Original Message - 
From: Peter Crowther [EMAIL PROTECTED]

To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, October 12, 2005 11:49 AM
Subject: RE: Tomcat on Windows: advantages of running as a service?



From: Tom Burke [mailto:[EMAIL PROTECTED]
Sent: 12 October 2005 11:18
To: Tomcat Users List
Subject: Tomcat on Windows: advantages of running as a service?

I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to
automatically shut it down  restart it. One way is to control it via
shutdown.bat  startup.bat, and run these as scheduled tasks at (say)
3:30am and 3:31am. However, I've noticed that while shutdown.bat will
shut it down if it was previously started as a service, startup.bat
won't run it as a service, it starts it at a command prompt.


Why not use net stop servicename and net start servicename with the
name of the Tomcat service?


My question is: does this matter? If I'm running on Windows are there
any advantages to running Tomcat as a service? Or disadvantages to
running from the command prompt?


If you run it as a service: you can ensure it restarts if the machine
reboots unexpectedly for any reason; you can take actions if the service
crashes; and you can run the service as a specified user fairly simply.
If you run from the command line, you have none of these options.

- Peter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configure multiple number of aliases / sub-domains

2005-09-22 Thread Tom Burke
The Hosts file is hold-over from the pre-DNS method of finding IP 
addresses. Basically, there's a file - 'Hosts' - that holds addresses, 
in the format:


domain_nameip_address eg
myhost.co.uk123.45.123.45

At one time this was the only way that machines on the Internet knew the 
addresses of other machines, and a new Hosts file would be circulated 
(by email) to all the sysadmins who managed connected hosts. (Google for 
'Jonathan Postel' if you want to know more about these early days.) 
Obviously, DNS has replaced all this, except that Hosts remains - in a 
Windows system you'll find it in:

[windir]\System32\Drivers\Etc

In Linux/Unix I think it's still in /etc ; I remember frantically 
editing /etc/hosts on many systems in the past!


So this is all a part of server-name resolution within networking, not 
Tomcat.


Tom


- Original Message - 
From: Assaf [EMAIL PROTECTED]

To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, September 22, 2005 9:02 AM
Subject: Re: Configure multiple number of aliases / sub-domains



My problem is not with the DNS settings. They are
mapped to the same IP address (my machine) and that
works fine.

What do you mean your 'hosts' file? Currently I have a
host node in the server.xml file. Under it I define
the various aliases (subdomains).

Thanks,

Assaf

--- Kyle [EMAIL PROTECTED] wrote:


You'll have to programmatically update your 'hosts'
file to add in each
and every new sub-domain(i.e. virtualhost name) as
they signup and make
sure your machine is set to check 'hosts' for dns
before going anywhere
else.

That should do the trick.

Disclaimer: I've done this on Windows, but haven't
tried it on linux.

Kyle





__
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat restart ptoblem

2005-09-21 Thread Tom Burke

What's the system? Windows, Linux/Unix?

Tom


- Original Message - 
From: mukesh [EMAIL PROTECTED]

To: tomcat-user@jakarta.apache.org
Sent: Wednesday, September 21, 2005 11:12 AM
Subject: tomcat restart ptoblem



Hi friends,



   I have installed Tomcat 5.5. It was working fine but my 
system
has got restarted and then onwards I am not able to restart the 
server.




   What could be the reasons? (Sorry if this question have 
been

already asked)



   Please advice.



Regards,

Mukesh Kumar





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat restart ptoblem

2005-09-21 Thread Tom Burke
Is it installed as a Windows Service? Is the Service set to start 
automatically? If it isn't, you know what to do!


If it is but it isn't starting successfully, try the following:-

a) try to Start the service manually;
b) if it fails, examine the Windows Event log, as well as the various 
Tomcat logs.


Tom


- Original Message - 
From: mukesh [EMAIL PROTECTED]

To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Sent: Wednesday, September 21, 2005 1:57 PM
Subject: RE: tomcat restart ptoblem



Hi Tom,

Its WindowsServer 2003 Standard Edition.

Regards,
Mukesh

-Original Message-
From: Tom Burke [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 21, 2005 4:21 PM
To: Tomcat Users List
Subject: Re: tomcat restart ptoblem

What's the system? Windows, Linux/Unix?

Tom


- Original Message - 
From: mukesh [EMAIL PROTECTED]

To: tomcat-user@jakarta.apache.org
Sent: Wednesday, September 21, 2005 11:12 AM
Subject: tomcat restart ptoblem



Hi friends,



   I have installed Tomcat 5.5. It was working fine but my
system
has got restarted and then onwards I am not able to restart the
server.



   What could be the reasons? (Sorry if this question have
been
already asked)



   Please advice.



Regards,

Mukesh Kumar





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Hosts

2005-09-16 Thread Tom Burke
I, too, am having problems configuring virtual hosts, in a Tomcat 5.0.28 
server, with no Apache, on a Windows XP machine. I've studied the 
documentation and am puzzled by one area in particular: the definition 
of 'appBase'. For example, in the text below you suggest putting this in 
the Host  ...  section within server.xml:


appBase=deploy

In a Windows environment, what is deploy? Is it a directory within the 
tomcat installation? If so, where? I can't see where this location is 
defined, it just seems to be mentioned in server.xml, in other examples 
as well as this one. Obviously there's something I'm not 
understanding...


Tom Burke


- Original Message - 
From: Mahesh S Kudva [EMAIL PROTECTED]

To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Friday, September 16, 2005 2:00 PM
Subject: Re: Virtual Hosts


This setup has been tested on Apache2+JBoss+mod_jk-1.2.14_for MacOSX. 
And
am sure it will work on other platforms as well. This setup also 
handles

Apache related webapps..

Make the required entries in the DNS

webapp.war: Extract the war file using zip and rename the folder
with .war extension. Please put it in your deployment folder.

mod-jk.so: Obtain the modjk.so library file from www.apache.org and 
place

then in the modules folder.

Apache-Virtual Host config
--
NameVirtualHost *.*.*.*:80

VirtualHost *.*.*.*:80
   ServerName webapp.domainname.com
   ServerAlias www.webapp.domainname.com
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot /Volumes/Extra/jboss/server/default/deploy/webapp.war
   JkMount /* loadbalancer
   DirectoryIndex index.html index.jsp
   ErrorLog logs/webapp-error_log
   CustomLog logs/webapp-access_log common
/VirtualHost
-
mod-jk.conf

LoadModule jk_module /opt/apache2/modules/mod_jk.so

JkWorkersFile /opt/apache2/conf/workers.properties
JkLogFile /opt/apache2/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /webapp.domain.com/*.jsp loadbalancer
JkMountFile /opt/apache2/conf/uriworkermap.properties
JkShmFile /opt/apache2/logs/jk.shm
Location /jkstatus/
JkMount status
Allow from 127.0.0.1
   Deny from All
/Location

--
Server.xml
-

Host name=webapp.domain.com debug=0 appBase=deploy
unpackWARs=true
Aliaswww.webapp.domain.com/Alias
Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=webapp_log1. suffix=.log
timestamp=true/
Context path=
docBase=${jboss.server.home.dir}/deploy/webapp.war debug=0
reloadable=true/
/Host

--
--
uriworkermap.properties

/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/webapp.domain.com/*.jsp

--
--
workers.properties


worker.list=loadbalancer,status

worker.webapp.port=8009
worker.webapp.host=webapp.domain.com
worker.webapp.type=ajp13
worker.webapp.lbfactor=1
worker.webapp.cachesize=10

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=library
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer

worker.status.type=status

_

Regards  Thanks

Mahesh S Kudva


-Original Message-
From: Steve Dodge [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Thu, 15 Sep 2005 15:57:04 -0500
Subject: Re: Virtual Hosts


You probably want to change the appBase. You can control the contexts
by
creating a context snippet in conf/[Engine name]/[Host name]  or add 
it

to META-INF/context.xml in each war.

Hope that helps,
Steve

Durfee, Bernard wrote:

Okay, so I created two host elements in my server.xml...

  Host name=app01.myserver.com
appBase=webapps
autoDeploy=true
deployOnStartup=true
deployXML=true
unpackWARs=true
xmlValidation=false
xmlNamespaceAware=false /

  Host name=app02.myserver.com
appBase=webapps
autoDeploy=true
deployOnStartup=true
deployXML=true
unpackWARs=true
xmlValidation=false
xmlNamespaceAware=false /

...but how do I tell Tomcat which context to process? There will be 
no

context correct? Do I need a separate appBase directory for each
host
element?

Thanks,
Bernie





-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 12:10 PM
To: Tomcat Users List
Subject: RE: Virtual Hosts


Simplistically ...

Configure Host elements inside your Engine. Create a folder
for each application

Re: Virtual Hosts

2005-09-16 Thread Tom Burke

Mahesh

Thanks for your help.

I think something I don't understand is: what's its root of the virtual 
server's appbase?


I have tomcat (5.0.28) installed in c:\Tomcat 5.0, with the usual set 
of directories

within that - bin, common, conf, logs, server, shared, temp, webapps,
work. I don't have a development environment at all. I have applications
installed within webapps, using the defaulthost (localhost) and they
work fine. Here's a sample of my server.xml:

Engine defaultHost=localhost name=Catalina

 Host appBase=webapps name=localhost
   Logger className=org.apache.catalina.logger.FileLogger
suffix=.txt prefix=localhost_log. timestamp=true/
Valve className=org.apache.catalina.valves.AccessLogValve
fileDateFormat=-MM-dd suffix=.txt/
 /Host

 Host appBase=webapps/some_host name=some_host.com
   Logger className=org.apache.catalina.logger.FileLogger
suffix=.txt prefix=some_host_log. timestamp=true/
   Valve className=org.apache.catalina.valves.AccessLogValve
fileDateFormat=-MM-dd suffix=.txt/
 /Host

 Logger className=org.apache.catalina.logger.FileLogger
suffix=.txt prefix=catalina_log. timestamp=true/
 Realm className=org.apache.catalina.realm.UserDatabaseRealm/
   /Engine

I've created a directory within webapps called 'some_host' and within
that is a simple jsp, a 'welcome' script. I know that the server, and an 
external PC, know (from use of Hosts files) that some_host.com is mapped 
to the server's IP address, and I can successfully ping that address. 
But I'm not getting the jsp to run! - I just get a 'page unavailable' 
response. There are no errors in the startup log so I think it must be 
that Tomcat doesn't know where to look for the welcome.jsp, which 
suggests that specifying appbase = webapps/some_host isn't working.


Tom


- Original Message - 
From: Mahesh S Kudva [EMAIL PROTECTED]

To: [EMAIL PROTECTED]
Sent: Friday, September 16, 2005 3:18 PM
Subject: RE: Virtual Hosts



Hi Tom

deploy is a directory in any platform you are running Tomcat until
unless specified. You need to create the directory if not found.
Generally it can be found at /jboss/server/default/deploy

Regards  Thanks

Mahesh S Kudva


---
Robosoft Technologies - Partners in Product Development





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK-Connector 1.2.x on IIS6 ?

2004-07-12 Thread Tom Burke
I don't know about JK-Connector 1.2. However, since I got JK_2 working
last week I have been running IIS 6 on a Windows 2003 Server in proper
'IIS 6' mode, ie with IIS 5 Emulation not ticked. All other config
details were as normal. It seems to work OK, in a very light load demo
environment.

This is with JK_2 2.04.

Tom Burke

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 12, 2004 10:27 AM
Subject: JK-Connector 1.2.x on IIS6 ?


Hello,

We run a TomCat4-Farm with JK-Connector's 1.2.x on IIS6 Frontends.
We can't upgrade to Tomcat5 / JK 2.x jet.
IIS 6 is set to IIS 5 Compatible Mode as described in the Setup.
Now I heared it is also possible to run that in normal IIS6-Mode
somehow...

Can anyone help / supply a Howto?

--
Björn Andersen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authentication method 'DIGEST'

2004-07-12 Thread Tom Burke
What kind of Windows environment are you in? I think you've got to be a
NT or Active Directory domain.

Tom Burke

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 12, 2004 2:28 PM
Subject: Authentication method 'DIGEST'



 Does anyone know if the DIGEST authentication is supported by Tomcat
5?
 I have been trying to get it working with a Tomcat 5.0.24 on Windows
and the default UserDatabase, but have not been completely successful.
The authentication of a user seems to work OK (with the browser dialog
being and so), but the principal is not available and probably the roles
are not set and also I still get a

 HTTP Status 403 - Access to the requested resource has been denied

 With the same configuration, changing only the method from DIGEST to
BASIC works without problems.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Integrating Tomcat and IIS

2004-07-09 Thread Tom Burke
Success in the end. Thanks to those who offered advice.

I have to say that I'm not too clear why it's working now but wasn't
before. There are a few differences in the configuration - eg, at which
level in IIS the filter is installed; the 'name' of the filter; changes
to jk2.properties - but none of these on its own seemed to make a
difference. Hopefully I can spend some time today stepping back one
difference at a time until I find what breaks it, then I'll mail that
finding to the list.

Tom Burke

- Original Message - 
From: Tom Burke [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, July 07, 2004 2:41 PM
Subject: Integrating Tomcat and IIS


 I sent a long email to the list on Tuesday asking for help with
problems
 I'm having intergating Tomcat with IIS. Sadly, there were no replies.
My
 email was rather long - lots of examples, config file extracts, etc -
so
 maybe recipients found it hard to digest.

 So I'll recast it as a shorter request: is there anyone on the list
who
 has succeeded in integrating Tomcat (4 or 5) with IIS (5 or 6)? If so,
 are there any tips you can pass on? Any problems you experienced and
 overcame? And if anyone else has had problems and *not* been able to
 overcome them, what were they?

 Incidentally, I was following this set of instructions:

https://www.rit.edu/~ack5504/tomcat-iis6-howto/narantugs-sengee-guide.html

 Tom Burke


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Integrating Tomcat and IIS

2004-07-08 Thread Tom Burke

- Original Message - 
From: Januski, Ken [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, July 07, 2004 6:38 PM
Subject: RE: Integrating Tomcat and IIS


 I do believe though that you didn't mention whether you had the
 green arrow in the isapi filter on IIS.

Yes, it was...

 If so that tells us something. The
 one thing that has bitten me many times is setting the isapi filter in
more
 than one place, e.g. the default web app AND under Master Server
Properties.
 I've read people suggest both on this list. For me I know that the
default
 web app has worked but that if I had both it failed. Other than that
I'd
 suggest that you let us know whether or not you get the green arrow,
and if
 so then what errors you're seeing after that.

Ah! I may well have had the isapi filter installed in multiple
locations.

Tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Integration of IIS and Tomcat

2004-07-05 Thread Tom Burke
These are early days with Tomcat for me. Specifically, I'm trying to
integrate Tomcat with IIS. I'm running Tomcat 4.1.30 and IIS 5.1 on XP
Pro. I have downloaded and installed  isapi-redirector2.dll, I have
configured IIS as required in the configuration instructions, I have
edited the registry and added the Keys and Key Words as required. I have
downloaded numerous configuration instructions, and have in particular
followed this one:-
https://www.rit.edu/~ack5504/tomcat-iis6-howto/narantugs-sengee-guide.html

I know that IIS is working as I can successfully browse to
http://localhost/iisstart.asp  . And I also know that Tomcat is working
because browsing to localhost:8080 brings up the familiar Tomcat welcome
screen.

Looking at the Testing section of that guide, I can run step 11 and 12,
and thus call up the  html page from IIS, but clicking on any of the jsp
links produces a 'Page cannot be displayed' error, with 'Cannot find
server or DNS error' as' as the reason.

Looking in the IIS logs I see this line after requesting the link to the
jsp:
12:49:08 127.0.0.1 GET /jakarta/isapi_redirector2.dll 200
which of course is the 'success' return code (as far as IIS is
concerned); ie, IIS is happy that it's passed the request on to the
redirector.

It looks as if the redirector simply isn't using any of the Tomcat
contexts. There's a couple of lines in workers2.properties that specifiy
a context:
[uri:/examples/jsp/*.jsp]
Context=/examples/jsp

However crawling through server.xml seemed to indicate that there wasn't
a context defined in there to match the context in workers2.properties,
so I added ths section to server.xml:

!--  Test /examples/jsp context... --
  Context path=/examples/jsp docBase=examples/jsp debug=5
reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_examples_jsp_log. suffix=.txt timestamp=true /
  Ejb name=ejb/EmplRecord type=Entity
home=com.wombat.empl.EmployeeRecordHome
remote=com.wombat.empl.EmployeeRecord /
  /Context

And again there's some evidence that this has been read and acted upon -
I now have a new logfile called localhost_examples_jsp_log.

But I'm still not getting .jsp pages served by IIS. Can anyone advise
any further action I can take, or places to look?

Tom Burke



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]