More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. Request Body in case of Get Request has no meaning and hence it's not parsed when the request is received. Alternatively Request Parameters are passed as either Path Params or Query Params.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Suppose we want to visit a site for any information, information can be represented in different languages like English,German or may be other and their format for presentation can also differ from HTML to PDF or may be Plain text. In this case when an client makes an HTTP request to a server, client can also specify the media types here. Client can specify what it can accept back from host and on the basis of availability the host will return to the client. This is called content negotiation because client and server negotiated on the language and format of the content to be shared.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are:
User Authentication - occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password
Hidden form fields - fields are added to an HTML form that are not displayed in the client's browser. When the form containing the fields is submitted, the fields are sent back to the server
URL rewriting - every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change.
Cookies - a bit of information that is sent by a web server to a browser and which can later be read back from that browser.
HttpSession- places a limit on the number of sessions that can exist in memory.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  j2ee   servlets   session   session management   web applications   cookies   httpsession   url rewriting   architecture Asked in 1 Companies
Q8. Why Web services use HTTP as the communication protocol ?
Ans. With the advent of Internet, HTTP is the most preferred way of communication. Most of the clients ( web thin client , web thick clients , mobile apps ) are designed to communicate using http only. Web Services using http makes them accessible from vast variety of client applications.
Help us improve. Please let us know the company, where you were asked this question :
Ans. http protocol on its own is stateless. So it helps in identifying the relationship between multiple stateless request as they come from a single source.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Session info in the request can be intercepted and hence a vulnerability. Cookie can be read and write by respective domain only and make sure that right session information is being passed by the client.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  j2ee   servlets   session   session management   web applications   cookies   httpsession   architecture
Ans. Http is connection less by default. header informs hosts to keep the connection alive so that the same connection can be reused for multiple communication.
Help us improve. Please let us know the company, where you were asked this question :