This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes error page in web.xml never called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "error page in web.xml never called" Watch "error page in web.xml never called" New topic
Author

error page in web.xml never called

Andre Solberg
Greenhorn

Joined: Sep 16, 2010
Posts: 13
Hi,

I'm trying to add some custom error pages to my application:

<error-page>
<error-code>404</error-code>
<location>/error404.jsp</location>
</error-page>

But instead I just get this when running on the j2ee preview server in eclipse.

HTTP ERROR 404

Problem accessing /app/asdf. Reason:

NOT_FOUND

What am I doing wrong?

Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
161

Have you tried running it outside Eclipse, in a real server?

[My Blog] [JavaRanch Journal]
Andre Solberg
Greenhorn

Joined: Sep 16, 2010
Posts: 13
Hi,

I just tested on a Tomcat server, and it's working. Would still be nice if I could test locally before deploying, but I can't find any settings in the j2ee preview that has anything to do with this. Any suggestions?

thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
161

I'm not an IDE expert. I'll move this to our IDE forum where someone might be able to help.
 
jQuery in Action, 2nd edition
 
subject: error page in web.xml never called
 
Similar Threads
Handle all error codes other than one
A recursive error was detected.
Configurting all errors to single page
Intercept a 404 Error
Defining error page