• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to send cookie from one jsp page to another jsp page or to servlet

 
maheshm morem
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i want to send cookie from one jsp page to another jsp page or to servlet.
thank you
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The purpose of the Cookie is to maintain the session between Client and the Server. Why do you need Cookies to exchange the information between JSPs? You can use the request object to attach the information or pass them as parameters!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abimaran Kugathasan wrote:The purpose of the Cookie is to maintain the session between Client and the Server.

That is just one purpose to which cookies can be put. it is not the only purpose of cookies.
 
maheshm morem
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you , i got point. how to call the servlet from jsp page?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maheshm morem wrote:thank you , i got point. how to call the servlet from jsp page?

You don't "call" servlets. What do you mean by this?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use RequestDispatcher to forward your request/reponse with that servlet url pattern!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!