You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by DHarty <ha...@db.erau.edu> on 2001/05/16 23:43:13 UTC

Apache, Struts, .conf files

Help,

I am trying to install the struts framework examples on my apache1.3.19 /
tomcat3.2.1 setup.

I have followed the directions included with struts (relevent instruction
listed at end of email

When I try to start the Apache service (tomcat is already running), I get an
"internal Windows NT error"

If I remove the

	include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf

line, apache starts, but does not recognize *.do files as appended to the
modified tomcat-apache.conf file.

I have tried skipping step 7 (modifiing the tomcat-apache.conf file) with
the same result.

I have also tried different iterations of removing, altering the line that
referneces mod_jk:

	include d:/web/tomcat/conf/mod_jk.conf-auto

ex:
	include d:/web/tomcat/conf/mod_jk.conf-auto
d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf

with and without the tomcat-apache.conf line.

I have even tried pointing the include line to the origional (unmolested)
tomcat-apache.conf file in the tomcat path.

Please tell me I am missing something obvious.



D

Struts instructions:

----------------------------------------------


This document contains notes that have been accumulated on getting the
Struts
applications (documentation and example) running in a variety of servlet
container environments.

For most containers, you need only to:

1: Copy the WAR files in your Struts < /webapp > directory to your
containers
  < webapps > directory.

2: In some cases, you may need to restart your container if it is running.


* Tomcat 3.1+ with Apache - Additional steps provided below.


TOMCAT 3.1 (OR LATER) WITH APACHE
---------------------------------

* These instructions assume you have successfully integrated
  Tomcat with Apache according to the Tomcat documentation.

3* Copy "struts-documentation.war" and "struts-example.war"
  to your $TOMCAT_HOME/webapps directory

4* Restart Tomcat if it is already running

5* Tomcat will generate a file "$TOMCAT_HOME/conf/tomcat-apache.conf"
  that will be used by Apache.  This file is regenerated every time
  you start Tomcat, so copy this file to a safe place (such as
  your Apache configuration directory; on Unix systems this is usually
  "/usr/local/apache/conf".

 (I SKIPPED STEP 6)
6*	If you are running Tomcat 3.1, Tomcat will not have generated the
  entries for your new applications.  Add the following lines to the
  "tomcat-apache.conf" file that you have saved, replacing
  $TOMCAT_HOME with the path to your Tomcat home directory:

        Alias /struts-documentation
"$TOMCAT_HOME/webapps/struts-documentation"
    <Directory "$TOMCAT_HOME/webapps/struts-documentation>
      Options Indexes FollowSymLinks
    </Directory>
    ApJServMount /struts-documentation/servlet /struts-documentation
    <Location "/struts-documentation/WEB-INF/">
      AllowOverride None
      deny from all
    </Location>

    Alias /struts-example "$TOMCAT_HOME/webapps/struts-example"
    <Directory "$TOMCAT_HOME/webapps/struts-example>
      Options Indexes FollowSymLinks
    </Directory>
    ApJServMount /struts-example/servlet /struts-example
    <Location "/struts-example/WEB-INF/">
      AllowOverride None
      deny from all
    </Location>

7* On all versions of Tomcat, the generated file above does not
  know anything about extension mappings defined in a web.xml file,
  so the "*.do" URIs that go to the controller servlet will not be
  recognized.  To fix this, add the following line to the saved
  version of "tomcat-apache.conf", after the corresponding line
  for the .jsp extension:

    AddHandler jserv-servlet .do

8* Ensure that the saved version of "tomcat-apache.conf" is referenced
  in your Apache "httpd.conf" configuration file.  A typical use would
  have the following line at the bottom of "httpd.conf":

    Include /usr/local/apache/conf/tomcat-apache.conf

	(I used: include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf)

9* In order to recognize "index.jsp" as a default page for web
  applications, search in your "httpd.conf" for a "DirectoryIndex"
  directive.  If you have one, add "index.jsp" to the end of the
  list, so that it might look like this:

    DirectoryIndex index.html index.jsp

  If you do not have such an entry, add one like this:

    DirectoryIndex index.jsp

10* Restart Apache to make it aware of the new applications.  You should
  now be able to access the applications from a browser like this:

    http://localhost/struts-documentation
    http://localhost/struts-example

------------------end pasted
instructions---------------------------------------




Tomcat Apache/ JServ mod_jserve problem ...

Posted by Anil Kumar <ad...@Houston.GeoQuest.SLB.COM>.
Hi

I thought Some one  can help ..

I am getting these error messages ...

[17/05/2001 09:25:38:758] (ERROR) an error returned handling request via

protocol "ajpv12"
[17/05/2001 09:25:41:553] (EMERGENCY) ajp12: can not connect to host
127.0.0.1:61618
[17/05/2001 09:25:41:553] (EMERGENCY) ajp12: connection fail

in mod_jserv.log ...

Could you please tell me how we can  fix this problem ... Thanks in
advance ..


Thanks RE: Apache, Struts, .conf files

Posted by DHarty <ha...@db.erau.edu>.
Thanks Dante!

Your email made me realize that the struts instructions assume that your
using JServ and not mod_jk

D







-----Original Message-----
From: Dante le Poole [mailto:dante@maverick.nl]
Sent: Thursday, May 17, 2001 10:23 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: Apache, Struts, .conf files


Replace the ApJServMount statements with JkMount statements in the
generated tomcat-apache.conf file (and replace any other JServ
statements with their mod_jk equivalents).
That did it for me.

Dante

::-----Original Message-----
::From: tomcat-user-return-35007-dante=maverick.nl@jakarta.apache.org
::[mailto:tomcat-user-return-35007-dante=maverick.nl@jakarta.apache.org]On
::Behalf Of DHarty
::Sent: Wednesday, May 16, 2001 5:43 PM
::To: Tomcat-User@Jakarta.Apache.Org
::Subject: Apache, Struts, .conf files
::
::
::Help,
::
::I am trying to install the struts framework examples on my apache1.3.19 /
::tomcat3.2.1 setup.
::
::I have followed the directions included with struts (relevent instruction
::listed at end of email
::
::When I try to start the Apache service (tomcat is already running), I get
an
::"internal Windows NT error"
::
::If I remove the
::
::	include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf
::
::line, apache starts, but does not recognize *.do files as appended to the
::modified tomcat-apache.conf file.
::
::I have tried skipping step 7 (modifiing the tomcat-apache.conf file) with
::the same result.
::
::I have also tried different iterations of removing, altering the line that
::referneces mod_jk:
::
::	include d:/web/tomcat/conf/mod_jk.conf-auto
::
::ex:
::	include d:/web/tomcat/conf/mod_jk.conf-auto
::d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf
::
::with and without the tomcat-apache.conf line.
::
::I have even tried pointing the include line to the origional (unmolested)
::tomcat-apache.conf file in the tomcat path.
::
::Please tell me I am missing something obvious.
::
::
::
::D
::
::Struts instructions:
::
::----------------------------------------------
::
::
::This document contains notes that have been accumulated on getting the
::Struts
::applications (documentation and example) running in a variety of servlet
::container environments.
::
::For most containers, you need only to:
::
::1: Copy the WAR files in your Struts < /webapp > directory to your
::containers
::  < webapps > directory.
::
::2: In some cases, you may need to restart your container if it is running.
::
::
::* Tomcat 3.1+ with Apache - Additional steps provided below.
::
::
::TOMCAT 3.1 (OR LATER) WITH APACHE
::---------------------------------
::
::* These instructions assume you have successfully integrated
::  Tomcat with Apache according to the Tomcat documentation.
::
::3* Copy "struts-documentation.war" and "struts-example.war"
::  to your $TOMCAT_HOME/webapps directory
::
::4* Restart Tomcat if it is already running
::
::5* Tomcat will generate a file "$TOMCAT_HOME/conf/tomcat-apache.conf"
::  that will be used by Apache.  This file is regenerated every time
::  you start Tomcat, so copy this file to a safe place (such as
::  your Apache configuration directory; on Unix systems this is usually
::  "/usr/local/apache/conf".
::
:: (I SKIPPED STEP 6)
::6*	If you are running Tomcat 3.1, Tomcat will not have generated the
::  entries for your new applications.  Add the following lines to the
::  "tomcat-apache.conf" file that you have saved, replacing
::  $TOMCAT_HOME with the path to your Tomcat home directory:
::
::        Alias /struts-documentation
::"$TOMCAT_HOME/webapps/struts-documentation"
::    <Directory "$TOMCAT_HOME/webapps/struts-documentation>
::      Options Indexes FollowSymLinks
::    </Directory>
::    ApJServMount /struts-documentation/servlet /struts-documentation
::    <Location "/struts-documentation/WEB-INF/">
::      AllowOverride None
::      deny from all
::    </Location>
::
::    Alias /struts-example "$TOMCAT_HOME/webapps/struts-example"
::    <Directory "$TOMCAT_HOME/webapps/struts-example>
::      Options Indexes FollowSymLinks
::    </Directory>
::    ApJServMount /struts-example/servlet /struts-example
::    <Location "/struts-example/WEB-INF/">
::      AllowOverride None
::      deny from all
::    </Location>
::
::7* On all versions of Tomcat, the generated file above does not
::  know anything about extension mappings defined in a web.xml file,
::  so the "*.do" URIs that go to the controller servlet will not be
::  recognized.  To fix this, add the following line to the saved
::  version of "tomcat-apache.conf", after the corresponding line
::  for the .jsp extension:
::
::    AddHandler jserv-servlet .do
::
::8* Ensure that the saved version of "tomcat-apache.conf" is referenced
::  in your Apache "httpd.conf" configuration file.  A typical use would
::  have the following line at the bottom of "httpd.conf":
::
::    Include /usr/local/apache/conf/tomcat-apache.conf
::
::	(I used: include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf)
::
::9* In order to recognize "index.jsp" as a default page for web
::  applications, search in your "httpd.conf" for a "DirectoryIndex"
::  directive.  If you have one, add "index.jsp" to the end of the
::  list, so that it might look like this:
::
::    DirectoryIndex index.html index.jsp
::
::  If you do not have such an entry, add one like this:
::
::    DirectoryIndex index.jsp
::
::10* Restart Apache to make it aware of the new applications.  You should
::  now be able to access the applications from a browser like this:
::
::    http://localhost/struts-documentation
::    http://localhost/struts-example
::
::------------------end pasted
::instructions---------------------------------------
::
::
::
::


RE: Apache, Struts, .conf files

Posted by Dante le Poole <da...@maverick.nl>.
Replace the ApJServMount statements with JkMount statements in the
generated tomcat-apache.conf file (and replace any other JServ
statements with their mod_jk equivalents). 
That did it for me.

Dante

::-----Original Message-----
::From: tomcat-user-return-35007-dante=maverick.nl@jakarta.apache.org
::[mailto:tomcat-user-return-35007-dante=maverick.nl@jakarta.apache.org]On
::Behalf Of DHarty
::Sent: Wednesday, May 16, 2001 5:43 PM
::To: Tomcat-User@Jakarta.Apache.Org
::Subject: Apache, Struts, .conf files
::
::
::Help,
::
::I am trying to install the struts framework examples on my apache1.3.19 /
::tomcat3.2.1 setup.
::
::I have followed the directions included with struts (relevent instruction
::listed at end of email
::
::When I try to start the Apache service (tomcat is already running), I get an
::"internal Windows NT error"
::
::If I remove the
::
::	include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf
::
::line, apache starts, but does not recognize *.do files as appended to the
::modified tomcat-apache.conf file.
::
::I have tried skipping step 7 (modifiing the tomcat-apache.conf file) with
::the same result.
::
::I have also tried different iterations of removing, altering the line that
::referneces mod_jk:
::
::	include d:/web/tomcat/conf/mod_jk.conf-auto
::
::ex:
::	include d:/web/tomcat/conf/mod_jk.conf-auto
::d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf
::
::with and without the tomcat-apache.conf line.
::
::I have even tried pointing the include line to the origional (unmolested)
::tomcat-apache.conf file in the tomcat path.
::
::Please tell me I am missing something obvious.
::
::
::
::D
::
::Struts instructions:
::
::----------------------------------------------
::
::
::This document contains notes that have been accumulated on getting the
::Struts
::applications (documentation and example) running in a variety of servlet
::container environments.
::
::For most containers, you need only to:
::
::1: Copy the WAR files in your Struts < /webapp > directory to your
::containers
::  < webapps > directory.
::
::2: In some cases, you may need to restart your container if it is running.
::
::
::* Tomcat 3.1+ with Apache - Additional steps provided below.
::
::
::TOMCAT 3.1 (OR LATER) WITH APACHE
::---------------------------------
::
::* These instructions assume you have successfully integrated
::  Tomcat with Apache according to the Tomcat documentation.
::
::3* Copy "struts-documentation.war" and "struts-example.war"
::  to your $TOMCAT_HOME/webapps directory
::
::4* Restart Tomcat if it is already running
::
::5* Tomcat will generate a file "$TOMCAT_HOME/conf/tomcat-apache.conf"
::  that will be used by Apache.  This file is regenerated every time
::  you start Tomcat, so copy this file to a safe place (such as
::  your Apache configuration directory; on Unix systems this is usually
::  "/usr/local/apache/conf".
::
:: (I SKIPPED STEP 6)
::6*	If you are running Tomcat 3.1, Tomcat will not have generated the
::  entries for your new applications.  Add the following lines to the
::  "tomcat-apache.conf" file that you have saved, replacing
::  $TOMCAT_HOME with the path to your Tomcat home directory:
::
::        Alias /struts-documentation
::"$TOMCAT_HOME/webapps/struts-documentation"
::    <Directory "$TOMCAT_HOME/webapps/struts-documentation>
::      Options Indexes FollowSymLinks
::    </Directory>
::    ApJServMount /struts-documentation/servlet /struts-documentation
::    <Location "/struts-documentation/WEB-INF/">
::      AllowOverride None
::      deny from all
::    </Location>
::
::    Alias /struts-example "$TOMCAT_HOME/webapps/struts-example"
::    <Directory "$TOMCAT_HOME/webapps/struts-example>
::      Options Indexes FollowSymLinks
::    </Directory>
::    ApJServMount /struts-example/servlet /struts-example
::    <Location "/struts-example/WEB-INF/">
::      AllowOverride None
::      deny from all
::    </Location>
::
::7* On all versions of Tomcat, the generated file above does not
::  know anything about extension mappings defined in a web.xml file,
::  so the "*.do" URIs that go to the controller servlet will not be
::  recognized.  To fix this, add the following line to the saved
::  version of "tomcat-apache.conf", after the corresponding line
::  for the .jsp extension:
::
::    AddHandler jserv-servlet .do
::
::8* Ensure that the saved version of "tomcat-apache.conf" is referenced
::  in your Apache "httpd.conf" configuration file.  A typical use would
::  have the following line at the bottom of "httpd.conf":
::
::    Include /usr/local/apache/conf/tomcat-apache.conf
::
::	(I used: include d:/web/apache_1.3.19/Apache/conf/tomcat-apache.conf)
::
::9* In order to recognize "index.jsp" as a default page for web
::  applications, search in your "httpd.conf" for a "DirectoryIndex"
::  directive.  If you have one, add "index.jsp" to the end of the
::  list, so that it might look like this:
::
::    DirectoryIndex index.html index.jsp
::
::  If you do not have such an entry, add one like this:
::
::    DirectoryIndex index.jsp
::
::10* Restart Apache to make it aware of the new applications.  You should
::  now be able to access the applications from a browser like this:
::
::    http://localhost/struts-documentation
::    http://localhost/struts-example
::
::------------------end pasted
::instructions---------------------------------------
::
::
::
::