Tomcat3.1Beta > FAQ and Trouble Shooting
Previous Page Contents Next Page
OOP-Reserch HOME

Mail to Me

FAQ and Trouble Shooting

Any quetions and comments are welcome to me.
Please make the subject of your mail to begin with 'OOP[tomcat]' (quotes are not required.). I'll reply to you soon.

Index:

  1. How can I handle the request to the virtual hosts on Apache?
  2. JServ fails to start JVM with SSL enabled Apache

1: Request to the virtual host

Q: How can I handle the request to the virtual hosts on Apache?

A: The mapping of the path of the request URI to the context can be done by 'ApJServMount' directive, normaly in jserv.conf(or tomcat.conf) which is specified by 'Include' directive' appended to 'httpd.conf'. For example, with

ApJServMount  /examples   ajpv12://jun_tomcat:8007/examples
the request such as is redirected to the Tomcat servlet server by the JServ module, rather than treated directly by the Apache httpd server. It is translated to the request in the form of and sent to the Tomcat servlet server. Then the Tomcat servlet server searches the servlet 'some_servlet' in the context of '/examples', find and invoke it.
'ApJServMount' directive can be used in the 'VirtualHost' directive of httpd.conf, and in such a case, the request to the virtual server will be redirected to the Tomcat servlet server. It looks like this:
<VirtualHost 205.205.150.103>
    DocumentRoot /export/home/jun/public_html
    ServerName www.juntest.com
    ErrorLog logs/juntest.com-error_log
    CustomLog logs/juntest.com-access_log common
 	<IfModule mod_jserv.c>
	ApJServMount /examples ajpv12://jun_tomcat:8007/examples
 		<Location /examples/WEB-INF/ >
      			AllowOverride None
      			deny from all
 		</Location>  
 	</IfModule>
</VirtualHost>

2: Trouble with SSL enabled Apache

Q: I complied mod_jserv by APXS into the Apache, which is complied with mod_ssl. When Apache starts up with SSL (by 'apachectl sslstart'), JServ fails to start JVM once. After that JServ tries to start JVM again and again between some time interval and finally it succeed. Without SSL (by 'apachectl start'), there is no problem.

A: It is due to the heavy tasks to enable mod_ssl. To avoid this, change the order of the modules to be loaded. In case that mod_jserv is the last module to be loaded, the conflicts with mod_ssl will not occur. Just edit 'httpd.conf' so as to the lines of

and beeing the first line of each dirctive. It looks like bellow:
LoadModule jserv_module       libexec/mod_jserv.so
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
----
----
ClearModuleList
AddModule mod_jserv.c
AddModule mod_vhost_alias.c
Note that the order to be loaded is reverse to the order in 'httpd.conf'.

Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries.


Previous Page Contents Next Page
OOP-Reserch HOME

Mail to Me


ALL CONTENTS COPYRIGHT 2000, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori .