Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters and UnavailableException  RSS feed

 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an implementation of javax.servlet.Filter.init() throws javax.servlet.UnavailableException(), shouldn't the container not add the filter to the FilterChain? I'm getting an HTTP 503 error from OC4J in this case.
 
Siyaa Hoffman
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your filter is not initializing successfully, then I don't think that the context would be even successfully loaded....not sure about OC4J...but tomcat behaves that way. It would not even let you load the web application context successfully if the filter cannot be initialized.
 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The filter requires parameters to be set correctly, so inside init() if the parameters are incorrect or missing, I throw the exception. I was hoping that the container would continue without the filter. But I guess it makes more sense that it wouldn't.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!