difference between session cookie

  • Thread starter jiten via JavaKB.com
  • Start date
J

jiten via JavaKB.com

What is the difference between sesion and cookie?
how can i call a servlet from jsp?
 
J

John C. Bollinger

jiten said:
What is the difference between sesion and cookie?

A cookie is a special piece of data with a bit of associated metadata
that an HTTP server includes in an HTTP response. The server thereby
requests that the client thereafter echo back the cookie in any future
requests to specified servers (usually including itself) until a
configurable timeout has elapsed.

A session is a series of related HTTP requests and responses that
together constitute a single conversation between a client and server.
Because HTTP is a stateless protocol, some means for the server to
associate requests into sessions must be layered on top of HTTP; cookies
are one common mechanism for that.
how can i call a servlet from jsp?

It depends on what you mean by that. Depending on your needs, the best
approach might be a <jsp:include/>, a <jsp:forward/>, a
request.sendRedirect(), or simply including the appropriate URL in the
right place in your HTML (<img src="..."/> or <a href="...">access my
servlet</a>, for instance).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top