Advertisement
xdxdxd123

Untitled

Jul 30th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.73 KB | None | 0 0
  1. Introduction to J2EE Web-based Applications.
  2.  
  3. Java Enterprise Server Applications (J2EE) can dynamically interact with users through an HTML and browser interface using a Java Application Server like WebSphere Application Server (WAS) or Apache Tomcat. HTTP web servers are designed to provide static web content, but may also be support web applications. An application server is an enhancement of the traditional HTTP server which provides greater capacity and resources, multithreaded architectures (multiple executing instances can share the same copy of the program), better transaction supports and database connectivity, memory isolation, management and security. [Microsoft IIS is an application server for ASP.NET, and embedded VB.NET and C#.NET.] An enterprise application exposes business logic applications to the HTTP protocol.
  4.  
  5. As one can determine from the following graphic, an application server frequently contains an embedded HTTP web server that may be used to deliver static web pages. As stated previously the HTTP server may accept data and application requests from the user's browser at 1.8 million web sites. On the other hand, Web Services (SOAP or RESTFUL) provides and application to application interface using XML without user interaction. An application is identified by an IP address, port number and application identifier.
  6.  
  7. Consider the following example. A customer contacts their broker's web site using their browser. Java Server Page, Java Server Face, Java Servlets and Enterprise Java Beans interact with the customer to select stocks. The customer decides to submit a purchase for 100 shares of IBM stock which is sold on the New York Stock Exchange (NYSE). This submission will start a chain of transactions between five to ten organizations and applications to process the stock purchase, i.e., web service application to web server application, not user to application. Does the customer what to interact with all of these different organizations and applications? No! Notice the Browser input and the Web Service inputs.
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. Types of Java Enterprise Applications Description
  16. Java Server Pages (JSP) Technology for developing web pages that support dynamic content which helps developers insert java code in HTML pages by making use of special JSP tags, most of which start with <% and end with %>.
  17.  
  18. A Java Server Page component is a type of Java Servlet. It is easier to code HTML tags in a JSP than a servlet, but they are less dynamic.
  19.  
  20. JSP is much easier to code than servlets.
  21.  
  22. While JSP has limited application powers, it is not recommend to be used for complicated applications. JSP can call invoke a servlet to take advantages of the servlet processing powers.
  23. Java Servlets Java Servlets are programs that run on a Web or Application server and act as a middle layer between a request coming from a Web browser or other HTTP client and databases or applications on the HTTP server.
  24.  
  25. Either JSP or Java Servlets can be used to dynamically create HTML pages. While JSP pages may be used to collect the HTML/HTTP present and collect data, servlets are more dynamic.
  26.  
  27.  
  28. Enterprise Java Beans (EJB) EJB provides an architecture to develop and deploy component based enterprise applications considering robustness, high scalability and high performance. EJBs are designed to support business transactions and messaging data and do not support a user interface.
  29.  
  30. The program logic is a common to a particular application class, but the data to be processed by application is unique to each application. Hence, the program logic is shared, but the data is not shared.
  31.  
  32. Session beans store non-persistent data in memory during processing; Entity beans can store persistent data in files and databases; Message beans pass data between applications.
  33.  
  34. Java Server Faces (JSF) JavaServer Faces (JSF) is a Model-View-Control (MVC) web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.
  35.  
  36. JSF reduces the effort in creating and maintaining applications which will run on a Java application server and will render application UI on to a target client as compare to JSPs of Servlets
  37. Java Connectors Enables JSP, JSF, Servlets and EJBs to interact with Enterprise Information Systems, e.g., data files and data sets, Oracle, MySql and DB2 DBMSs; etc.
  38.  
  39. Sample JSP code (hello.jsp)
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. Sample Servlet code (hello.java)
  48.  
  49.  
  50.  
  51.  
  52.  
  53. After a servlet has been compiled is must be deployed and configured on the application server. Classes are stored in the /webapps/ROOT/WEB-INF/classes subdirectories and the application server web.xml file must be inventory information about the servlet.
  54.  
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement