Introduction to J2EE
Background
2
J2EE Origin
Sun Microsystems, designed J2EE to define a multi-tier architecture for developing web products to answer the needs from the industry.
Goals:
3
J2EE
Is a platform that provides a set of components which enable programmer to Develop, Deploy, and Run Java based web application.
4
J2EE Components
Components
A web component is a software entity that runs in a J2EE environment to provide responses to external requests.
Web components - Servlets and JSP pages
Enterprise Components – EJB.
J2EE Containers
J2EE Containers
Web App. Layers :
9
Packaging Applications and Components
Deployment Descriptors
Working with HTML
12
What is HTML?
HTML Tags :
14
HTML Document Structure
<html>
<head>
<title> Page Title Goes Here </title>
</head>
<body>
content goes here
</body>
</html>
Background
bgcolor
Specifies a background-color for a HTML page.
<body bgcolor="#000000">
<body bgcolor="black">
background
Specifies a background-image for a HTML page
<body background="logo.gif">
<body background="http://www.hpesindia.com/logo.gif">
Text
Output:-
Today is my first day at my new job, I’m so excited!
Output:-
Hello
Output:-
Hello
HTML Tags
Effect | Code | Code Used | What It Does |
Bold | B | <B>Bold</B> | Bold |
Italic | I | <I>Italic</I> | Italic |
Font
Tag attribute
Commonly Used Character Entities
Result | Description | Entity Name |
| Non-breaking space | |
< | Less than | < |
> | Greater than | > |
& | Ampersand | & |
“ | Quotation mark | " |
© | Copyright | © |
Headings
<H1>This is Heading 1</H1>
<H2>This is Heading 2</H2>
<H3>This is Heading 3</H3>
<H4>This is Heading 4</H4>
<H5>This is Heading 5</H5>
<H6>This is Heading 6</H6>
List
<ul>
<li>Coffee</li> <li>Milk</li>
</ul>
Output:-
<ol>
<li>Coffee</li> <li>Milk</li>
</ol>
Output:-
Table
<table border=“1">
<tr>
<th>Heading</th>
<th>Another Heading</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td></td>
</tr>
</table>
Heading | Another Heading |
Row 1, cell 1 | Row 1, cell 2 |
Row 2, cell 1 | |
Create Links
< a href="http://www.google.com">Google Home</a>
Output:-
Google Home
Image Formats
Inserting Image
Output:-
<a href="http://www.hpesindia.com">
<img src="image.gif">
</a>
Output:-
Image Size
Width
Height
Forms
Text Input Fields
<form>
First name: <input type="text" name="firstname">
<br>
Last name: <input type="text" name="lastname">
</form>
First name:
Last name:
Submission Button
<form name="input" action="html_form_action.jsp" method="get">
Username: <input type="text" name="user">
<br>
<input type="submit" value="Submit">
</form>
Output:-
Username:
Checkboxes
<form>
<input type="checkbox" name="bike" value="bike">
I have a bike
<br>
<input type="checkbox" name="car" value="car">
I have a car
</form>
Output:-
I have a bike
I have a car
Radio Buttons
<form>
<input type="radio" name=“gender" value=“Male"> Male
<br>
<input type="radio" name=“gender” value=“Female"> Female </form>
Output:-
Male
Female
Text Box
<form>
<p>Please provide your suggestion in the text box below:</p>
<textarea row="10" cols="30">
</textarea>
</form>
Output:-
Please provide your suggestion in the text box below:
Pull-down Menu
<p>Select a fruit:</p> <select name"Fruit">�<option selected> Apples�<option> Bananas�< option > Oranges�</select>
Output:-
Select a fruit: