Sie sind auf Seite 1von 11

J2EE Inroduction

J2EE - Java Enterprise Edition

- Useful for web application
- what is web?
- what is Internet?
- N/ws of N/ws of devices.
- Devices: mobiles, computers,
servers,vehicles, HAS(home automation system),Tv, fridge etc....
- N/ws -each of these device in the N/w communicate with each to xchange data
for this to happen each device need to be identified uniquely called IP address.
- IPaddress means it is a set of digits represented as decimal but actually it is
- No body owns Internet but internet is governed by ISP(Internet service provider)
like W3C.
- IPaddress is unique and geocoded i.e. device from where exactly it is operating.
- Types of IPaddress
> static: every time device connected to internet
IPaddress remains same.
> dynamic: every time device connected to
internet IPaddress changes.
- TCP/IP protocol:
- TCP/IP protocol is used to move data around net.
- If deviceA sends data to deviceB as there is no direct conection first data is send
to dev3 if dev3 shutdown than dev3 will not fwd data.

- TCP/IP makes small pkts and send all these pkts across dev. Each pkt has to and
from address. If some of the pkts not reached destination than devB inform that only this much
pkt reached some more pkts yet to reach and send remaining pkts.

- Internet originally created called Arpanet. It is created by defence which is

difficult for common man to use. So to make it human readable web was introduced
- web
> Not Internet- provides infrastructure to run
> services like email, FTP, voice, video
- They came up with:
>It is a end user application.
>It is a protocol used to send request and get response for the requested
>It is a S/w running on server side.
>for user request it sends response.
>uses static IPaddress as many users sending req for same server.

>it is a collection of resrc associated with MIME type(.txt, .html, .jpg) and
r centrally connected to homepage.
>Hyper text markup language
>This gives structured data to user.
-URL:universal resrc locator
>Unique identifier for each resrc
>url looks like:
-Domain names:
>To remember all URL it difficult, so to make easy for user domain names are

>Text based
>given uniquely per website

>S/w run on server
>static WS:>resrc that already exit
>can host only website
>dynamic WS:>resrc created newly when req is
>host both website and webapp
>webapp is set of pgms of different
MIME type.
>Dynamic WS is pgm lang specific
>so have java enabled WS
php ..


.Net ..


phython .. ..
HTML basics:

>HTML is a language for describing web pages.

> HTML stands for Hyper Text Markup Language
> HTML is a markup language
>A markup language is a set of markup tags
> The tags describe document content
>HTML documents contain HTML tags and plain text
>HTML documents are also called web pages

HTML Element Syntax:

>An HTML element starts with a start tag / opening tag

>An HTML element ends with an end tag / closing tag
>The element content is everything between the start and

the end tag

>Some HTML elements have empty content

>Empty elements are closed in the start tag
>Most HTML elements can have attributes

HTML Attributes:

>HTML elements can have attributes

>Attributes provide additional information about an
>Attributes are always specified in the start tag
>Attributes come in name/value pairs like: name="value"


<HTML> </HTML>:Indicates the beginning and end of an HTML

<HEAD> </HEAD>:Indicates the beginning and end of a
section of the document used for the title and
document header information.
<TITLE> </TITLE>:Indicates the beginning and end of the title;
displayed on the title bar of the

the title

<BODY> </BODY>:Indicates the beginning and end of the Web page


<h1></h1>..<h6></h6>:Indicates begining and end of Heading.

<p></p>:Indicates begining and end of paragraph.


<h1>My First Heading</h1>

<p>My first paragraph.</p>


<b> <i> :formating tags gives formatted output likes bold and
</br>: break tag

italic text.

HTML Hyperlinks:

>The HTML tag <a> defines a hyperlink.

>A hyperlink (or link) is a word, group of words, or image

to another document.

that you can click on to jump

>The most important attribute of the element is the href

link's destination.

attribute, which indicates the

>Syntax: <a href="url">Link text</a>

>The href attribute specifies the destination of a link.

>Example:<a href="">Visit
which will display like this: Visit W3Schools

Clicking on this hyperlink will send the user to

W3Schools' homepage.

HTML Images:

>In HTML, images are defined with the <img> tag.

>To display an image on a page, you need to use the src

attribute. Src stands for
"source". The value of the src
attribute is the URL of the image you want to display.


<img src="url">

HTML Tables:

>Tables are defined with the <table> tag.

>A table is divided into rows with the <tr> tag. (tr

stands for table row)

>A row is divided into data cells with the <td> tag. (td

stands for table data)like data

>A row can also be divided into headings with the <th>

tag. (th stands for table

>A border can be added using the border attribute:

><table border="1" style="width:300px">


HTML Unordered Lists
>An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
>The list items are marked with bullets (typically small black circles).
How the HTML code above looks in a browser:
. Coffee
. Milk
HTML Ordered Lists
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
The list items are marked with numbers.
How the HTML code above looks in a browser:

HTML Forms:
>HTML forms are used to pass data to a server.
>An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit
buttons and more.
>The <form> tag is used to create an HTML form:

input elements
>HTML Forms - The Input Element
>The most important form element is the <input> element.
>The <input> element is used to select user information.
>An <input> element can vary in many ways, depending on the type attribute. An <input>
element can be of type text field, checkbox, password, radio button, submit button, and more.
>The most common input types are described below.

-->Text Fields

<input type="text"> defines a one-line input field that a user can enter text into:
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">

How the HTML code above looks in a browser:

First name:
Last name:

Note: The form itself is not visible. Also note that the default width of a text field is 20

-->Password Field

<input type="password"> defines a password field:

Password: <input type="password" name="pwd">

How the HTML code above looks in a browser:


Note: The characters in a password field are masked (shown as asterisks or circles).

-->Radio Buttons

defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of

<input type="radio" name="sex" value="male">Male<br>
<input type="radio" name="sex" value="female">Female

How the HTML code above looks in a browser:



<input type="checkbox"> defines a checkbox. Checkboxes let a user select ZERO or MORE
options of a limited number of choices.

<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>

<input type="checkbox" name="vehicle" value="Car">I have a car

How the HTML code above looks in a browser:

I have a bike
I have a car

-->Submit Button

<input type="submit"> defines a submit button.

>A submit button is used to send form data to a server.

> The data is sent to the page specified in the form's action attribute

<form name="input" action="demo_form_action.asp" method="get">

Username: <input type="text" name="user">
<input type="submit" value="Submit">

How the HTML code above looks in a browser:


If you type some characters in the text field above, and click the "Submit" button, the browser
will send your input to a page called "demo_form_action.asp". The page will show you the
received input.