EJBs are used from JSPs the same way they are used anywhere else. The process is pretty simple:
Get an InitialContext.Lookup the EJBHome.Use the EJBHome to create, find, or remove EJB instances. A quick example looks like:
The above example assumes that the client also resides within the same Container and that the EJB is a local Stateless Session Bean.
Now, you could drop this code directly into your JSP but that would be poor design. Remember, we would like to keep as much code out of the JSP as possible. In this case it would be more desirable to create a
Business Delegate to call from the JSP and possibly even a custom tag.