Virtual host and mod_jk2 connector setup questions
HI all, I am only newbie to tomcat. I really need help on setting up tomcat 4.1.27 with mod_jk2 connector with a virtual host on apache 2.0.47. I have digged through the mail-list and the jarkata doco page. still no help. Here are my configuration files and the output of the catalina.out file. When i get rid of the section in the server.xml it doesn't come up any error on the catalina.out file. 1. Am I on the right track of setting up virtual host on apache and tomcat? 2. Would that be a problem when I compile the connector and apache myself? SPECs. REDHAT 9.0 j2sdk1.4.2 jakarta-tomcat-4.1.27(binary) apache2.0.47 (./configure --enable-so --enable-ssl --with-ssl=/usr/local/ssl --enable-vho st-alias) jakarta-tomcat-connectors-4.1.27-src (./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-tomcat41=/usr/local/tomcat\ --with-java-home=/usr/local/java \ --with-apache2-lib=/usr/local/apache2/lib \ --with-apr-lib=/usr/local/apache2/lib \ --with-jni) THANKS in advance. =catalina.out Sep 2, 2003 2:31:24 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Sep 2, 2003 2:31:24 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Sep 2, 2003 2:31:30 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Sep 2, 2003 2:31:37 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.27 Sep 2, 2003 2:31:43 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 42 column 11: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,fil ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca l-ref*)". org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,fil ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca l-ref*)". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja va:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3568) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java
RE: Virtual host and mod_jk2 connector setup questions
Hi all tomcat guru, After mess around. I found out what the problem was. it was the web.xml. all the tags has to place before the tags. I assume that the tags in web.xml has to be put in a certain order. But another problem. I can access all the *.jsp file with no problem with the virutal host i setup (e.g. www.domain.com/test.jsp). But I can access to my test servlet(e.g. www.domain.com/HelloWorld). it comes up page not found. here is my web.xml under /web/domain.com/htdocs/WEB-INF here is my webapp directory structure /web/domain.com/htdocs (have all the *.jsp files) /web/domain.com/htdocs/WEB-INF /web/domain.com/htdocs/WEB-INF/classes (all the *.classes) web.xml sits under /web/domain.com/htdocs/WEB-INF Could any one please let me know where did I do wrong? web.xml=== http://java.sun.com/dtd/web-app_2_3.dtd";> Test webapp Test webapp HelloWorld HelloWorld HelloWorld /HelloWorld Cheers, Clive -Original Message- From: Clive Luk [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 2:56 PM To: Tomcat Users List Subject: Virtual host and mod_jk2 connector setup questions HI all, I am only newbie to tomcat. I really need help on setting up tomcat 4.1.27 with mod_jk2 connector with a virtual host on apache 2.0.47. I have digged through the mail-list and the jarkata doco page. still no help. Here are my configuration files and the output of the catalina.out file. When i get rid of the section in the server.xml it doesn't come up any error on the catalina.out file. 1. Am I on the right track of setting up virtual host on apache and tomcat? 2. Would that be a problem when I compile the connector and apache myself? SPECs. REDHAT 9.0 j2sdk1.4.2 jakarta-tomcat-4.1.27(binary) apache2.0.47 (./configure --enable-so --enable-ssl --with-ssl=/usr/local/ssl --enable-vho st-alias) jakarta-tomcat-connectors-4.1.27-src (./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-tomcat41=/usr/local/tomcat\ --with-java-home=/usr/local/java \ --with-apache2-lib=/usr/local/apache2/lib \ --with-apr-lib=/usr/local/apache2/lib \ --with-jni) THANKS in advance. =catalina.out Sep 2, 2003 2:31:24 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Sep 2, 2003 2:31:24 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Sep 2, 2003 2:31:30 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Sep 2, 2003 2:31:37 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.27 Sep 2, 2003 2:31:43 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 42 column 11: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,fil ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca l-ref*)". org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,fil ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca l-ref*)". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja va:282) at org.apache.catalina.startup.C