| Author |
Invoking Servlet Tomcat 5.5.4
|
Rick Fischer
Greenhorn
Joined: May 15, 2003
Posts: 19
|
|
I cannot invoke the following servlet in the Browser address line http://www.mywebsite.com/CCLoadIntro However http://localhost/CCLoadIntro works fine My servlet is in TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/trans/CCLoadIntro.class My WEB-INF/web.xml has the following: <servlet> <servlet-name>CCLoadIntro</servlet-name> <servlet-class>trans.CCLoadIntro</servlet-class> </servlet> <servlet-mapping> <servlet-name>CCLoadIntro</servlet-name> <url-pattern>/CCLoadIntro</url-pattern> </servlet-mapping> localhost version is Tomcat 4.1.12 Fails on production server Tomcat 5.5.4 The /conf/web.xml and WEB-INF/web.xml are the same in both Tomcat versions? Could there be a server.xml setting on Tomcat/Catalina preventing it from working? Is there any Version 5.5.4 issues I'am not considering
|
 |
Craig Jackson
Ranch Hand
Joined: Mar 19, 2002
Posts: 405
|
|
Let me see if I understand what you are saying. You have tomcat4.1 running on your test box and your application will run without any problems, but this same application running on the "production" tomcat5.5 on a different box will not run. Are you using Apache as the front end, with the jk2 connector? If so, you may have to modify the Apache's httpd.conf file by adding your application's url-pattern, so Apache will route requests to tomcat. I am assuming a lot based on your original statement. So anymore information would be helpful. Thanks.
|
 |
Rick Fischer
Greenhorn
Joined: May 15, 2003
Posts: 19
|
|
Thanks for your help jk jack You are correct in your assumptions. To give you more information, the application has been all JSPs, which are all working fine. I added a servlet, which I am trying to invoke directly, to do some processing before redircting to a jsp. Invoking the servlet directly is where I am having a problem. Concerning Apache jk2 Connector I found the following in my local server.xml file. <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8009" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> On the production web server which is Tomcat 5.5.4, there is no such entry, not even commented out I am a novice at understanding all the entries in the server.xml file. I can tell you my Tomcat 4 version makes numerous references to Coyote, while Tomcat 5 makes no reference to Coyote, but rather Catalina
|
 |
Craig Jackson
Ranch Hand
Joined: Mar 19, 2002
Posts: 405
|
|
A couple more questions. 1. So, you are using apache as the front end on your production server? 2. Can you give me example urls of how you are invoking the jsp(s) on your website on the production server? I believe you said this is working. 3. Can you bring up the Tomcat test page from your production website? 4. What message are seeing when you try to invoke your servlet on the production server? I am not even close to being an expert. But I will try to help you out the best way I can. For example for my setup, I have RH9 OS, with Apache 2.0 as the front end and Tomcat 5.0 as the servlet/jsp backend using the JK2 connector. Thanks
|
 |
Rick Fischer
Greenhorn
Joined: May 15, 2003
Posts: 19
|
|
Craig, Thank very much for your help To your questions The web site is www.mygkard.com (It does use frames unfortunately) You can invoke a jsp as follows www.mygkard.com/v2login.jsp If you try www.mygkard.com/CCLoadIntro you get The page cannot be found ... Http Error 404 Internet Information Services Does this mean they are running IIS? I don't know how to bring up the Tomcat Test page on the production server. Thanks
|
 |
Craig Jackson
Ranch Hand
Joined: Mar 19, 2002
Posts: 405
|
|
Yes, it does look they are using IIS. I am not familiar with the IIS/Tomcat conbination. It appears the IIS server is setup to route any request to the Tomcat container when it founds the pattern <*.jsp>. So, my guess it does not know what to do with the url below much less route it to the Tomcat container. So I would think you will need to setup IIS by routing any urls that contain the pattern "/CCLoadIntro" to the Tomcat container. I am not sure how you would go about doing this, but hopefully someone with IIS/Tomcat experience can give you a more definitive answer. If that is the problem.
|
 |
 |
|
|
subject: Invoking Servlet Tomcat 5.5.4
|
|
|