Pages

Showing posts with label servlet. Show all posts
Showing posts with label servlet. Show all posts

Thursday, February 10, 2011

J2EE Overview

Yes, there are so many other sites out there that provide J2EE Overviews but this is probably the most breif but yet complete one you'll find.

J2EE defines standards for developing multitier enterprise applications. It simplifies enterprise applications by basing them on standardised, modular components, and providing a set of services to those components. It handles many details of application behaviour automatically, without requiring complex programming.

Enterprise JavaBeans
EJB is a standard distributed object framework and component model. It defines several types of components: session beans, entity beans, message driven beans, which simplify application development by concealing application complexity and enabling the component designer to focus on business logic.

Servlets and JSPs
Servlets and Java Server Pages are complementary APIs, both providing a means for generating dynamic web content. Servlets are Java programs implementing the javax.servlet.Servlet interface and running in a Web/App server's servlet engine. JSPs contain a mixture of HTML and java scripts, JSP elements, and directives, and are compiled into Servlets by the JSP engine.

JDBC
JDBC is a set of interfaces allowing Java applications to access any database.

RMI
RMI is an API which allows Java objects to communicate remotely with other objects. Its equivalent from OMG is CORBA.

IDL
IDL is a standard platform-independent language used to define interfaces that object implemnetation provide and client objects call. It allows java objects to communicate with other objects in any language.

JMS
JMS API is a messaging standard that allows J2EE components to create, send, receive, and read messages. It enables distributed communication between components. The addition of the JMS API enhances the J2EE platform by simplifying enterprise development, allowing loosely coupled, reliable, asynchronous interactions among J2EE components and legacy systems capable of messaging.

JTA
JTA allows J2EE components to perform distributed transactions.

JavaMail
JavaMail API allows Java components to send and receive emails.

JAXP (includes JAXB which is sometimes mentioned separately?)
Java API for XML Processing allows java applications to parse and transform XML documents.

JNDI
Java Naming and Directory Interface is a protocol which provides a standard API to access naming and directory services. It allows Java applications to find any necessary resource in a standard way.


Why use J2EE?
  • It is a standardised and reliable software architecture
  • that gives a lot of flexibility
  • is well documented,
  • with low level services already implemented.

Monday, July 12, 2010

JSP Overview

JSP is a popular Java technology for web application development and is based on servlet technology. A JSP page is a text document that contains two types of text - static data which can be expressed in any text-based format (HTML, SVG, XML, etc) and JSP elements (standard JSP or XML) which construct dynamic content.

A JSP page services requests as a servlet. In an application server, the source for the servlet created from a JSP named myPage is myPage_jsp.java. Once the JSP has been translated and compiled, the page's servlet follows the standard servlet lifecycle.

Expressions that are evaluated immediately use the ${ } syntax. Expressions that are differed use the #{ } syntax. Immediate evaluation expressions are always read-only value expressions.

Implicit objects include:
  • PageContext
  • Servlet Context
  • Session
  • Request
  • Response
  • etc.
JSP technology directly supports JavaBeans components with standard JSP language elements:
  • The JSP:useBean element declares that the page will use a bean that is stored within and is accessible from the specified scope (application, session, request, or page)
  • jsp:setProperty
  • jsp:getProperty
Custom tags are user-defined JSP language elements that encapsulate recurring tasks. A tag handler is an object that implements a custom tag. When a JSP page containing a custom tag is translated into a servlet, the tag is converted into operations on a tag handler. The web container then invokes those operations when the JSP page's servlet is executed.

To declare that a JSP page will use tags defined in a tag library, include the taglib directive.

An Applet or JavaBeans component can be included in a JSP by using the jsp:plugin element.
 
Powered by Blogger