Вы находитесь на странице: 1из 11

J2EE Inroduction

J2EE - Java Enterprise Edition


- Useful for web application
- what is web?
- what is Internet?
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
binary.
ex: 127.0.0.1
- 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
service.
> services like email, FTP, voice, video
conference.
- They came up with:
>Browser
>HTTP
>webserver
>website
>HTML
-Browser:
>It is a end user application.
-HTTP:
>It is a protocol used to send request and get response for the requested
resrc.
-wbserver:
>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.
-website:

>it is a collection of resrc associated with MIME type(.txt, .html, .jpg) and
r centrally connected to homepage.
-HTML:
>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
created.

>Text based
>given uniquely per website

>
-webServer:
>S/w run on server
>types:
>static WS:>resrc that already exit
>can host only website
>dynamic WS:>resrc created newly when req is
made
>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"

element

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


document.
<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
browser.

other
the title

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

body.

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

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

<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

<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="http://www.w3schools.com/">Visit
W3Schools</a>
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.

>Syntax:

<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
container.

stands for table data)like data

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

tag. (th stands for table

>A border can be added using the border attribute:

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


<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>

HTML LIST:
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).
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
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.
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
How the HTML code above looks in a browser:
1.Coffee
2.Milk

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:
>Syntax:

<form>
input elements
</form>
>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:
<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>

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
characters.

-->Password Field

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

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

How the HTML code above looks in a browser:


Password:

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
choices:

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

How the HTML code above looks in a browser:


Male
Female

-->Checkboxes

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

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


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

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">
</form>

How the HTML code above looks in a browser:


Username:

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.

Вам также может понравиться