What is a J2EE component? List out all the component?

Answer Posted / rani

J2EE Application Components

J2EE applications are made up of components. A J2EE
component is a self-contained functional software unit that
is assembled into a J2EE application with its related
classes and files and communicates with other components.
The J2EE specification defines the following J2EE components:

* Application clients and applets are client components.
* Java Servlet and JavaServer Pages (JSP) technology
components are web components.
* Enterprise JavaBeans (EJB) components (enterprise
beans) are business components.

J2EE components are written in the Java programming language
and compiled in the same way as any Java programming
language program. The difference when you work with the J2EE
platform, is J2EE components are assembled into a J2EE
application, verified that they are well-formed and in
compliance with the J2EE specification, and deployed to
production where they are run and managed by the J2EE server.
Client Components

A J2EE application can be web-based or non-web-based. An
application client executes on the client machine for a
non-web-based J2EE application, and a web browser downloads
web pages and applets to the client machine for a web-based
J2EE application.
Application Clients

An application client runs on a client machine and provides
a way for users to handle tasks such as J2EE system or
application administration. It typically has a graphical
user interface created from Project Swing or Abstract Window
Toolkit (AWT) APIs, but a command-line interface is
certainly possible.

Application clients directly access enterprise beans running
in the business tier. However, if the J2EE application
client requirements warrant it, an application client can
open an HTTP connection to establish communication with a
servlet running in the web tier.
Web Browsers

The user's web browser downloads static or dynamic Hypertext
Markup Language (HTML), Wireless Markup Language (WML), or
Extensible Markup Language (XML) web pages from the web
tier. Dynamic web pages are generated by servlets or JSP
pages running in the web tier.

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the scope or life time of class variables or static variables?

506


What are keyboard events?

602


Is java same as core java?

578


Write a program to calculate factorial in java?

575


What if I write static public void instead of public static void in java?

569






Are true and false keywords?

558


What is stack class in java?

534


What will be the output of round(3.7) and ceil(3.7)?

666


What is string syntax?

542


Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2)

1819


Why do people says “java is robust”?

544


What are different types of references?

520


Differentiate between array list and vector in java.

626


What is the difference between stringbuffer and stringbuilder?

572


What is a method type?

524