File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Error Page Not Found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error Page Not Found" Watch "Error Page Not Found" New topic
Author

Error Page Not Found

Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
I have a custom error page that works correctly in my local tomcat server but when I deploy it on a remote tomcat server the error page can not be found. Any ideas on what might be wrong or how to debug?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Do you think perhaps showing us how you declared the error page might be helpful?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
Here's the error page...


[ August 11, 2008: Message edited by: Andy Holm ]
Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
Here's the web.xml entry:

<error-page>
<error-code>500</error-code>
<location>/pages/error.jsp</location>
</error-page>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

I assume pages is a folder in the web app root?

How do you know the issue is that the error page can't be found?
Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
Yes, "pages" is a folder in the web application root directory. The reason I believe that the error page can't be found on the remote server is because it shows a HTTP 404 Not Found error at the top of the web page returned.
[ August 11, 2008: Message edited by: Andy Holm ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Does the 404 list the error page as the missing resource? Does the error page work if you address it directly? This is all info you should be including in your posts. Please read this for more information.
[ August 11, 2008: Message edited by: Bear Bibeault ]
Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
It works if I address the error page directly. Firefox shows a blank page rather than the 404 error page that IE shows when trying to redirect to the error page.


When looking in the Tomcat logs, I found this:

javax.faces.el.EvaluationException: java.lang.Exception: Text Exception
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

This appears to be what is expected as the "Test Exception" is the exception being thrown from the business logic. It is also the same exception that is thrown from my local server (where the error page works as expected).

[ August 11, 2008: Message edited by: Andy Holm ]
[ August 11, 2008: Message edited by: Andy Holm ]
Andy Holm
Ranch Hand

Joined: Jul 03, 2008
Posts: 86
Figured it out despite the wild goose chase Bear had me on.

Here's some advice to (Bad News) Bear Bibeault:

You can be smart or you can be pleasant. Well, for years I was smart. I recommend pleasant.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

Originally posted by Andy Holm:
Figured it out despite the wild goose chase Bear had me on.


Do you mind sharing your findings with the community so if someone else comes to a similar problem they can learn from your experience?


Originally posted by Andy Holm:
Here's some advice to (Bad News) Bear Bibeault:

You can be smart or you can be pleasant. Well, for years I was smart. I recommend pleasant.


I don't know what your problem with Bear is, he did nothing but try to elicit more information to help you. Perhaps you should turn down the sensitivity meter just a bit when conversing over the internet?


Steve
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Indeed, thanks Steve. I'm at a loss at figuring out how trying to advise people on how to get help more quickly is somehow not pleasant.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error Page Not Found
 
Similar Threads
wanted to impement file uploading
Tomcat Configuration -Help pls
Custom error page
tomcat installation problem
Tomcat server 6 not starting in eclipse europa