This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom 503 error page thrown from servlet java

 
tom kapp
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Yes I have tried with different browsers. I normal use ff. Tried with Chrome ad well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic