/admin and /manager are dynamically deployed Contexts via the admin.xml and manager.xml files in your webapps directory, you won't see anything in server.xml for them.
Right now things are working because you:
1) installed mod_jk2
2) setup a .properties file that has a mapping for /examples
Since mod_jk2 looks for your .properties files in a certain location by default, and those files exist, and those files have a mapping for /examples, your examples are working. Thus, nothing in httpd.conf but LoadModule.
John
On Thu, 3 Apr 2003 11:50:37 +0200, Woude, Alexander van der <[EMAIL PROTECTED]> wrote:
Hello John,
You are right.
I tried configuring apache with tomcat 4.1.12 with jk and jk2.
I used your site as a guideline. I couldn't get it to work.
Then I stumbled upon a site that claimed that most of the configuration would be done by 4.1.18, and that it needed a lot less
manual adjusting. So I went to 4.1.18.
The things u say about the server.xml I recognise from doing with previous versions. Understanding what u say means that it was a coincidence that both connectors weren't hashed out.
That can well be. As far as the Contexts go: there was only 1 configured: /examples, the others weren't even in the file.
And I still haven't added them. Still I can get into /admin and /manager modules.
Nobody else managed this machine, and the possibility of me not understanding the way this setup works is very likely, considering it were my first steps of integrating Tomcat and Apache.
Now I am sure that my elves didn't mess with the computer because I taught them to not mess with it. Violation of this would maker them end up in the blender. But usually the help me on other things, just l.ike my other personalities.
I have seen al the questions on the internet about the Jk(2) and apache tomcat. I have to say that I hardly ever saw questions
about tomcat 4.1.18. I assume u have used 4.1.18 as well.
But lets leave this discussion here, I am willing to admit that it is possible that I am mistaken. I really want to get this thing to work.
Answering your questions:
1) httpd.conf only contains LoadModule nothing else 2) I use JK2 3) Proxy? As far as I know I didn't configure any proxy.
At the bottom of this mail are my server.xml and web.xml
I have an context in server.xml with docbase=archive and path=/archive Should that be /hwe?
Thanks for the help sofar,
Bye Alexander
-----Original Message----- From: John Turner [mailto:[EMAIL PROTECTED] Sent: woensdag 2 april 2003 17:59 To: Tomcat Users List Subject: Re: Problems deploying webapps on tomcat and apache
Not sure what you mean...my HOWTOs don't use JK2 at all, because I do not use JK2.
Tomcat doesn't set anything up "by itself", especially where Apache is concerned. A default install of Tomcat has a single virtual host (localhost), a few Contexts (/examples, /admin, /manager, /tomcat-docs, /webdav), and two Connectors (CoyoteConnector/HTTP on 8080, CoyoteConnector/JK/JK2 on 8009). That's it. None of that helps with Apache except for the CoyoteConnector on 8009, and even then you need to tell Apache to send things to Tomcat.
If you add a certain type of Listener to server.xml, you can have Tomcat generate a file that contains Apache directives that are valid for use in httpd.conf, but even then, there is still some manual configuration that needs to be done. Nothing is automatic.
In fact, my HOWTO is every step needed to make the /examples webapp accessible through Apache, and as far as I know, there are no shortcuts or "auto config" options whatsoever (if there are, please point me to a description of them so that I can save myself a lot of work). So either someone else configured your ssystem, your system isn't operating the way you think it is, or you have magical elves that are secretly helping you.
If your httpd.conf doesn't have a JkMount, then 1) your /examples webapp is not working via Apache, 2) you are using mod_jk2 and not mod_jk, in which case we need to know that to help you, or 3) you have some sort of proxy setup where the requests are going to Apache but being redirected to Tomcat without using JK or JK2 (like Apache's mod_proxy).
Believe me, the majority of the traffic on this list in the last year has been "how to I make Apache work with Tomcat with JK, JK2, or WARP". AFAIK, there is no automatic way to set these up....if there is, please tell us!
In any case, if you have /examples working, then in order to make /hwe work, all you have to do is duplicate whatever setup you did for /examples, but in the new config entries, substitute "/hwe" everywhere you see /examples. Without knowing more about what you have already setup, that's the best suggestion I can make.
John
On Wed, 2 Apr 2003 17:30:29 +0200, Woude, Alexander van der <[EMAIL PROTECTED]> wrote:
Hello John,
I had read your manual while trying to configure Tomcat4.1.18 and apache 2.043 with mod_jk2.
To be honest although they are very good, it didn't work for me. Tomcat 4.1.18 is supposed to set things up by itself (unless I understood wrong) There is no JkMount of include module to be found in my http.conf.
Any other suggestions??
Regards Alexander
-----Original Message----- From: John Turner [mailto:[EMAIL PROTECTED] Sent: woensdag 2 april 2003 17:19 To: Tomcat Users List Subject: Re: Problems deploying webapps on tomcat and apache
If you are seeing the Tomcat examples through Apache at http://localhost/examples, and the examples work, then you must have already setup mod_jk with JkMount. The examples don't work through Apache on their own without additional configuration.
Perhaps my Red Hat HOWTO for Tomcat and Apache with mod_jk would be of some help. It is for 7.2/7.3, but from the emails I have gotten from others, it works just fine for RH 8 as well.
http://www.johnturner.com/howto
Also, you can see an exact example of how to use JkMount in Apache's httpd.conf here:
http://www.johnturner.com/howto/mod_jk_conf.html
John
On Wed, 2 Apr 2003 17:10:27 +0200, Woude, Alexander van der <[EMAIL PROTECTED]> wrote:
Hello Maximiliano,
I get the error from both tomcat and apache. Both urls give the 404 http://localhost:8080/archive/hwe http://localhost/archive/hwe
Without the port 8080 I call apache, don't I?
Could you tell me more about the JkMount? Where do I place it, and maybe an example?
Thanks a lot Alexander van der Woude
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 2 april 2003 17:09 To: [EMAIL PROTECTED] Subject: RE: Problems deploying webapps on tomcat and apache
Hi,
In first place you don't have to put /hwe/LoginServlet in your url, only
put http://localhost:8080/archive/hwe because hwe in your web.xml maps to
LoginServlet.
In second place your 404 error came from apache http server or tomcat server. If came from tomcat maybe you have to put in the httpd.conf the JkMount directive, for example JkMount /archive/* your_worker
Best regards, Maximiliano Palacios
That didn't change a thing.
Actually this remark made me aware of the url-mapping. If I wanna call http://localhost:8080/archive/hwe/LoginServlet shouldn't the url-pattern be the following: <url-pattern>/hwe/*</url-pattern> ???
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent:
woensdag 2 april 2003 13:55
To: [EMAIL PROTECTED]
Subject: RE: Problems deploying webapps on tomcat and apache
and do try http://localhost:8080/archive/hwe
Thanks Guru
-----Original Message----- From: Woude, Alexander van der [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 12:49 To: [EMAIL PROTECTED] Subject: Problems deploying webapps on tomcat and apache
Hello all,Redhat 8.0 as OS.
I set up apache 2.0.43 to use tomcat 4.1.18 as a servlet container. I
usehttp://localhost/ and http://localhost:8080.
I got the examples working fine. I can reach them through bothNow I am trying to deploy my own application, with little succes.
Under the webapps directory I created the following structure:
/webapps /Archive /WEB-INF /classes LoginServlet and more servlets, classes etc /lib Connector-mysql-3_0_6.jar
web.xml
Calling my Archieve withhttp://localhost:8080/archive/servlet/LoginServlet gives a 404: requested resource not available.Calling my Archieve with http://localhost/archive/servlet/LoginServletdoes the same thing.
What am I doing wrong???
Below are my server.xml and web.xml.
I added a context for the application in server.xml
<!-- Tomcat Root Context --> <!-- <Context path="" docBase="ROOT" debug="0"/> --> <!-- Define new context for Archive Web --> <Context path="/archive" docBase="archive" debug="2" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_archive_log." suffix=".txt" timestamp="true"/> <!-- <Enviroment name="maxExceptions" value="java.lang.Integer" value="15"/>
<Parameter name="context.param.name" value="context.param.value" override="false"/> --> </Context>
My web.xml is like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Tomcat Examples</display-name> <description> Tomcat Example servlets and JSP pages. </description>
<!-- Define example application events listeners --> <listener> <listener-class>listeners.ContextListener</listener-class> </listener> <listener> <listener-class>listeners.SessionListener</listener-class> </listener>
<!-- Define servlets included in archive -->
<servlet> <servlet-name>LoginServlet</servlet-name> <servlet-class>LoginServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>LoginServlet</servlet-name> <url-pattern>/hwe</url-pattern> </servlet-mapping>
</web-app>
----------------------
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- 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]
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
