how to customise 503 pages in tomcat

Discussion in 'Javascript' started by Yash, May 15, 2007.

  1. Yash

    Yash Guest

    Hi all,
    I found that while we are updating our application, the application
    is not known to tomcat, untill it is completed. So tomcat sends 503
    page as resource not found. I want to know is virtual hosting is the
    right way to deal with this issue.

    Is it possible to customise the 503 page, so that, for any resource
    not found issue, tomcat displays the customised page.
    I am trying to set the page in tomcat directory itself. I have gone
    through all xml files in tomcat directory, along with xml files in
    other directories like conf etc. I did not find any setting for 503
    pages. If you know how to set this page. please write me.
    Is this solution is appropriate?

    Thanks in advance
    Yash, May 15, 2007
    #1
    1. Advertising

  2. Yash

    Yash Guest

    Re: <error-code>404</error-code> how to customise 503 pages in tomcat

    On May 15, 11:48 am, Yash <> wrote:
    > Hi all,
    > I found that while we are updating our application, the application
    > is not known to tomcat, untill it is completed. So tomcat sends 503
    > page as resource not found. I want to know is virtual hosting is the
    > right way to deal with this issue.
    >
    > Is it possible to customise the 503 page, so that, for any resource
    > not found issue, tomcat displays the customised page.
    > I am trying to set the page in tomcat directory itself. I have gone
    > through all xml files in tomcat directory, along with xml files in
    > other directories like conf etc. I did not find any setting for 503
    > pages. If you know how to set this page. please write me.
    > Is this solution is appropriate?
    >
    > Thanks in advance


    Hi all,
    I have added the following code in tomcat5.5.12/conf/web.xml after
    welcome file list tab

    <error-page>
    <error-code>404</error-code>
    <location>/error404.html</location>
    </error-page>

    Now when I try for a resource that is not available in my tomcat, the
    result is a blank page instead of 404/- default page. That means the
    code worked fine but the error404.html is not found at the right
    place.
    I have tried to paste the simple html file that many different folders
    like in tomcat home itself, then in webapps, server, server/webapps/,
    server/webapps/manager, etc. But the it always returns blank page.

    For simplicity I have used single line to display the error page. the
    code in error404.html is as follows:
    <html>
    <title> 404 resource not found </title>
    <body>



    This is 404 error page



    </body>

    </html>


    Can any one please tell where am I going wrong.

    Thanks
    Yash, May 15, 2007
    #2
    1. Advertising

  3. Yash

    Lee Guest

    Re: <error-code>404</error-code> how to customise 503 pages in tomcat

    Yash said:

    >I have added the following code in tomcat5.5.12/conf/web.xml after
    >welcome file list tab
    >
    ><error-page>
    > <error-code>404</error-code>
    > <location>/error404.html</location>
    ></error-page>
    >
    >Can any one please tell where am I going wrong.


    The most obvious mistake seems to be that you're asking
    questions about Tomcat configuration in a Javascript newsgroup.
    You'll find better answers in an appropriate newsgroup.
    At a glance, alt.apache.configuration looks like a good place.


    --
    Lee, May 15, 2007
    #3
  4. Yash

    Yash Guest

    Re: <error-code>404</error-code> how to customise 503 pages in tomcat

    On May 15, 4:39 pm, Lee <> wrote:
    > Yash said:
    >
    > >I have added the following code in tomcat5.5.12/conf/web.xml after
    > >welcome file list tab

    >
    > ><error-page>
    > > <error-code>404</error-code>
    > > <location>/error404.html</location>
    > ></error-page>

    >
    > >Can any one please tell where am I going wrong.

    >
    > The most obvious mistake seems to be that you're asking
    > questions about Tomcat configuration in a Javascript newsgroup.
    > You'll find better answers in an appropriate newsgroup.
    > At a glance, alt.apache.configuration looks like a good place.
    >
    > --



    Thank you very much and sorry for misplacecd query.
    Yash, May 16, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    1
    Views:
    425
    Eliyahu Goldin
    Jun 6, 2005
  2. Jason Myers

    How to Customise an ASP 2.0 grid

    Jason Myers, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    364
    Jason Myers
    Mar 28, 2006
  3. hood
    Replies:
    1
    Views:
    770
    Andrew Thompson
    Dec 30, 2003
  4. Ken Ramirez

    Apache/Tomcat returning Error 503

    Ken Ramirez, May 12, 2004, in forum: Java
    Replies:
    0
    Views:
    9,372
    Ken Ramirez
    May 12, 2004
  5. Leigh

    Customise Application Icon

    Leigh, Jan 10, 2008, in forum: Java
    Replies:
    7
    Views:
    16,710
    crackmonkeys4hire
    Mar 7, 2009
Loading...

Share This Page