Q:

Pass value from Java action class to ejb?

I have developed a web application. I put session id in hashtable. I want to use this hash table in ejb. Means I want to use this login session in ejb.
Is it possible? How can I do that?

A:

It's not impossible, but you must not do it. Get everything you need from the HttpSession and send it to the EJB as method parameters. For example:
public void doGet(HttpServletRequest request, HttpServletResponse response) {
    String foo = (String) request.getSession().getAttribute("foo");
    ejbService.doSomething(foo);
}

So -  pass the values you need as parameters to methods, through the chain layers of your application.

