custom 404 page with 'listings' set to false in web.xml file

Discussion in 'Java' started by rkudyba@gmail.com, Apr 25, 2006.

  1. Guest

    I set the following in web.xml:

    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>listings</param-name>
    <param-value>false</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup

    We have custom 404 pages set up.

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

    But when someone tried to list a directory, e.g.,
    www.oursite.com/images, all of the images in the 404 page and links end
    up broken and we see this in the log file:

    2006-04-25 12:57:47 org.apache.catalina.core.StandardHostValve@827968:
    Exception Processing ErrorPage[errorCode=404, location=/404.html]
    ClientAbortException: java.net.SocketException: Software caused
    connection abort: socket write error
    at
    org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
    at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
    at
    org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.java:537)
    at
    org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:238)
    at
    org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:303)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:147)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)

    Is there another directive that needs setting? Note that if you go to a
    page/directory that does not exist you get the correct custom 404
    page...

    Thanks,
    , Apr 25, 2006
    #1
    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. Jonathan Folland
    Replies:
    2
    Views:
    1,615
    Jonathan Folland
    Mar 17, 2005
  2. Brent
    Replies:
    1
    Views:
    437
    Craig Deelsnyder
    Jun 10, 2005
  3. André
    Replies:
    3
    Views:
    1,563
  4. Replies:
    10
    Views:
    301
    Thomas 'PointedEars' Lahn
    Feb 16, 2006
  5. Sujan
    Replies:
    1
    Views:
    125
Loading...

Share This Page