[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Tomcat - doesn't work: either enters tight loop or 404's



  The CPU run up is a problem with Tomcat when Apache gets a request and
hands it off to Tomcat, but Tomcat doesn't know what to do with it. This
usually happens when the URL has a hostname in it that aliases to your site,
but Tomcat doesn't know about it. I've seen this in the following
situations:

 1) Case sensitivity - i.e. Using http://ABC.com/servlet/blahServlet instead
of http://abc.com/servlet/blahServlet

 2) DNS aliases - if there's a DNS alias for www.abc.com that is www.xyz.com
and you try to access the servlet as www.xyz.com. Or, even abc.com instead
of www.abc.com probably won't work.

  To see if this is the problem, access the site by IP address. Hope this
helps.

_Tim
 

On 7/12/01 10:44 AM, "Adam Thompson" <adamt@xxxxxxxxxx> wrote:

> I've installed the Apache+Tomcat+JDK package from
> http://developer.cobalt.com/java, and am experiencing two different,
> odd, behaviours.
> 
> 1) any servlets I load out of /home/sites/home/web/WEB-INF/classes
> appear to _load_, but they then chew up CPU time forever and never
> return (I left two web requests running for 45 minutes before killing
> Tomcat)
> 
> 2) any servlets I attempt to load out of any other site directory result
> merely in **Tomcat** giving me 404 Not Found errors.  I see the Ctx
> lookup in the logfile, and it appears to be structured correctly.  Note
> that apparently I _can_ load servlets from WAR files, although they
> behave as described above - they run forever without producing output.
> 
> Just in case, I've been testing with a sample servlet: HelloWorld
> Here's HelloWorld.java:
> 
> ===START===
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
> /* import java.util.*; */
> 
> public class HelloWorld extends HttpServlet {
> public void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException {
>   response.setContentType("text/html");
>   PrintWriter out = response.getWriter();
>   out.println("<html><head><title>HelloWorld</title></head>");
>   out.println("<body><p>The servlet has received a GET. This is the
> reply.</p></body></html>");
> }
> }
> ===END===
> 
> 
> Any ideas on what would be causing the behaviour I've described?
> Thanks
> 
> -Adam Thompson
> Qunara
> adamt@xxxxxxxxxx
> (204) 925-3256 - office
> (204) 932-0069 - fax
> 
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers
> 




Sun Cobalt Support by Zeffie.com
A Sun Cobalt Support Specialist Since 1999
Sun Cobalt Support, Repairs, Development, and Maintenance.
Home of the Worlds Largest Collection of Sun Cobalt Updates!
Sun Cobalt Spam Filter, Security, Firewall, Anti Virus Products.
Voip 734-454-9117 At&t 734-454-0818 US Toll Free 800-231-4459 UK 0208-150-6860

Zeffie's Sun Cobalt User Forums
Zeffie's Sun Cobalt Restore CD's   Zeffie's Sun Cobalt Updates  
Sun Cobalt Users List   Sun Cobalt Security List   Sun Cobalt Developers List

Click here to buy me a drink at the local pub!
(includes tip and paypal fees)

Copyright 2009 by Electronic Consultants Inc.