Very Nice Errors.


Web tier: servlets, JSP, Web frameworks: Very Nice Errors.

  1. Very Nice Errors. (2 messages)

    Our JSP/Servlet Engine provider is completely crap, which is why we keep on getting the old message of:

    "Can't contact servlet runner at"

    Two related questions then:

    1) Is there anything I can do to improve the error message above? eg. By doing a snoop or similar first to see if the server is alive.

    2) Is there any servlet available (Or any ideas on how to write a servlet) that constantly monitors the status of the servlet engine. If it becomes unavailable then it emails you......



    Threaded Messages (2)

  2. Very Nice Errors.[ Go to top ]

    To answer your questions in turn....

    1) Check the webserver logs for the error code that is logged when the failure to contact the servlet engine occurs. Then set up an error document directive for your webserver. This tells the webserver to redirect the user to a particular page when that error code is encountered.

    2) Write a program yourself that polls a "ping servlet" using http and then mails you if it can't connect for x minutes. That should take you around an hour to write, using the HTTP classes (Check out HttpClient on the net, rather than the standard ones) and JavaMail.

    Hope that helps



    PS. What servlet engine are you using? Sounds like the thing you should really be doing is sorting out these errors. :-)
  3. Very Nice Errors.[ Go to top ]

    Thanks Tony,

    The engine I'm using is the latest Resin version on a Linux box using Apache as the http server. My ISP isnt telling me why resin keeps on going down because I think they just simply dont know.

    Anyway, thanks for the suggestions. I have only access to the classic 404.shtml etc.. redirection messages, but since these don't handle the "Can't contact servlet engine" I won't be able to do it. Maybe I'll have to ask my ISP, but that could take an age.

    Also, I like your suggestion about using a "ping servlet" - I'll check it out.