Web Technology Lab

 WEB TECHNOLOGIES LAB

OBJECTIVES:

• To acquire knowledge of XHTML, Java Script and XML to develop web applications

• Ability to develop dynamic web content using Java Servlets and JSP

• To understand JDBC connections and Java Mail API

• To understand the design and development process of a complete web application

1. Design the following static web pages required for an online book store web site.

1) HOME PAGE:

The static home page must contain three frames.

Top frame: Logo and the college name and links to Home page, Login page, Registration page,

Catalogue page and Cart page (the description of these pages will be given below).

Left frame: At least four links for navigation, which will display the catalogue of respective

links.

For e.g.: When you click the link “MCA” the catalogue for MCABooks should be displayed in

the Right frame.

Right frame: The pages to the links in the left frame must be loaded here. Initially this page

contains description of the web site.

2)login page

3) CATOLOGUE PAGE:

The catalogue page should contain the details of all the books available in the web site in a table.

The details should contain the following:

1. Snap shot of Cover Page.

2. Author Name.

3. Publisher.

4. Price.

5. Add to cart button.

4. REGISTRATION PAGE:

Create a “registration form “with the following fields

1) Name (Text field)

2) Password (password field)

3) E-mail id (text field)

4) Phone number (text field)

5) Sex (radio button)

6) Date of birth (3 select boxes)

7) Languages known (check boxes – English, Telugu, Hindi, Tamil)

8) Address (text area)

5. Design a web page using CSS (Cascading Style Sheets) which includes the following:

1) Use different font, styles:

In the style definition you define how each selector should work (font, color etc.).

Then, in the body of your pages, you refer to these selectors to activate the styles

6. Write an XML file which will display the Book information which includes the following:

1) Title of the book

2) Author Name

3) ISBN number

4) Publisher name

5) Edition

6) Price

Write a Document Type Definition (DTD) to validate the above XML file.

7. Write Ruby program reads a number and calculates the factorial value of it and prints the

Same.

8. Write a Ruby program which counts number of lines in a text files using its regular

Expressions facility.

9.Write a Ruby program that uses iterator to find out the length of a string.

10. Write simple Ruby programs that uses arrays in Ruby.

11. Write programs which uses associative arrays concept of Ruby.

12. Write Ruby program which uses Math module to find area of a triangle.

13. Write Ruby program which uses tk module to display a window

14. Define complex class in Ruby and do write methods to carry operations on complex objects.

15. Write a program which illustrates the use of associative arrays in perl.

16.Write perl program takes set names along the command line and prints whether they are

regular files or special files

17. Write a perl program to implement UNIX `passed' program

18. An example perl program to connect to a MySQl database table and executing simple

commands.

19. Example PHP program for cotactus page.

20. User Authentication:

Assume four users user1, user2, user3 and user4 having the passwords pwd1, pwd2, pwd3 and

pwd4 respectively. Write a PHP for doing the following.

1. Create a Cookie and add these four user id’s and passwords to this Cookie.

2. Read the user id and passwords entered in the Login form (week1) and authenticate with the

values (user id and passwords) available in the cookies.

If he is a valid user (i.e., user-name and password match) you should welcome him by name

(user-name) else you should display “You are not an authenticated user ’’.

Use init-parameters to do this.

21. Example PHP program for registering users of a website and login.

22. Install a database(Mysql or Oracle).

Create a table which should contain at least the following fields: name, password, email-id,

phone number(these should hold the data from the registration form).

Write a PHP program to connect to that database and extract data from the tables and display

them. Experiment with various SQL queries.

Insert the details of the users who register with the web site, whenever a new user clicks the

submit button in the registration page (week2).

23. Write a PHP which does the following job:

Insert the details of the 3 or 4 users who register with the web site (week9) by using registration

form. Authenticate the user when he submits the login form using the user name and password

from the database ( similar to week8 instead of cookies).

24.Create tables in the database which contain the details of items (books in our case like Book

name , Price, Quantity, Amount ) of each category. Modify your catalogue page (week 2)in such

a way that you should connect to the database and extract data from the tables and display them

in the catalogue page using PHP

25.HTTP is a stateless protocol. Session is required to maintain the state.

The user may add some items to cart from the catalog page. He can check the cart page for the

selected items. He may visit the catalogue again and select some more items. Here our interest is

the selected items should be added to the old cart rather than a new cart. Multiple users can do

the same thing at a time(i.e., from different systems in the LAN using the ip-address instead of

local host). This can be achieved through the use of sessions. Every user will have his own

session which will be created after his successful login to the website. When the user logs out his

session should get invalidated (by using the method session. Invalidate ().

Modify your catalogue and cart PHP pages to achieve the above mentioned functionality using

sessions.

OUTCOMES:

• Students will be able to develop static web sites using XHTML and Java Scripts

• To implement XML and XSLT for web applications

• Develop Dynamic web content using Java Servlets and JSP

• To develop JDBC connections and implement a complete Dynamic web

application

No comments:

Post a Comment