Wednesday, July 13, 2011
Status Code | Associated Message | Meaning |
---|---|---|
100 | Continue | Continue with partial request. (New in HTTP 1.1) |
101 | Switching Protocols | Server will comply with Upgrade header andchange to different protocol. (New in HTTP 1.1) |
200 | OK | Everything's fine; document follows for GET andPOST requests. This is the default for servlets; if youdon't use setStatus , you'll get this. |
201 | Created | Server created a document; the Location headerindicates its URL. |
202 | Accepted | Request is being acted upon, but processing is not completed. |
203 | Non-Authoritative Information | Document is being returned normally, but some of the response headers might be incorrect since a document copy is being used. (New in HTTP 1.1) |
204 | No Content | No new document; browser should continue to display previous document. This is a useful if the user periodically reloads a page and you can determine that the previous page is already up to date. However, this does not work for pages that are automatically reloaded via the Refresh response header or the equivalent <META header, since returning this statuscode stops future reloading. JavaScript-based automatic reloading could still work in such a case, though. |
205 | Reset Content | No new document, but browser should reset document view. Used to force browser to clear CGI form fields. (New in HTTP 1.1) |
206 | Partial Content | Client sent a partial request with a Range header, and server has fulfilled it. (New in HTTP 1.1) |
300 | Multiple Choices | Document requested can be found several places; they'll be listed in the returned document. If server has a preferred choice, it should be listed in the Location response header. |
301 | Moved Permanently | Requested document is elsewhere, and the URL for it is given in the Location response header. Browsers shouldautomatically follow the link to the new URL. |
302 | Found | Similar to 301, except that the new URL should be interpreted as a temporary replacement, not a permanent one. Note: the message was "Moved Temporarily" in HTTP 1.0, and the constant in HttpServletResponse is SC_MOVED_TEMPORARILY ,not SC_FOUND .Very useful header, since browsersautomatically follow the link to the new URL. This status code is so useful that there is a special method for it, sendRedirect .Using response. sendRedirect(url) has a couple ofadvantages over doing response. setStatus and response. . First, it is easier. Second, with sendRedirect ,the servlet automatically builds a page containing the link (to show to older browsers that don't automatically follow redirects). Finally, can handle relative URLs, automatically translating them toabsolute ones.
Technically, browsers are only supposed to automatically follow the redirection if the original request was See the 307 header for details. |
303 | See Other | Like 301/302, except that if the original request was POST ,the redirected document (given in the Location header)should be retrieved via GET . (New in HTTP 1.1) |
304 | Not Modified | Client has a cached document and performed a conditional request (usually by supplying an If-Modified-Since header indicating that it only wants documents newer than a specified date). Server wants to tell client that the old, cached document should still be used. |
305 | Use Proxy | Requested document should be retrieved via proxy listed in Location header. (New in HTTP 1.1) |
307 | Temporary Redirect | This is identical to 302 ("Found" or "Temporarily Moved"). It was added to HTTP 1.1 since many browsers erroneously followed the redirection on a 302 response even if the original message was a POST , even though it really ought to have followed theredirection of a POST request only on a 303 response.This response is intended to be unambigously clear: follow redirected GET and POST requests inthe case of 303 responses, only follow the redirection for GET requests in the case of 307 responses. Note: for some reason there is no constant in HttpServletResponse corresponding tothis status code. (New in HTTP 1.1) |
400 | Bad Request | Bad syntax in the request. |
401 | Unauthorized | Client tried to access password-protected page without proper authorization. Response should include a WWW-Authenticate header that the browser would use to pop up a username/password dialog box, which then comes back via the Authorization header. |
403 | Forbidden | Resource is not available, regardless of authorization. Often the result of bad file or directory permissions on the server. |
404 | Not Found | No resource could be found at that address. This is the standard "no such page" response. This is such a common and useful response that there is a special method for it in HttpServletResponse :sendError(message) . The advantage of sendError over setStatus is that, with sendErr or,the server automatically generates an error page showing the error message. |
405 | Method Not Allowed | The request method (GET , POST , HEAD ,DELETE , PUT , TRACE , etc.) wasnot allowed for this particular resource. (New in HTTP 1.1) |
406 | Not Acceptable | Resource indicated generates a MIME type incompatible with that specified by the client via its Accept header.(New in HTTP 1.1) |
407 | Proxy Authentication Required | Similar to 401, but proxy server must return a Proxy-Authenticate header. (New in HTTP 1.1) |
408 | Request Timeout | The client took too long to send the request. (New in HTTP 1.1) |
409 | Conflict | Usually associated with PUT requests; used forsituations such as trying to upload an incorrect version of a file. (New in HTTP 1.1) |
410 | Gone | Document is gone; no forwarding address known. Differs from 404 in that the document is is known to be permanently gone in this case, not just unavailable for unknown reasons as with 404. (New in HTTP 1.1) |
411 | Length Required | Server cannot process request unless client sends a Content-Length header. (New in HTTP 1.1) |
412 | Precondition Failed | Some precondition specified in the request headers was false. (New in HTTP 1.1) |
413 | Request Entity Too Large | The requested document is bigger than the server wants to handle now. If the server thinks it can handle it later, it should include a Retry-After header. (New in HTTP 1.1) |
414 | Request URI Too Long | The URI is too long. (New in HTTP 1.1) |
415 | Unsupported Media Type | Request is in an unknown format. (New in HTTP 1.1) |
416 | Requested Range Not Satisfiable | Client included an unsatisfiable Range headerin request. (New in HTTP 1.1) |
417 | Expectation Failed | Value in the Expect request header could not bemet. (New in HTTP 1.1) |
500 | Internal Server Error | Generic "server is confused" message. It is often the result of CGI programs or (heaven forbid!) servlets that crash or return improperly formatted headers. |
501 | Not Implemented | Server doesn't support functionality to fulfill request. Used, for example, when client issues command like PUT that server doesn't support. |
502 | Bad Gateway | Used by servers that act as proxies or gateways; indicates that initial server got a bad response from the remote server. |
503 | Service Unavailable | Server cannot respond due to maintenance or overloading. For example, a servlet might return this header if some thread or database connection pool is currently full. Server can supply a Retry-After header. |
504 | Gateway Timeout | Used by servers that act as proxies or gateways; indicates that initial server didn't get a response from the remote server in time. (New in HTTP 1.1) |
505 | HTTP Version Not Supported | Server doesn't support version of HTTP indicated in request line. (New in HTTP 1.1) |
Labels: Internet
Tuesday, July 12, 2011
Internal motivation comes from within, such as pride, a sense of achievement, responsibility and belief.
There was a young boy who used to come for regular practice but always played in the reserves and never made it to the soccer eleven. While he was practicing, his father used to sit at the far end, waiting for him.
The matches had started and for four days, he didn't show up for practice or the quarter or semifinals.
All of a sudden he showed up for the finals, went to the coach and said, "Coach, you have always kept me in the reserves and never let me play in the finals. But today, please let me play."
The coach said, "Son, I'm sorry, I can't let you. There are better players than you and besides, it is the finals, the reputation of the school is at stake and I cannot take a chance." The boy pleaded, "Coach, I promise I will not let you down. I beg of you, please let me play."
The coach had never seen the boy plead like this before. He said, "OK, son, go, play. But remember, I am going against my better judgment and the reputation of the school is at stake. Don't let me down." The game started and the boy played like a house on fire. Every time he got the ball, he shot a goal. Needless to say, he was the best player and the star of the game. His team had a spectacular win.
When the game finished, the coach went up to him and said, "Son, how could I have been so wrong in my life. I have never seen you play like this before. What happened? How did you play so well?"
The boy replied, "Coach, my father is watching me today." The coach turned around and looked at the place where the boy's father used to sit. There was no one there.
He said, "Son, your father used to sit there when you came for practice, but I don't see anyone there today."
The boy replied, "Coach, there is something I never told you. My father was blind. Just four days ago, he died. Today is the first day he is watching me from above."
Labels: Deepak's Scribble, Short Stories (Others)
Monday, July 11, 2011
This is an interesting car puzzle. All you have to do is take the car out of this maze!
Labels: Puzzles
Sunday, July 10, 2011
A group of children were playing near two railway tracks, one still in use while the other disused. Only one child played on the disused track, the rest on the operational track.
The train is coming, and you are just beside the track interchange. You can make the train change its course to the disused track and save most of the kids. However, that would also mean the lone child playing by the disused track would be sacrificed. Or would you rather let the train go its way?
Let's take a pause to think what kind of decision we could make...
Scroll down
Most people might choose to divert the course of the train, and sacrifice only one child. You might think the same way, I guess. Exactly, to save most of the children at the expense of only one child was rational decision most people would make, morally and emotionally. But, have you ever thought that the child choosing to play on the disused track had in fact made the right decision to play at a safe place?
Nevertheless, he had to be sacrificed because of his ignorant friends who chose to play where the danger was. This kind of dilemma happens around us everyday. In the office, community, in politics and especially in a democratic society, the minority is often sacrificed for the interest of the majority, no matter how foolish or ignorant the majority are, and how farsighted and knowledgeable the minority are. The child who chose not to play with the rest on the operational track was sidelined. And in the case he was sacrificed, no one would shed a tear for him.
The great critic Leo Velski Julian who told the story said he would not try to change the course of the train because he believed that the kids playing on the operational track should have known very well that track was still in use, and that they should have run away if they heard the train's sirens.. If the train was diverted, that lone child would definitely die because he never thought the train could come over to that track! Moreover, that track was not in use probably because it was not safe. If the train was diverted to the track, we could put the lives of all passengers on board at stake! And in your attempt to save a few kids by sacrificing one child, you might end up sacrificing hundreds of people to save these few kids.
While we are all aware that life is full of tough decisions that need to be made, we may not realize that hasty decisions may not always be the right one.
'Remember that what's right isn't always popular... and what's popular isn't always right.'
Everybody makes mistakes; that's why they put erasers on pencils.
Labels: Deepak's Scribble
Sunday, June 12, 2011
A German once visited a temple under construction where he slaw a sculptor making an idol of God. Suddenly he noticed a similar idol lying nearby. Surprised, he asked the sculptor, "Do you need two statues of the same idol?" "No," said the sculptor without looking up, "We need only one, but the first one got damaged at the last stage." The gentleman examined the idol and found no apparent damage. "Where is the damage?" he asked. "There is a scratch on the nose of the idol." said the sculptor, still busy with his work. "Where are you going to install the idol?"
The sculptor replied that it would be installed on a pillar twenty feet high. "If the idol is that far, who is going to know that there is a scratch on the nose?" the gentleman asked. The sculptor stopped his work, looked up at the gentleman, smiled and said, "I will know it."
The desire to excel is exclusive of the fact whether someone else appreciates it or not. "Excellence" is a drive from inside, not outside. Excellence is not for someone else to notice but for your own satisfaction and efficiency...
Labels: Deepak's Scribble
Project Manager is a Person who thinks nine women can deliver a baby in One month.
Developer is a Person who thinks it will take 18 months to deliver a Baby.
Onsite Coordinator is one who thinks single woman can deliver nine babies in one month.
Client is the one who doesn't know why he wants a baby.
Marketing Manager is a person who thinks he can deliver a baby even if no man and woman are available.
Resource Optimization Team thinks they don't need a man or woman; they'll produce a child with zero resources.
Documentation Team thinks they don't care whether the child is delivered, they'll just document 9 months.
Quality Auditor is the person who is never happy with a delivered baby.
Tester is a person who always tells that this is not the Right baby.
HR Manager is a person who thinks that... a Donkey can deliver a Human Baby - if given 9 Months !!!
Labels: Fun
Thursday, January 13, 2011
One night President Obama and his wife Michelle decided to do something out of routine and go for a casual dinner at a restaurant that wasn't too luxurious.
When they were seated, the owner of the restaurant asked the president's secret service if he could please speak to the First Lady in private. They obliged and Michelle had a conversation with the owner.
Following this conversation President Obama asked Michelle why he was so interested in talking to her. She mentioned that in her teenage years, he had been madly in love with her.
President Obama then said, " Oh, so if you had married him, you would now be the owner of this lovely restaurant" , to which Michelle responded, "No, if I had married him, he would now be the President"
Labels: Short Stories (Others)