0

I know that I can put beans into request and session. How to create application scoped bean? Should I use servlet context for this?

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

1 Answers1

1

In servlet you can use

getServletContext().setAttribute("name", "value")

and in jsp

jsp:useBean class="foo.Counter" scope="application"

Sandeep Nair
  • 3,630
  • 3
  • 26
  • 38