Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

clear this

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an error-page declaration has been made for the web application corresponding to the status code passed in, it will be served back in preference to the suggested msg parameter.
so web.xml takes prefernce ..does this what the above mean
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, thats the impression I get.
In case you are wondering (like me) where this sentence is from, it is from the Servlet Spec, pp 214 of 257.
regds.
- madhav


public void sendError(int sc, java.lang.String msg)
throws IOException
Sends an error response to the client using the specified status clearing the buffer. The server defaults to creating the response to look like an HTML-for-matted server error page containing the specified message, setting the content type to “text/html”, leaving cookies and other headers unmodified. If an error-page declaration has been made for the web application corresponding
to the status code passed in, it will be served back in preference to the suggested msg parameter.

<BR>
If the response has already been committed, this method throws an Illegal-StateException.
After using this method, the response should be considered to be committed and should not be written to.
<BR>
Parameters:
sc - the error status code
msg - the descriptive message
Throws:
IOException - If an input or output exception occurs
IllegalStateException - If the response was committed

 
Bras cause cancer. And tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic