473,395 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Broken? <error-page> in web.xm under tomcat 4.x

Hello,

I am running Tomcat 4.x and have tried to set global error handling
using the following kind of entries in the web.xml file. But there is
no redirection and I always end up with the tomcat generated error
page in the browser.

Does anyone have a solution to this problem?

<error-page>
<error-code>500</error-code>
<location>/weberror.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/weberror.jsp</location>
</error-page>

Thanks

Bruce Sams
Jul 17 '05 #1
1 4930
From the servlet specification:

"The error page mechanism described does not intervene when errors
occur in
servlets invoked using the RequestDispatcher."

Do you use Struts? With Struts, the request is *dispatched* to JSP
page, therefore you will not see the error page set up in web.xml. Try
accessing your JSP page without going through the action servlet, so
instead of typing http://localhost:8080/myapp/test.do, type
http://localhost:8080/myapp/test.jsp. You can use <global-exceptions>
in struts-config.xml to achieve what you tried to do with <error-page>
in web.xml.

Jonni Gani

bj**@yahoo.com (Bruce Sams) wrote in message news:<1b**************************@posting.google. com>...
Hello,

I am running Tomcat 4.x and have tried to set global error handling
using the following kind of entries in the web.xml file. But there is
no redirection and I always end up with the tomcat generated error
page in the browser.

Does anyone have a solution to this problem?

<error-page>
<error-code>500</error-code>
<location>/weberror.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/weberror.jsp</location>
</error-page>

Thanks

Bruce Sams

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob | last post by:
I use saxon transformer as XSLT engine, but I have a problem: --- Error reported by XML parser: reference to entity "&{0};" not defined. ---- In the source document there are many entites...
2
by: S.K. Dutta | last post by:
Hi! I am having a problem that I do not have any clue on what to do. I have tries a few obvious things... <system.diagnostics> in the main web.config file is giving configuration error on a...
1
by: serge calderara | last post by:
dear all, i am a bit confused on the way custom error are handling and occurs. First of all I have understand that customer error is used to defined more user friendly message to my end user and...
1
by: Rob R. Ainscough | last post by:
Can someone tell me how to debug a Windows Install problem? I've created the installer project from home PC, transfered the installer project to my work PC, build the project on my work PC, but...
17
by: pbd22 | last post by:
hi. i keep getting this error. as i understand it, my xml isn't formatted correctly. the online errata suggests the standard formatting to solve this problem: element (tab) (tab) element
5
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE"...
2
by: purnimakarnati | last post by:
When I added a textbox and assigned the value to the textbox and added to htmltablecell while debugging I am able to see the correct assigned value but if I see the contents in the HTMLTABLE in...
5
by: ajos | last post by:
hi frnds, this is the way i ve written--> <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5"> but its giving me an error which seems irrelevent.. type Exception...
2
by: Calvin Cheng | last post by:
Hi, I am attempting to convert a bunch of .txt files into html using the docutils package. It works for most of the txt files except for the index.txt file which gives 2 errors: (1)...
5
by: Nike1984 | last post by:
I'm fairly new to Javascript and it's more of a guessing game for me... I'm trying to build an app for Google Maps and just had some issues recently. First off I just wanted to say that everything...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.