• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error Page problem.

 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

Got a problem while configuring a <error-page> element for my application. This is what i have done to configure an application wide error-page element.

1. In web.xml, provided an entry as follows :



2. within my webapps folder under my application TestApp created a folder named errorPages and a placed a new file called 404.jsp.

3. Inside 404.jsp, provided isErrorPage = "True"



But what i always get is plain old "Page cannot be found"

I have also restarted the tomcat server and have checked that when i click on a page which is not available, it does create a _404_jsp.java in the work folder of catalina home.

Can anyone please throw light what i am missing in the above steps to make this error-page handling work as i desire it to be.

Thanks in advance,
Yogendra N Joshi.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you're doing is correct. Is the 404.jsp put in the right place? It should be in the errorPages/404.jsp as shown in your web.xml.
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the entries similar to what you have in web.xml and other stuff also similar to what you are trying - I am able to see the error page(customized one) in Firefox. But still am unable to see the expected result in IE. I am using Tomcat5.0 and servlet2.4. Firefox3.0 IE 7.0

Would someone please tell what is happening here.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a browser setting in IE -- I forget which.
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:It's a browser setting in IE -- I forget which.


Bear, Can you please help with this, since i need to make this work and i have done everything correct as per my jsp/ servlets knowledge.

Regards,
Yogendra
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't use IE -- I don't even use Windows -- so I can't check for you. Do some research.

But the point is, because it is a browser setting, you cannot affect it from a Servlet. You'll need to convince all your users to change their browser settings. Is that feasible?

One thing you might try: sometimes a longer error response will cause IE to use the error page instead of its own -- at least (if I'm recalling correctly) with older versions of IE.

(And please do not "bump" your topics in an effort to get more responses. I have removed your "bump".)
 
vivek Jain s
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yogendra Joshi wrote:
Bear Bibeault wrote:It's a browser setting in IE -- I forget which.


Bear, Can you please help with this, since i need to make this work and i have done everything correct as per my jsp/ servlets knowledge.

Regards,
Yogendra


Hi Yogendra,

I faced the same problem as you did. Error page was coming fine with Firefox but not with IE. Even after a tomcat restart, did not resove it.

But after 1 hour I restarted the server again and It is working fine in IE. I am using IE-6.
Check attachment also.

Regds
Vivek
error_page.JPG
[Thumbnail for error_page.JPG]
Error Page
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic