• 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

custom 503 error page thrown from servlet java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is pretty simple and straight forward. I want to thrown an error 503 from servlet side. Pretty simple right ?



When this is thrown , i need it to hit a custom error page . i.e basically a 503 error page itself , but with little mods . say i have 503.html .

Now i added


in web.xml .

I created a war file , with a servlet which throws 503 error. And web.xml with this content. And i kept the 503.html in the parent folder location. (or should i keep it elsewere ?)

I deployed the app in WLS , but this custom 503.html is not getting hit. I am getting the generic 503 error.

Am i missing something?
Find below the contents..

File structure of webapp1.war

->web-inf

->web-inf->classes->prject4->Class1.class

->web-inf->jsp->error->custom.html

web.xml
class1.java



 
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
Have you tried this in multiple browsers? IE can be finicky...
 
tom kapp
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I have tried with different browsers. I normal use ff. Tried with Chrome ad well.
 
reply
    Bookmark Topic Watch Topic
  • New Topic