Best J2EE Training In Chennai Adyar With Placement

What is Java EE or J2EE

Java Enterprise Edition is a standard for developing applications based on enterprise softwares. Java Platform, Enterprise Edition or Java EE Training is an enterprise computing platform on Java from Oracle. Nowadays Java EE comes up with rich enterprise software platform and provides lot of implementations.There is lot of JSR (Java Specification Requests) that’s been submitted.

This site has different sections that will help aspirants in the Java enterprise world. The above diagram shows a sample request response flow in a Java EE world.

What is JSF (Java Server Faces)

Java Server Faces technology is a server side framework for building user interfaces for web applications. JSF framework as a toolbox that is full of ready to use components where you can quickly and easily add and reuse these components many times in a page and capture events generated by actions on these components. So JSF applications are event driven.

JSF includes mainly:

Set of APIs to represent and manage state of components that helps server side validation, event handling, page navigation, data conversion etc.

JSP custom tag library to create UI components in a view page.

The UI (user interface) created using JSF technology runs on server and output is shown to the client. Goal of JSFis to create web applications faster and easier. Developer can focus on UI components, events handling, backing beans and their interactions rather than request, response and markup. JSF hides complexities to enable developers to focus on their own specific work

JSF Components

A JSF application primarily contains two types of components — both are easy to use and conforming to the POJO philosophy.

A JSF page is composed of XML tags. Each tag element corresponds to a UI component in JSF. As a web developer, you do not need to deal with the HTML markup or JavaScript details, as they are all generated from the JSF component tags. Since each UI component is self-contained and has well-defined behavior (i.e., it understand how to render itself and how to handle its data), JSF provides a very POJO-like experience for developing web UI.

Dynamic data on JSF pages and forms are modeled in POJOs known as JSF backing beans. The backing bean lifecycle is managed by the JSF server. For instance, a backing bean can have a session scope to track a user session. A backing bean can be dependency injected into another bean via an XML configuration file, and it can be injected into a JSF UI component via the JSF Expression Language (EL). The backing bean also provides the integration points between the web UI and the EJB3 business components.

JSF Expression Language

What Is the Expression Language?

The expression language provides a way to simplify expressions in JSP. It is a simple language used for accessing implicit objects and Java classes, and for manipulating collections in an elegant manner. EL provides the ability to use run-time expressions outside of JSP scripting elements

<h:inputText id=”name” value<strong>=”#{student.name</strong>}”>

Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page. These objects may be accessed as bUilt-in variables via scripting elements and can also be accessed programmatically by JavaBeans and Servlets.

  • pageContext — jsp:pageContext — Provides access to all the namespaces associated with a JSP page and access to several page attributes
  • Request — http.HttpServletRequestData — included with the HTTP Request
  • Response — http.HttpServletResponse — HTTP Response data, e.g. cookies
  • Session http.HttpSession — User specific session data

JSF Executable Files (jars)

The JSF component model also allows third party vendors to develop and sell reusable UI component libraries. Those component libraries make it easy for server-side developers to take advantage of the latest browser technology without the need to mess with JavaScripts and such. JSF provides standard, reusable components for creating user interfaces for web applications.

JSF jar files are:

  • commons-beanutils.jar: Utilities for defining and accessing JavaBeans component properties
  • commons-collections.jar: Extensions of the J2SE Collections Framework
  • commons-digester.jar: For processing XML documents
  • commons-logging.jar: A general purpose, flexible logging facility to allow developers to instrument their code with logging statements
  • jsf-api.jar: Contains the javax.faces.* API classes
  • jsf-impl.jar: Contains the implementation classes of the JSF Reference Implementation
  • Odc-jsf.jar : Contains the Java widget library of the JSF implementation like graph.

JSF Components

A JSF application is just like any other Java technology-based web application; it runs in a Java servlet container, and contains:

  • JavaBeans components (or model objects) containing application-specific functionality and data
  • Event listeners
  • JSP pages
  • Server-side helper classes
  • A custom tag library for rendering UI components
  • A custom tag library for representing event handlers and validators
  • UI components represented as stateful objects on the server
  • Validators, event handlers, and navigation handlers. (Validators are used to validate data on individual components before the server-side data is updated.)
  • Application configuration resource file for configuring application resources

New to Java

First thing’s first, you need what is called a Java Systems Development Kit (SDK). You can find many different SDK’s on the net, but the one that you should use is any of the SDK’s from Oracle site .

After you’ve installed the program, you have two options, go to www.cnet.com > Developer Tools > Tools and Editors and download TextPad to easily create your programs without anything more to do. Here, you can create, save, and compile all of your programs without configuring your computer.

You can also take the hard way and find and open your MS-DOS prompt to set the program to your computer. You should be able to find it by clicking “Start”, then go to “Programs”, and finally scroll down until you find “MS-DOS Prompt”, or click “Start”, then go to “Accessories” and scroll down until you find “MS-DOS Prompt”. You can also click “Start”, then click “Run”, then type “command” in the search box. Then type path = c:\sdk1.4.2\bin to let your computer know that this is where you are going to be working from. If your DOS has anything more than C:\> (like: C:\WINDOWS\DESKTOP\>), type cd.. to change the directory to your root directory (C:\>).

This is what you need to do EVERYTIME you want to work with Java (NOTE: If you have a text editor that allows you to compile Java, you may omit this step). If you have a special folder that you want to save your work in (i.e. a folder called Java), you need to type cd Java to compile and run your programs. Otherwise, you’ll receive the error message can’t find program “” 1 error.

Now that the hard part is out of the way, let’s start working. Open up Notepad (or your text editor) and type the text you see below:

public class First

{

public static void main(String[] args)

{

System.out.println(“This is my first Java Program!!!”);

}

}

Now, go click File, click Save as, type “First.java” (or just First if you’re using TextPad) in the File name: box, and make sure it says Text Documents (or *.java in TextPad) in the Save as type: box. Also, make sure you are saving it to the right place (or folder). Here’s the moment you’ve been waiting for: switch to your DOS prompt and type javac First.java (or go to Tools > Compile Java in TextPad). If just your prompt comes up, it compiled. If not, and you get an error message, check to see if you did everything correctly. Then, type java First (Tools > Run Java Application in TextPad). You should get the message: This is my first Java Program!!!