Skip to main content

Posts

Showing posts from June, 2019

Servlet and JSP

Dynamic websites using Java Framework  Earlier most of the dynamic websites were created using java framework like Servlet JSP But these methods of creating dynamic websites are quite outdated now. Servlet It is a java framework used to create dynamic websites. There could be many servlets handling different aspects of the websites. All these servlets are hosted on a servlet container. JSP - Java Server Page It is a java framework used to create dynamic websites. It is similar to servlet but there exists some differences like Servlet has html code into java code whereas JSP has java code into html

Websites

Websites A website is a collection of web pages which in turn is a document with .html extension contains html content or codes. Types of websites :- Static A static website is one where content is fixed and same content is visible to all the users. Dynamic A dynamic website is one where content changes in real-time.

Web - Client architecture

Web - Client architecture It works in following ways :- Whenever  a User types an URL in browser A request is sent to the DNS server IP address is mapped to the Domain name Request is then sent to actual server of the website This server process the client's request and generates a response Responee is then sent from server to the client

HTTP-Hyper Text Transfer Protocol

HTTP It is a protocol used for communication between client and server for exchanging data over network. Working :- Client sends a request to Server Server process the Client's request Server responses to Client's request by sending a reply HTTP Request-methods There are different ways in which a client can send request to a server called request methods. Request-methods are :- GET       - retrieve an existing file  PUT        - upload file POST      - request to create a new file DELETE  - remove an existing file

CSS - Shadow Effect

CSS - Shadow Effect <html> <head>           <style>                   .abc                {                   color:red;                   font-size:25px;                    text-shadow:1px -1px 0 #767676;                }         </style> </head> <body>           <div class="abc">              Shadow Effect           </div> </body> </html> output:

CSS - Cascading Style Sheet

CSS- Cascading Style Sheet CSS is a set of rules (or formatting properties) that applies to a specific element in the web-page. It is mainly used for formatting or designing the web-page contents. CSS can be included in three different ways :- Inline  Embedded under HEAD tag External Style-sheet example: 1. INLINE <html> <head> </head> <body>           <div class="abc">               <p style="color:red;"> Hello World </p>           </div> </body> </html> output: 2. Embedded under HEAD tag <html> <head>           <style>               .abc              {                 color:green;       ...

Grouping in HTML - DIV & SPAN

Grouping in HTML Sometimes there is need to group certain elements of a html document together into a logical block or segment. Generally used for CSS designing. For grouping html elements we generally uses <div> and <span> tags both the tags are used for grouping but they varies from each other as <div> creates a logical block whereas <span> is used for inline reference to a certain content in the document. <DIV> It can be referenced using class or id attributes. ex:  <div class="abc">                     <p> ..... </p>        </div>                Referencing :        .abc          {              ----------          }

Meta - tag

<meta> The meta tag or metadata tag is a self-closing tag which provides data about data. It provides information to browser about the web-page like language of the page author of the page last modified time, etc Important attributes :- charset content name http-equiv ex : <meta name="author" content="avas27">

Structure of a HTML document

Structure of HTML document <! DOCTYPE html> <html> <head>            <title>            </title>            <meta>            <style>            </style>            <script>            </script> </head> <body>              <div>                        <p> HELLO THERE  ! </p>              </div>  </body> </html>

DOCTYPE html

<! DOCTYPE html> It is a declaration that instructs browser about what version of HTML is used in creating the web-page. Though it is not mandatory to write it in the html document but it is a good practice to include it. suppose we have not specified html version then the browser will itself assume a version, now it may happen that we have created a web-page using html-5 and someone is accessing it using an older browser which works on html-4 then some of our tags will not be rendered leading to some errors.

HTML - Hyper Text Markup Language

HTML It is a markup language means it can distinguish between its elements and content. It instructs the browser how to display web-page content. HTML Tags these are the keywords in HTML which defines how browser will format and display the programmer's content on the web-page. It is of two types :- 1.One which requires closing tag     ex: <p> content </p>           <body> content <body> 2.One which doesn't requires a closing tag     ex: <img>           <meta>,etc HTML elements  it is the combination of                                <opening tag> content </closing tag> It is of two types :- 1.Inline    ex: <img src="abc/xyz.jpg"> 2.Block    ex: <p>hello there</p>