• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can I call an EJB directly from JSP Using Suns J2EE Server?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic