Is it possible to set the response status code ,like 212,299,etc.............................
but I tried to do it by setting in my code
it returns 500 ,but works fine when I am sending a response like 200 to 207 or 300 to 307 or 400 to 426 which are predefine status codes in Apache.
[ November 07, 2008: Message edited by: Talitha Bell ]
What is the 212 status code for? There is no such code defined in the HTTP protocol.The browser is not able to interpret it and hence its assuming it to be 500(internal server error). Here is a list of the available status codes.
Hope this helps
When I set this response status in my code and run it on jboss its work fine.
Problem is that i want to set my response(like 212,....etc ) in my code for specific task by getting it .
here the link want I want to do is http://www.coderanch.com/t/421464/JBoss/Configure-apache-jboss-Response
Is there any solution..
I'm not sure if the servlet spec actually specifies what should happen for other status codes, but apparently there may be problems, as you've found out.
Originally posted by Talitha Bell:
This response code only for Apache or for any other web server.Can you explain it.
They are the HTTP protocol status codes, not specific to any server.
In fact all HTTP servers are bound to follow those codes as specified by the protocol standard.
I know that I am asking you foolish question but..............
There are no foolish questions. A question is a always a question, whatever it is
Can you tell us why you want a custom status code? Maybe your problem has a better solution.
This response code only for Apache or for any other web server.
The response codes are defined by the HTTP specification. It is then up to the HTTP servers to return them under the correct circumstances. This diagram goes into a lot of detail about which status should be returned under which circumstances.
[ November 07, 2008: Message edited by: Ulf Dittmer ]
Can you tell us why you want a custom status code
My problem is same as I post the link above,we are trying to do is we send the custom response like(212 or etc rather than HTTP STATUS RESPONSE CODES),because HTTP STATUS RESPONSE CODES have some meaning(way of communication between client and server) ,so we are not want to take a chance to do with these codes (if any exception or something generate)and after getting those response which have some operations ,and also have some operation if we get predefine HTTP STATUS RESPONSE CODES web page.
But we easily find it on JBoss but not on Apache+jboss
Webservers, and applications servers are, for the most part, built around the specs for the technologies they intend to support (HTTP, Servlet, JSP, etc..).
As long as they can be tested against those specs and perform as expected they are considered to be working correctly (spec compliant).
How they handle something that falls outside the spec or how they handle things that, in the spec, that aren't clear or could be interpreted in several ways is going to be very much vendor specific. Any time we, the application developer, code our apps around non-spec compliant features we run the risk that our applications will be non-portable; not only from one server to another but even from one version of a particular server to the next.
I would follow Ulf's advice and rethink your approach.
If you can come up with a solution that adheres to the HTTP specification, you stand a much better chance that your app will be portable and robust enough to handle server upgrades in the future.
[ November 07, 2008: Message edited by: Ben Souther ]