Accessing an existing JavaBean from a servlet

Hi folks,

I have created a JavaBean with session scope in a JSP and now want to pass this to an existing servlet where several of the methods will be needed, but I don't know how to make the servlet see the Bean. I know that in a JSP you would just use jsp:useBean, but what is the corresponding method of access in a servlet?

TIA,

Raj.

[369 byte] By [rajbhaskar] at [2007-9-26 2:30:00]
# 1
javax.servlet.http.HttpSession.getAttribute(String name)
neville_sequeira at 2007-6-29 9:48:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
> javax.servlet.http.HttpSession.getAttribute(String name)Ahhh, I didn't realise that the Bean was stored in the session. D'oh! Guess who didn't wake up when they got out of bed this morning :o).Thanks,Raj.
rajbhaskar at 2007-6-29 9:48:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...