• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error Handling in Servlets

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple web application with two servlets LoginServlet and TestServlet. I am using Tomcat 5.0. I call the LoginServlet where im using the following line



In the web.xml for the application I have defined a error-page tag as below



In the TestServlet im just printing Hello to the response.

When i run the application, first I call LoginServlet. Now as per the error handling, TestServlet should be called and is being called. But TestServlet isn't printing "Hello" on screen. I still get 404 page cannot not found page. Can anyone help ?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this in Internet Explorer?
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I am using Internet Explorer
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try it in another browser like Firefox to see if it works there.

You may be running afoul of an IE anti-feature where if the error response is small, IE ignores it and substitutes its own page.

It's also possible that an IE setting (I think it's something like "show firiendly message" but I use a Mac and don't have IE in front of me to check it out) may be boofing you up.
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Bear. My problem is resolved. It works on Firefox. But why does Internet explorer behave this way ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic