Can I call an EJB directly from JSP Using Suns J2EE Server?
posted 15 years ago
With Weblogic, I can access an EJB directly from a "standalone" JSP page. But with the J2ee Server I downloaded from Sun, I did not see any examples showing this. The examples show the JSP being added to the application .ear file and using a java bean to access the EJB. This seems like a lot of extra work. Is this the only way it will work?
From personal experience, I can tell you that JSPs accessing EJBs directly can be pretty ugly. Since JSP's don't (yet) have an equivalent mechanism to the <useBean> JavaBean tag you can end up embedding a lot of Java code in the JSP. Much cleaner to move the code into a code module (model controller) and leave the JSP to handle the view.
An IDE is no substitute for an Intelligent Developer.