-
1. Re: 404 ERROR PAGE
black78 Dec 8, 2005 10:46 AM (in response to ego2002)Hi.
I have the same problem.
I want to use my own error page for different error numbers and Exceptions.
I tried to change the web.xml (lies in the WEB-INF Dir of my portal) like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- $Revision: 1.3 $ -->
<web-app>
....
<!-- error mapping -->
<error-page>
<error-code>404</error-code>
/404.html
</error-page>
<error-page>
<error-code>500</error-code>
/404.html
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
/404.html
</error-page>
</web-app>
It does not work. The standard tomcat error-page appears.
Any idea?
@ego2002: Have you solved the problem?
Greetings, Black -
2. Re: 404 ERROR PAGE
black78 Dec 8, 2005 10:48 AM (in response to ego2002)"Black78" wrote:
Hi.
I have the same problem.
I want to use my own error page for different error numbers and Exceptions.
I tried to change the web.xml (lies in the WEB-INF Dir of my portal) like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- $Revision: 1.3 $ -->
<web-app>
....
<!-- error mapping -->
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/404.html</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/404.html</location>
</error-page>
</web-app>
It does not work. The standard tomcat error-page appears.
Any idea?
@ego2002: Have you solved the problem?
Greetings, Black -
3. Re: 404 ERROR PAGE
black78 Dec 8, 2005 10:48 AM (in response to ego2002)"Black78" wrote:
"Black78" wrote:
Hi.
I have the same problem.
I want to use my own error page for different error numbers and Exceptions.
I tried to change the web.xml (lies in the WEB-INF Dir of my portal) like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- $Revision: 1.3 $ -->
<web-app>
....
<!-- error mapping -->
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/404.html</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/404.html</location>
</error-page>
</web-app>
It does not work. The standard tomcat error-page appears.
Any idea?
@ego2002: Have you solved the problem?
Greetings, Black -
4. Re: 404 ERROR PAGE
black78 Dec 8, 2005 10:54 AM (in response to ego2002)Ups. sorry for this...
The location Tag is not shown in my Example-Code.
No idea, why.
Black -
5. Re: 404 ERROR PAGE
mholzner Dec 8, 2005 12:36 PM (in response to ego2002)in what WAR did you place this ?
You need to put the entry and the page in the correct context (I think it's the portal server war; not 100% sure and I don't have the code on this machine to look ....). Anyway. Look at the Login page as an example. -
6. Re: 404 ERROR PAGE
black78 Dec 9, 2005 5:01 AM (in response to ego2002)The web.xml is in the same WEB-INF dir like my portal xml descriptors:
***-portal.xml
portlet.xml
portlet-instances.xml
Ok, the LoginPortlet uses the path "/WEB-INF/jsp/user/login.jsp".
But my problem is, that the error-page entry is simply ignored. I get a normal tomcat error report page.
Black -
7. Re: 404 ERROR PAGE
scottdawson Dec 9, 2005 9:06 AM (in response to ego2002)Internet Explorer will not load error pages that are smaller than 512 bytes. If you are testing with IE, try adding comments or content to the error page so that it is larger than 512 bytes.
Scott Dawson
Unisys -
8. Re: 404 ERROR PAGE
black78 Dec 9, 2005 9:12 AM (in response to ego2002)Thanks, but I'm not testing with IE.
Black -
9. Re: 404 ERROR PAGE
nchandrasekhar_mca Dec 22, 2005 2:40 AM (in response to ego2002)i got 404 - Page Not Found while testing my portal
-
10. Re: 404 ERROR PAGE
nchandrasekhar_mca Dec 22, 2005 2:42 AM (in response to ego2002)"nchandrasekhar_mca" wrote:
i got 404 - Page Not Found while testing my portal
looking forward for solution
with regards
chandra sekhar
nchandra.sekhar@secf.com
chandra_sekhar_mca@yahoo.com