CORBA enables the enterprise to use existing software by providing features that developers can use to wrap existing software as CORBA objects. With CORBA, applications written in several languages can happily coexist and communicate with each other. A great deal of Enterprise JavaBeans was derived from CORBA. Indeed, a cursory look at EJB could lead one to think that EJB is a slimmed-down, Java-centric version of CORBA. EJB and CORBA can be used together, specifically when an enterprise bean needs access to code written in another language, or code written in another language needs access to an enterprise bean. Because CORBA is the brainchild of numerous companies, no single company controls CORBA. A committee (the Object Management Group, or OMG) must agree upon changes made to the CORBA specification, which has both positive and negative consequences. On the plus side, you are fairly assured that you are not tied to a single vendor, product, or architecture when using a CORBA implementation. On the minus side, you may have to wait years for the OMG to make decisions on CORBA-related issues. The OMG Interface Definition Language (IDL) defines the interface to objects in the CORBA universe. Although IDL is a language, you, the application programmer, do not necessarily execute IDL code. Rather, you write IDL code and use a code generator to transform IDL into a specific programming language. Java programmers use an IDL-to-Java translator to generate a representation of their IDL as Java. If you re curious, you can take a look at how IDL translates to Java by examining ftp://www.omg.org/pub/docs/format.98-02-29.pdf. JavaServer Pages You ve already read some of the skinny on JavaServer Pages (JSP). Some call JSP the front door to enterprise applications, and with good reason. JSPs enable the enterprise application developer to separate presentation code from business logic code on the server, thereby providing the application with a robust presentation layer. Java Servlets As with JSP, servlets enable developers to dynamically create Web content as well as provide additional functionality to a Web server. If a JSP gets translated into a servlet, why are JSPs important in the J2EE arena? JSP pages are easier to code and maintain than servlets because servlets require the Java programmer to explicitly write out HTML statements to a response object, whereas the Web page developer using JSP merely codes HTML. cross-reference Please refer to Chapter 3, A First Look at JavaServer Pages and Chapter 8, JSP Pages and Servlets Revisited, for more detailed discussions of servlets and their relationship to JSP pages. For example, assuming you is the current Web page viewer below, the following code is a JSP that generates an HTML page that displays the string Yes, it s concatenated with the current user. Listing 2-1: Your first JSP page
<%@ page language="java" %>Yes, it s, <% String you = (String) session.getAttribute( you ); out.println(you); %>
Our company is website hosting provider which offers web hosting services for php, java, mysql, frontpage, dreamweaver and domain name registration. Check more about us on website hosting provider part.