You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tim Christopher <ti...@gmail.com> on 2005/01/30 18:18:43 UTC

Error Pages

Hi,

I'm trying to setup custom error pages using Tomcat but keep on
getting the following error:

org.apache.catalina.core.StandardHostValve@195dd5b: Exception
Processing ErrorPage[errorCode=404, location=/errors/404.do]
ClientAbortException:  java.net.SocketException: Software caused
connection abort: socket write error
	at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
	<snip>rest of stack dump...</snip>


Here is what's in my files:

Web.xml
--------------
  <error-page>
    <error-code>404</error-code>
    <location>/errors/404.do</location>
  </error-page>


Struts-Config.xml
--------------------------
    <action
      path="/errors/404" 
      type="org.apache.struts.actions.ForwardAction"
      parameter="public.error" />


Thanks in advance for your help.

Tim

##########################################################
Ps.
As a matter of best practices should I be using the above to forward
to the page (Tiles plug-in) or should I use the following, where
BlankAction extends action and whose execute method always returns
"success".

    <action path="/errors/404" type="com.company_name.action.BlankAction">
      <forward name="success" path="public.error" />
    </action>
##########################################################

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Error Pages

Posted by Curtis Taylor <cu...@gmail.com>.
Hi Tim,

One (maybe obvious) question:

Does your tiles-defs.xml definition for "public.error" have a path to 
your jsp?

If not, that could wreak all kinds of error havoc...

Tim Christopher wrote:
> Hi,
> 
> I'm trying to setup custom error pages using Tomcat but keep on
> getting the following error:
> 
> org.apache.catalina.core.StandardHostValve@195dd5b: Exception
> Processing ErrorPage[errorCode=404, location=/errors/404.do]
> ClientAbortException:  java.net.SocketException: Software caused
> connection abort: socket write error
> 	at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
> 	<snip>rest of stack dump...</snip>
> 
> 
> Here is what's in my files:
> 
> Web.xml
> --------------
>   <error-page>
>     <error-code>404</error-code>
>     <location>/errors/404.do</location>
>   </error-page>
> 
> 
> Struts-Config.xml
> --------------------------
>     <action
>       path="/errors/404" 
>       type="org.apache.struts.actions.ForwardAction"
>       parameter="public.error" />
> 
> 
> Thanks in advance for your help.
> 
> Tim
> 
> ##########################################################
> Ps.
> As a matter of best practices should I be using the above to forward
> to the page (Tiles plug-in) or should I use the following, where
> BlankAction extends action and whose execute method always returns
> "success".
> 
>     <action path="/errors/404" type="com.company_name.action.BlankAction">
>       <forward name="success" path="public.error" />
>     </action>
> ##########################################################


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Error Pages

Posted by Tim Christopher <ti...@gmail.com>.
Cheers for the suggestion, but that wasn't it :o(

I've noticed though that if the location of the error page is a *.do
file that exists, then it always shows the above error (and fails to
load the page)...  If the requested page is a *.jsp then it doesn't
show the error page, however the page still doesn't load.

It does, on occasions, decide to work properly....  Though when I
click refresh or try to reload the page it decides not to work again.

Could this be anything to do with my IDE (JBuilder), as I'm really
running out of ideas as to what else it could be!

>>>>
Note: Given the previous suggestion, all my recent attempts have been
done with an error.jsp file containing minimal info.

<html>
 <head>
   <title>error_page</title>
 </head>
 <body>
   <h1>Error Page</h1>
 </body>
</html>


On Mon, 31 Jan 2005 22:45:45 -0600, Kishore Senji <ks...@gmail.com> wrote:
> >
> > org.apache.catalina.core.StandardHostValve@195dd5b: Exception
> > Processing ErrorPage[errorCode=404, location=/errors/404.do]
> > ClientAbortException:  java.net.SocketException: Software caused
> > connection abort: socket write error
> >        at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
> >        <snip>rest of stack dump...</snip>
> >
> > Here is what's in my files:
> >
> 
> May be http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840241#3840241
> would help
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Error Pages

Posted by Kishore Senji <ks...@gmail.com>.
> 
> org.apache.catalina.core.StandardHostValve@195dd5b: Exception
> Processing ErrorPage[errorCode=404, location=/errors/404.do]
> ClientAbortException:  java.net.SocketException: Software caused
> connection abort: socket write error
>        at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
>        <snip>rest of stack dump...</snip>
> 
> Here is what's in my files:
> 

May be http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840241#3840241
would help

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org