You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yun Sang Jung <na...@channeli.net> on 2000/06/23 07:32:30 UTC

How can I use ajp13 protocol?

I'm working with Tomcat 3.2 dev.

I compiled mod_jk.so and copyed this file into Apache 1.3.12 libexec directory and add one line(Include mod_jk.conf-auto instead of tomcat-apache.conf) in httpd.conf file.
Because I want Tomcat to serve in using 8007(ajp12) and 8009(ajp13) for loadbalancing. I added the other Connector for port 8009 in server.xml(copy default one for 8007 and only change port #, handler value into 8009 and Ajp13ConnectionHander) and configure workers.properties for using one for ajp12, the other for ajp13. After startup.sh command, Tomcat listens on port 8007 & 8009.

At this point, I can not find how to assign the application (context?) to specific port.
Now, all of JSP or Servlet request are going into port 8007 using ajp12.

Is there another configuration file (except mod_jk.conf-auto) for it?
I don't want to modify mod_jk.conf-auto in hand, because this file is auto generated by Tomcat startup.

One more question: Is there DTD for server.xml? If yes, tell me the URL to get it. I cannot find this information in JSP SPEC 1.1

making mod_jk.conf-auto default to ajp13???

Posted by Jacob Kjome <jk...@creativeis.com>.
Gal Shachor wrote:

At 09:30 AM 6/23/2000 +0200, you wrote:
>This does require you to change mod_jk.conf, or just to change the
>ApacheConfig task
>and recompile...


 From the above statement, it sounds like the only way to get Tomcat to 
spit out a mod_jk.conf-auto file that uses ajp13 rather than ajp12 is to 
recompile Tomcat with a switch of the variable named ApacheConfig to use 
ajp13.  Is this correct?

I was hoping there would be a way to make this happen by adding some info 
to the server.xml file.

Is there any easy way to do this other than recompiling Tomcat?

thanks,

Jake


Re: How can I use ajp13 protocol?

Posted by Yun Sang Jung <na...@channeli.net>.
How about applying context to specific port in server.xml?
Then mod_jk.conf-auto might be automatically generated by refering the server.xml. (whether or not using ajp12 or ajp13?)
What do you think about my idea?

> 
> 
> >
> > At this point, I can not find how to assign the application (context?)
> > to specific port.
> > Now, all of JSP or Servlet request are going into port 8007 using
> > ajp12.
> > 
> > Is there another configuration file (except mod_jk.conf-auto) for it?
> > I don't want to modify mod_jk.conf-auto in hand, because this file is
> > auto generated by Tomcat startup.
> > 
> 
> In mod_jk.conf-auto you should have entries that looks like
> 
> JkMount <pattern> <worker name> 
> e.g. JkMount /servlet/* ajp12
> 
> This actually means, mount all requests matching the pattern to the
> named worker.
> For now (and for backward compatibility) the auto generated file uses
> the default
> AJPV12 worker, you should change the wanted statements to use an AJPV13
> worker,
> for example, for the default AJPV13 worker named ajp13 and you should
> have:
> 
> JkMount /servlet/* ajp13
> 
> This does require you to change mod_jk.conf, or just to change the
> ApacheConfig task
> and recompile...
> 
> > One more question: Is there DTD for server.xml? If yes, tell me the
> > URL to get it. I cannot find this information in JSP SPEC 1.1
> server.xml is not part of the JSP spec and tomcat does not validate this
> file.
> This is partially because it is in a constant change... For example,
> just yesterday
> Alex changed the attributes that a Logger element can accept.
> 
> Gal Shachor
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Re: How can I use ajp13 protocol?

Posted by Gal Shachor <sh...@il.ibm.com>.

>
> At this point, I can not find how to assign the application (context?)
> to specific port.
> Now, all of JSP or Servlet request are going into port 8007 using
> ajp12.
> 
> Is there another configuration file (except mod_jk.conf-auto) for it?
> I don't want to modify mod_jk.conf-auto in hand, because this file is
> auto generated by Tomcat startup.
> 

In mod_jk.conf-auto you should have entries that looks like

JkMount <pattern> <worker name> 
e.g. JkMount /servlet/* ajp12

This actually means, mount all requests matching the pattern to the
named worker.
For now (and for backward compatibility) the auto generated file uses
the default
AJPV12 worker, you should change the wanted statements to use an AJPV13
worker,
for example, for the default AJPV13 worker named ajp13 and you should
have:

JkMount /servlet/* ajp13

This does require you to change mod_jk.conf, or just to change the
ApacheConfig task
and recompile...

> One more question: Is there DTD for server.xml? If yes, tell me the
> URL to get it. I cannot find this information in JSP SPEC 1.1
server.xml is not part of the JSP spec and tomcat does not validate this
file.
This is partially because it is in a constant change... For example,
just yesterday
Alex changed the attributes that a Logger element can accept.

	Gal Shachor