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
  • 27,971
  • 54
  • 206
  • 370

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,612
  • 3
  • 25
  • 37