Professional Documents
Culture Documents
LAB MANUAL
2019-20 SEM-I
Course Outcomes:
The student will be able to:
• Develop a dynamic webpage using Java script and DHTML.
• Connect a Java program to a DBMS and perform insert, update and delete operations on DBMS
table.
• Write a server side Java application called Servlet to catch form data sent from client, process it
and store it in the database.
• Write a server side Java application called JSP to catch form data sent from client and store it in
the database.
SKILLS:
✓ Perform client side validation using Java script.
✓ Store and retrieve data using JDBC.
✓ Generate dynamic contents using Servlets.
✓ Generate dynamic contents using JSPs.
✓ Overcome problems in Servlets and JSP using Struts Programs.
✓ Develop a working system of web application or web site.
1. Create a HTML document to demonstrate lists, links, images, pre, font, heading tags…5
2. Create a HTML document to display your class timetable …………9
3. Create a HTML page having four frames named …………10
a. top
b. center
c. bottom
d. left
The top frame should contain company logo and title. The bottom frame should contain Copy
right information. The left frame should contain various links like Home, Products, Services,
Branches, about us, etc. When clicked on those links, the contents should appear in the display
on to center frame.
4. Create a HTML document to demonstrate Form Elements that includes Form, input-text,
password, radio, checkbox, hidden, button, submit, reset, label, text area, select, option, file
upload…………14
5. Write a HTML program with at least two <h1>, two images, two buttons and appropriate
CSS to display………….16
a. All <h1> with font-size 12pt, and bold in Verdana font using Inline CSS.
b. All <img> with border color yellow, thickness 10px using Document Level CSS
c. All <input type=’button’> should change background color to red on mouse over
them using External CSS.
6. Design a HTML page having a text box and four buttons via Factorial, Fibonacci, Prime and
Palindrome. When a button is pressed an appropriate java script function should be called to
display the following:…………18
a. factorial of that number
b. Fibonacci series up to that number
c. prime numbers up to that number
d. is it palindrome or not
7. Write Java script program to demonstrate the following objects with at least
five methods:………..20
a. MATH
b. STRING
c. ARRAY
d. DATE
8. Write a JavaScript program to perform arithmetic operations when the corresponding button is
pressed……………22
9. Write a java script program to display message on ONBLUR and ONFOCUS events…..24
10. Write a Javascript program for form Validation……….26
11. Create an XML document where CSEBooks is the root tag, it consists of 5 books named
as(book1, book2, book3, book4, book5) whose copies of books are 10 and provide the child tag
such as author, title, pages, price for all books………27
12. For the above program, provide an associate DTD………28
13. Create an XML document where automobiles is the root tag, it consists of 5 vehicles
15. Write a Java program to connect to a database server using JDBC and insert 10 employees
information of user choice in to employee table……..31
16. Write a JDBC Program to retrieve and display data from a table employee……32
17. Develop a simple Servlet to display Welcome to Servlet………..33
18. Write a servlet program to demonstrate Life cycle of Servlet………34
19. Develop a Servlet to validate user name and password with the data stored in Servlet
configuration file. Display authorized user if she/he is authorized else display
unauthorized user……………….35
20. .Write a Servlet program to store student details sent from registration form in to the
database……..36
21. Write JSP Program to store student information sent from registration page into
Database……….38
22. Develop a program to validate username and password that are stored in database
using JSP………….40
23. Write an appropriate JSP page to insert, update and delete data in student table in a single
application with proper linking of JSP pages and session management……….41
PROCEDURE:
OUTPUT:
Test cases:
1. Html page should be displayed with different kinds of lists in which one should be
ordered list and unordered lists.
2. Each list name should be made as link. By clicking each link of list, another page
should be displayed
3. Different pages to be displayed successfully by clicking each link.
PROCEDURE:
OUTPUT:
1. A html page should be displayed which shows some clear description of time table.
2. Each row should be showed with different kinds of colors.
3. There should be few merging of rows and columns should be there.
ALGORITHM:
OUTPUT
TEST CASES:
1. A html page should be displayed which shows the division of page by 3 columns.
2. On the 1st top frames. Different images to be displayed.
3. In the second frame, on the left corner 3 links should be displayed.
4. By clicking that links different pages should be displayed in the middle of the frame
or right side of the frame.
5. At the last bottom footer frame, some copyright should be displayed.
PROCEDURE:
OUTPUT:
3. For multiple selection of input checkbox should be created for selection course
5. after giving input data, submit button should be clicked to submit database
ALGORITHM:
1. Create a html page and save it with *.html extension.
2. Define h1 tag with inline style having font-size 12pt, and bold in Verdana font
3. Define a image tag with yellow border and 10px thickness.
4. Create a button and change the background color to red on mouse over
OUTPUT
Test Cases:
2. <img> with border color yellow, thickness 10px using Document Level CSS should be
displayed
PROGRAM NO.:6DATE:
PROGRAM NO.: 6
AIM: Design a HTML page having a text box and four buttons via Factorial, Fibonacci, Prime and
Palindrome. When a button is pressed an appropriate java script function should be called to
display the following:
a. factorial of that number
b. Fibonacci series up to that number
c. prime numbers up to that number
d. is it palindrome or not?
PROCEDURE:
Create a html page and save it with *.html extension.
Textboxes are to be created in order to enter the data.
4 buttons are to be created by using the button tag.
When clicking the button, corresponding functions are to be executed.
OUTPUT:
Testcases:
1. Two text boxes should be displayed, where one text box is for entering the input and one for
Algorithm:
1. For performing Math object methods, use functions abs(), ceil(), pow(), round(), sqrt() with
OUTPUT:
ALGORITHM:
1. HTML page should be created in a document by saving it with program cal. html
2. One textboxe should be created in order to enter the data and displaying the output
3. 15 or more buttons are created by using the button tag.
4. In those 15 or more button assign 0 to 9 digits and symbols of arithmetic operations
5. After clicking the respective arithmetic button it should perform respective operation.
6. In the head tag, script tag should be opened.
7. Inside the script tag, a function should be created to write the logic for all arithmetic
operations.
8. Create a variables. To each variable, store the number which user enters in the
textbox by getElemntById function.
9. In the same way result should be stored in one more variable by using id of result
textbox.
OUTPUT:
Test Cases:
1. Create all arithmetic buttons on a web page
2. Each one should perform specific task.
3.One text boxes should be displayed , this text box is for taking input and for
displaying the output inside it.
4.15 or more buttons has to display, after clicking equal button result of the
arithmetic operations number should be done and successfully displayed inside the result
textbox.
OUTPUT:
Procedure:
1 create an html page and save it with *.html extension.
2. Create a html application form as shown below.
3. Text boxes, radio buttons, checkboxes, dropdown button, file button, submit button, reset button
and cancel button should be viewed in the form in an organized format.
4. Apply css styles to the page like background color and logo at the top of the page.
5. Add JS for the registraion form for validation.
OUTPUT:
Test Cases:
1. Name field should accept only alphabets either uppercase or lowercase
2. password field should accept any special characters,symbols,numers , and aplhbeticals
WEB TECHNOLOGIES LAB D EPARTMENT OF CSE
27
3.Email field must and should contains @ symbol, without @ it should not accept any
string.
Aim : Create an XML document where CSE Books is the root tag,it consists of 5 books
named as(book1, book2, book3, book4, book5) whose copies of books are 10 and provide
the child tag such as author,title,pages,price for all books
PROCEDURE:
Testcases:
1. XML content should be displayed on web page.
2. All the conditions should be accepted in the given question.
OUTPUT:
Testcases:
1. XML content should be displayed on web page.
2. All the conditions should be accepted in the given question.
Procedure:
1. create a xml document and save it with program name .xml
OUTPUT:
Testcases:
1. XML content should be displayed on web page.
2. All the conditions should be accepted in the given question.
Procedure:
1. create a xml document and save it with program name .xml
OUTPUT:
OUTPUT:
Test Cases:
1. Connect to the jdbc driver successfully
2. Displaying employee details from database
AIM: Write a JDBC Program to retrieve and display data from a table Employee
ALGORITHM:
1.Loading the JDBC driver
4.Executing SQL statements(Like select query for retrieving data from a table)
OUTPUT:
Test cases:
Output:
Test case:
1. Required string should be displayed on a webpage
2. The string should be displayed through only servlet program.
Test case:
1. Required string should be displayed on a webpage
2. The string should be displayed through only servlet program.
2. Create a servlet class by extending HttpServlet class and override doPost() method
3. Retrieve username and password values from html form using getParameter() method.
6. Compare the username and password which are retrieved from html form and database.
7. If both are same then display authorized otherwise display un authorized using
printwriter object
Output:
Test cases:
AIM: Write a Servlet program to store data entered in a registration form into a database
ALGORITHM:
OUTPUT:
Test cases:
ALGORITHM:
OUTPUT:
Test cases:
ALGORITHM:
3. Retrieve username and password values from html form using getParameter() method.
6. Compare the username and password which are retrieved from html form and database.
7. If both are same then display authorized otherwise display un authorized user.
ALGORITHM:
1. Define a jsp file to insert data into student table.
4. Now create a main JSP file and import all above created jsp files.