You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Abel MacAdam <ab...@gmail.com> on 2007/12/17 09:35:39 UTC

Simple Howto: Follow up

Hi,

I saw a mail requesting "simple instructions on gettting Tomcat and Apache
working together." The answer is printed out and ready to be processed. But
I have some follow ups on that mail:
- Why should one connect Tomcat to Apache?
- Should you connect Tomcat 6.0.14 to Apache 2.2.6? (Or is that done
automagically, as I seem not to find the appropriate mod_jk for these
versions)

TIA,
Abel

Re: Simple Howto: Follow up

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

Abel,

AbelMacAdam wrote:
> I checked to documentation. As far as I can see I do not have to do anything
> to get Tomcat configured again. 

Probably not; just make sure that you have an AJP <Connector> enabled in
your server.xml file.

> mod_jk.so is still in the bin directory of Apache. 

mod_jk.so should probably be in the "modules" or "libexec" directory,
not "bin". Look for files like mod_somethingelse.so. Since you're on
Windows, you should probably be using a .DLL file, not a .so file, which
are usually found on UNIX systems.

> workers.properties was placed in a different directory, that was not changed
> Tomcat's server.xml has not "mod_jk" configuration.

When you start the Apache web server, do you get any errors in your log
files? Anything about not being able to load mod_jk or anything like
that? Try setting "JkLogLevel debug" and "JkLogFile /path/to/mod_jk.log"
and checking that file to make sure that something happened.

> Am I correct in assuming I need not configure anything?

If you re-installed Apache httpd or Tomcat, then you will have to at
least verify all the configuration, if not re-configure something.

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

iEYEARECAAYFAkdt41cACgkQ9CaO5/Lv0PBFYQCghWS3EOMpkHm3ni6DTC+u1k8c
VGcAni3s1R37Cxk4SKab9fkwU0fNwyIV
=i9qM
-----END PGP SIGNATURE-----

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


Re: Simple Howto: Follow up

Posted by AbelMacAdam <ab...@gmail.com>.
Hi,

Thanks for the feedback. As far as I know I had it working. But today I
decided to re-install Tomcat. Now I'm wondering if it was done correctly. 

The old path to Tomcat (in XP):
C:\Program Files\Apache Software Foundation\Tomcat 6.0
The new path
C:\Tomcat6.0

I decided to re-install because my OS has issues with the spaces in the
path, and me having issues with having to click so far to get to the webapps
directory. 

I checked to documentation. As far as I can see I do not have to do anything
to get Tomcat configured again. 
mod_jk.so is still in the bin directory of Apache. 
workers.properties was placed in a different directory, that was not changed
Tomcat's server.xml has not "mod_jk" configuration.

Am I correct in assuming I need not configure anything?

TIA
Abel


Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Abel,
> 
> Abel MacAdam wrote:
>> - Why should one connect Tomcat to Apache?
> 
> If you don't know, then you don't need to connect them: use Tomcat all
> by itself in this case.
> 
>> - Should you connect Tomcat 6.0.14 to Apache 2.2.6?
> 
> Any version of Apache httpd can be connected to any version of Tomcat
> (within reason... you need to have Tomcat 4.1 or higher, I think, but
> Apache httpd 1.2, 1.3, 2.0, and 2.2 are all supported by mod_jk, and
> Apache httpd 2.2 has mod_proxy_ajp built right in).
> 
>> (Or is that done automagically, as I seem not to find the appropriate
>> mod_jk for these versions)
> 
> There is no automagic configuration for anything: you will have to do
> the configuration. Although binaries are often provided for mod_jk for
> some specific versions of Apache httpd, it's much better to compile it
> yourself from the source. The directions are easy and were provided in
> my previous message you referenced.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFHaBFW9CaO5/Lv0PARAvv0AJ9bOBKLzABCIaQYcd4vBzSF1wDRYgCdGg1r
> 2r04uOQs+PJ7Zzq7iTt2D6I=
> =oM1F
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-Howto%3A-Follow-up-tp14372182p14452438.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Simple Howto: Follow up

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

Abel,

Abel MacAdam wrote:
> - Why should one connect Tomcat to Apache?

If you don't know, then you don't need to connect them: use Tomcat all
by itself in this case.

> - Should you connect Tomcat 6.0.14 to Apache 2.2.6?

Any version of Apache httpd can be connected to any version of Tomcat
(within reason... you need to have Tomcat 4.1 or higher, I think, but
Apache httpd 1.2, 1.3, 2.0, and 2.2 are all supported by mod_jk, and
Apache httpd 2.2 has mod_proxy_ajp built right in).

> (Or is that done automagically, as I seem not to find the appropriate
> mod_jk for these versions)

There is no automagic configuration for anything: you will have to do
the configuration. Although binaries are often provided for mod_jk for
some specific versions of Apache httpd, it's much better to compile it
yourself from the source. The directions are easy and were provided in
my previous message you referenced.

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

iD8DBQFHaBFW9CaO5/Lv0PARAvv0AJ9bOBKLzABCIaQYcd4vBzSF1wDRYgCdGg1r
2r04uOQs+PJ7Zzq7iTt2D6I=
=oM1F
-----END PGP SIGNATURE-----

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


Re: Simple Howto: Follow up

Posted by Mary Joseph <jm...@novell.com>.
Cuco, 

Following Abel's hints would help you with the $JAVA_HOME issue. 

Export is also a good option but it works only for that particular terminal in which you export. 

Whenever you open a new terminal, you would need to export again.

>>> cuco2772 <po...@gmail.com> 12/21/07 3:40 AM >>>

Mary,

When I did something similar to this PATH=$JAVA_HOME/bin;$PATH, editing my
my .bashrc file for my root account and my username account (ubuntu feisty)
the bash shell couldn't find basic
programs such as ls or vim. The only thing that saved this from being a real
nightmare was that I had
multiple terminal windows open as root and was able to edit those back to
having PATH come before
$JAVA_HOME. I'm still having basic setup problems with when I try to access
my localhost:8080/HelloServlet tomcat doesnt find it even though tomcat is
up and running.
I've been looking at tomcat configuration but am wondering now if I need to
go back and look at some of these other things youre talking about. I have
mod-jk installed, by the way.
I was wondering if trying resetting the PATH using export, would be a good
idea, without putting it in
my .bashrc files.  I was also thinking of editing my /etc/environment and
putting my classpath for Java
in there. It's very time consuming to guess about these things, though. I
wish there was a way to get
better info. I'm willing to try just about anything now, I've spent a lot of
time on this already.
Any ideas on what I could try ? Thanks



Mary Joseph wrote:
>
> http://wiki.apache.org/tomcat/FAQ/Connectors  -> this would answer your
> first question
> http://mrtextminer.wordpress.com/2007/09/11/installation-of-apache-224-and-tomcat-6014-on-debian-etch/    
> -> explains how to do the same in linux.
>
> Mary
>
>>>> "Abel MacAdam" <ab...@gmail.com> 12/17/07 2:05 PM >>>
> Hi,
>
> I saw a mail requesting "simple instructions on gettting Tomcat and Apache
> working together." The answer is printed out and ready to be processed.
> But
> I have some follow ups on that mail:
> - Why should one connect Tomcat to Apache?
> - Should you connect Tomcat 6.0.14 to Apache 2.2.6? (Or is that done
> automagically, as I seem not to find the appropriate mod_jk for these
> versions)
>
> TIA,
> Abel
>
>
>

--
View this message in context: http://www.nabble.com/Simple-Howto%3A-Follow-up-tp14372182p14446154.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Simple Howto: Follow up

Posted by Alan Chaney <al...@compulsivecreative.com>.
The path separator character in linux is : not ; which is why you 
couldn't find any standard utilities. In linux the ; is a *command* 
separator character eg
user@domain:~$ cd somedir ; ls
excutes the cd and then the ls



Also, it is much better practice to go PATH=$PATH:$JAVA_HOME - your 
normal paths will be searched first. Remember that if your JAVA_HOME has 
spaces embedded in the path name (not a good idea) you should quote it 
when using it in an expression as above.

Probably the best place to put such things as JAVA_HOME is in the file
$TOMCAT_HOME/bin/setenv.sh - don't forget to make setenv.sh executable 
by doing a 'chmod u+x setenv.sh' in the bin directory.

If you look at the file $TOMCAT_HOME/bin/startup.sh you will see it 
checks for the existence of setenv.sh - I put my configuration specific 
variables there.

Hope that helps

Alan




cuco2772 wrote:
> Mary,
> 
> When I did something similar to this PATH=$JAVA_HOME/bin;$PATH, editing my
> my .bashrc file for my root account and my username account (ubuntu feisty)
> the bash shell couldn't find basic
> programs such as ls or vim. The only thing that saved this from being a real
> nightmare was that I had
> multiple terminal windows open as root and was able to edit those back to
> having PATH come before
> $JAVA_HOME. I'm still having basic setup problems with when I try to access
> my localhost:8080/HelloServlet tomcat doesnt find it even though tomcat is
> up and running. 
> I've been looking at tomcat configuration but am wondering now if I need to
> go back and look at some of these other things youre talking about. I have
> mod-jk installed, by the way.
> I was wondering if trying resetting the PATH using export, would be a good
> idea, without putting it in
> my .bashrc files.  I was also thinking of editing my /etc/environment and
> putting my classpath for Java
> in there. It's very time consuming to guess about these things, though. I
> wish there was a way to get
> better info. I'm willing to try just about anything now, I've spent a lot of
> time on this already.
> Any ideas on what I could try ? Thanks
> 
> 
> 
> Mary Joseph wrote:
>> http://wiki.apache.org/tomcat/FAQ/Connectors  -> this would answer your
>> first question 
>> http://mrtextminer.wordpress.com/2007/09/11/installation-of-apache-224-and-tomcat-6014-on-debian-etch/     
>> -> explains how to do the same in linux. 
>>
>> Mary
>>
>>>>> "Abel MacAdam" <ab...@gmail.com> 12/17/07 2:05 PM >>>
>> Hi,
>>
>> I saw a mail requesting "simple instructions on gettting Tomcat and Apache
>> working together." The answer is printed out and ready to be processed.
>> But
>> I have some follow ups on that mail:
>> - Why should one connect Tomcat to Apache?
>> - Should you connect Tomcat 6.0.14 to Apache 2.2.6? (Or is that done
>> automagically, as I seem not to find the appropriate mod_jk for these
>> versions)
>>
>> TIA,
>> Abel
>>
>>
>>
> 

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


Re: Simple Howto: Follow up

Posted by cuco2772 <po...@gmail.com>.
Mary,

When I did something similar to this PATH=$JAVA_HOME/bin;$PATH, editing my
my .bashrc file for my root account and my username account (ubuntu feisty)
the bash shell couldn't find basic
programs such as ls or vim. The only thing that saved this from being a real
nightmare was that I had
multiple terminal windows open as root and was able to edit those back to
having PATH come before
$JAVA_HOME. I'm still having basic setup problems with when I try to access
my localhost:8080/HelloServlet tomcat doesnt find it even though tomcat is
up and running. 
I've been looking at tomcat configuration but am wondering now if I need to
go back and look at some of these other things youre talking about. I have
mod-jk installed, by the way.
I was wondering if trying resetting the PATH using export, would be a good
idea, without putting it in
my .bashrc files.  I was also thinking of editing my /etc/environment and
putting my classpath for Java
in there. It's very time consuming to guess about these things, though. I
wish there was a way to get
better info. I'm willing to try just about anything now, I've spent a lot of
time on this already.
Any ideas on what I could try ? Thanks



Mary Joseph wrote:
> 
> http://wiki.apache.org/tomcat/FAQ/Connectors  -> this would answer your
> first question 
> http://mrtextminer.wordpress.com/2007/09/11/installation-of-apache-224-and-tomcat-6014-on-debian-etch/     
> -> explains how to do the same in linux. 
> 
> Mary
> 
>>>> "Abel MacAdam" <ab...@gmail.com> 12/17/07 2:05 PM >>>
> Hi,
> 
> I saw a mail requesting "simple instructions on gettting Tomcat and Apache
> working together." The answer is printed out and ready to be processed.
> But
> I have some follow ups on that mail:
> - Why should one connect Tomcat to Apache?
> - Should you connect Tomcat 6.0.14 to Apache 2.2.6? (Or is that done
> automagically, as I seem not to find the appropriate mod_jk for these
> versions)
> 
> TIA,
> Abel
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-Howto%3A-Follow-up-tp14372182p14446154.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Simple Howto: Follow up

Posted by Mary Joseph <JM...@novell.com>.
http://wiki.apache.org/tomcat/FAQ/Connectors  -> this would answer your first question 
http://mrtextminer.wordpress.com/2007/09/11/installation-of-apache-224-and-tomcat-6014-on-debian-etch/      -> explains how to do the same in linux. 

Mary

>>> "Abel MacAdam" <ab...@gmail.com> 12/17/07 2:05 PM >>>
Hi,

I saw a mail requesting "simple instructions on gettting Tomcat and Apache
working together." The answer is printed out and ready to be processed. But
I have some follow ups on that mail:
- Why should one connect Tomcat to Apache?
- Should you connect Tomcat 6.0.14 to Apache 2.2.6? (Or is that done
automagically, as I seem not to find the appropriate mod_jk for these
versions)

TIA,
Abel