Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

session properties and beans  RSS feed

 
justin deming
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I make session properties and methods available to beans that are used in combination with JSP and servlets? Is it possible to use an import?
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I pass the HttpServletRequest and HttpServletResponse as arguments. for instance when I call a transaction bean, it creates an container class and makes it available to the jsp page as a symbol in the session context.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure you don't save a reference to the request or response objects - they are not supposed to live past the sending of the response.
Bill
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!