• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Error page driving me nuts

 
Tom Fulton
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the simplest possible error page, and it is displaying mystifying, but consistent, behavior. I have a servlet that throws an HTTP 500 error, as follows:



I have an error page that works correctly...the deployment descriptor points at it properly, everything works fine:


But if I remove the c:choose and ctherwise, so that it only says "Please try again later", it doesn't work. It still throws an HTTP 500, but instead of going to this page it gives the standard HTTP 500 page and says "There is a problem with the page you are trying to reach and it cannot be displayed". When I say "remove" I mean that I take it out completely, not commenting it. What is wrong with this page? This is driving me berserk.

The server console is not displaying anything different when I run this the two ways. So apparently the server is happy. But the page won't display.

If it matters, this is on RAD 7 with Websphere 6.1

Thanks in advance for any advice.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of two things can be happening:

1) Your error page is itself throwing an error. When you say "But if I remove the c:choose and ctherwise", does that imply that you are leaving the "when"?

2) Is this in IE? If so, try another browser and see if it works. IE is notorious for replacing your error page with its own when the content of the page is short.
 
Tom Fulton
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. When I said I removed the c:choose, I mean I removed it and everything within it. So all that was left was a single line of output within <P> tags.

This is occurring within RAD 7 using the built-in browser. It might be IE, I don't know. I'll try simply increasing the amount of text and see if that makes a difference. Never thought it might be the browser, that's a good thought. And I never knew IE would replace the error page with its own. Yet another reason I use Mozilla.

Thanks again.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it does turn out to be the IE-ism, I've seen a trick where a large HTML comment is placed on the page simply to bulk it up over the IE limit.

There's also an IE browser setting "Show friendly errors" that might be at play here.
 
Tom Fulton
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I utterly failed to reply to thank you for your idea, which turned out to be correct. I just created more text, mainly to test it out, and you were right! It solidified my decision (not that it needed solidifying) not to use IE unless absolutely necessary. I wish I understood their logic...and in asking some other developers, they were not aware of this little wrinkle either. So you saved more than one innocent career today!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the IE menu:
Tools -> Internet Options -> Advanced (tab)
Scroll down and uncheck the "Show friendly HTTP error messages" check box.

IE has shipped with checked by default for the last few years so it's pretty standard to flip this switch before using it for development.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
IE has shipped with checked by default for the last few years so it's pretty standard to flip this switch before using it for development.


Unfortunately that doesn't help the user base who are generally not savvy enough to use a real browser.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!