Web Development and Core Java Lab Manual V th Semester



Similar documents
AP Computer Science Java Subset

Introduction to Java

Syllabus for CS 134 Java Programming

Fortigate SSL VPN 4 With PINsafe Installation Notes

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Specialized Programme on Web Application Development using Open Source Tools

Fortigate SSL VPN 3.x With PINsafe Installation Notes

Chapter 1 Java Program Design and Development

Fundamentals of Java Programming

JavaScript and Dreamweaver Examples

Preet raj Core Java and Databases CS4PR. Time Allotted: 3 Hours. Final Exam: Total Possible Points 75

Government Girls Polytechnic, Bilaspur

Specialized Programme on Web Application Development using Open Source Tools

CS170 Lab 11 Abstract Data Types & Objects

Java Application Developer Certificate Program Competencies

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

Script Handbook for Interactive Scientific Website Building

Object Oriented Software Design

NGASI AppServer Manager SaaS/ASP Hosting Automation for Cloud Computing Administrator and User Guide

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

CS506 Web Design and Development Solved Online Quiz No. 01

WEB DESIGN LAB PART- A HTML LABORATORY MANUAL FOR 3 RD SEM IS AND CS ( )

PHP Tutorial From beginner to master

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

ITNP43: HTML Lecture 4

Introduction to Java Applets (Deitel chapter 3)

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

Outline of CSS: Cascading Style Sheets

2. Advance Certificate Course in Information Technology

Novell Identity Manager

Java CPD (I) Frans Coenen Department of Computer Science

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Chapter 2 Introduction to Java programming

Hello World RESTful web service tutorial

El Dorado Union High School District Educational Services

HTML Tables. IT 3203 Introduction to Web Development

Creating a Resume Webpage with

Object Oriented Software Design

HTML Forms and CONTROLS

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Web Design and Databases WD: Class 7: HTML and CSS Part 3

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

#820 Computer Programming 1A

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Java Server Pages and Java Beans

CS 106 Introduction to Computer Science I

The C Programming Language course syllabus associate level

Java Interview Questions and Answers

ecommercesoftwareone Advance User s Guide -

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

WIRIS quizzes web services Getting started with PHP and Java

Internet Technologies

Example of a Java program

JavaScript Basics & HTML DOM. Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com

Basic Programming and PC Skills: Basic Programming and PC Skills:

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT

CSc 230 Software System Engineering FINAL REPORT. Project Management System. Prof.: Doan Nguyen. Submitted By: Parita Shah Ajinkya Ladkhedkar

LAB MANUAL CS (22): Web Technology

Java (12 Weeks) Introduction to Java Programming Language

«W3Schools Home Next Chapter» JavaScript is THE scripting language of the Web.

Computing Concepts with Java Essentials

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

An Overview of Java. overview-1

<script type="text/javascript"> var _gaq = _gaq []; _gaq.push(['_setaccount', 'UA ']); _gaq.push(['_trackpageview']);

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

INTRODUCTION WHY WEB APPLICATIONS?

CS 111 Classes I 1. Software Organization View to this point:

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

Client-side Web Engineering From HTML to AJAX

WHITEPAPER. Skinning Guide. Let s chat Velaro info@velaro.com by Velaro

Real SQL Programming 1

c. Write a JavaScript statement to print out as an alert box the value of the third Radio button (whether or not selected) in the second form.

Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2)

Computer Programming I & II*

Yandex.Widgets Quick start

How to use SSO with SharePoint 2010 (FBA) using subdomains. Moataz Esmat EXT.1386

CHAPTER 10. When you complete this chapter, you will be able to:

What is Java? Applications and Applets: Result of Sun s efforts to remedy bad software engineering practices

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Website Planning Checklist

DC60 JAVA AND WEB PROGRAMMING JUNE b. Explain the meaning of the following statement public static void main (string args [ ] )

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Java Crash Course Part I

Technical University of Sofia Faculty of Computer Systems and Control. Web Programming. Lecture 4 JavaScript

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Web Programming with PHP 5. The right tool for the right job.

CIS 467/602-01: Data Visualization

How to Display Weather Data on a Web Page

Java Programming Fundamentals

Intell-a-Keeper Reporting System Technical Programming Guide. Tracking your Bookings without going Nuts!

Moving from CS 61A Scheme to CS 61B Java

Facebook Twitter YouTube Google Plus Website

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Web Development in Java

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Building and Using Web Services With JDeveloper 11g

Sample CSE8A midterm Multiple Choice (circle one)

Transcription:

Web Development and Core Java Lab Manual V th Semester DEPT. OF COMPUTER SCIENCE AND ENGINEERING Prepared By: Kuldeep Yadav Assistant Professor, Department of Computer Science and Engineering, RPS College of Engineering, Mahendergarh 1

Table of Content S.no. Particular Page No. 1 General Instructions 3 2 MDU Syllabus 4 3 List of Experiments 5 4 Hardware and Software requirement 6 5 Experiment-1 7 6 Experiment-2 9 7 Experiment-3 11 8 Experiment-4 16 9 Experiment-5 20 10 Experiment-6 23 11 Experiment-7 24 12 Experiment-8 26 13 Experiment-9 28 14 Experiment-10 32 15 Experiment-11 38 16 Experiment-12 54 2

GENERAL INSTRUCTIONS FOR LABORATORY CLASSES DO S Without Prior permission do not enter into the Laboratory. Students should sign in the LOGIN REGISTER before entering into the laboratory. Students should come with observation and record note book to the laboratory. Students should maintain silence inside the laboratory. After completing the laboratory exercise, make sure to shutdown the system properly. DONT S Students bringing the bags inside the laboratory.. Students using the computers in an improper way. Students scribbling on the desk and mishandling the chairs. Students using mobile phones inside the laboratory. Students making noise inside the laboratory. 3

Syllabus CSE-311 Web Development & Core JAVA Java programs using classes & objects and various control constructs such as loops etc, and data structures such as arrays, structures and functions. Java programs for creating Applets for display of Images,Texts and Animation Programs related to interfaces & packages Input output & Random files programs in java Java programs using Event driven concept Programs related to Network Programming Development of Web site for the college or newspaper agency. 4

List of Experiment 1. Write a program to print Hello World in java. 2. Write a program to implement basic data types and control structure (loop, if-else etc ) in java. 3. Write a program to implement array, polymorphism, inheritance using methods in java. 4. Write a program to implement packages and interface in java. 5. Write a program to draw an image using applet in Java. 6. Write a program to read and write data in a file using java. 7. Create a webpage using HTML to describe your department using paragraph and list. 8. Create a table in HTML to show your class time table. 9. Apply CSS(Cascade Style Sheet) to change a certain portion,bold,italic and underline certain words in your HTML web page. 10. Create a registration form and put validation checks on values entered by the users using java scripts. 11. Create a JSP page for the form which embedded JSP in HTML. 12. Using idea from the above experiments try to create a website for your college (RPS). 5

Hardware and Software requirement HARDWARE REQUIREMENTS: Pentium Dual Core @ 2.70 Ghz and above with 1GB RAM, 160 GB HARD Disk, Monitor 1024* 768 color SOFTWARE REQUIREMENTS: Windows / Linux operating system JDK 1.6 (or above) Netbeans IDE or Eclipse IDE Oracle or MS-Access or MySQL 6

Experiment-1 Aim: Write a program to print Hello World in java Source Code: Class First { public static void main (String arg []) Output: C:\java>javac First.java C:\java>java First. Hello World { System.out.print ( Hello World ); 7

Viva Questions: 1.What are command line arguments? The values that are passed to the main method from the command line while executing the program are called as command line arguments. 2. What are the various types of operators available in java? Arithmetic operator, Relational operator, Logical operator, Bitwise operator, Increment and decrement operator, Assignment operator, Conditional operator and Special operator. 3. What is a ternary operator? The operator that takes three arguments is called as ternary operator. The conditional operator is the only ternary operator available in java. 4. What is the use of Integer.parseInt() method? This method is used to convert the String object into integer value. 5. What is called as a Boolean expression? An expression that returns either true or false value is called a Boolean expression. 8

Experiment-2 Aim: Write a program to implement basic data types and control structure (loop, if-else etc ) in java Source Code: public class Test { public static void main(string args[]) { for(int x = 1; x < 10; x = x+1) { System.out.print("value of x : " + x ); System.out.print("\n"); Output : value of x 1 value of x :2 value of x :3 value of x:4 value of x :5 value of x:6 value of x :7 value of x :8 value of x:9 value of x:10 9

Viva Questions: 1. What is a control structure? Control structures are statements that are used to change the flow of the program based on some condition. 2. What are the two types of control structures? Decision making statements and Looping statements 3. What are decision making statements? The statements that are used to execute only a block of code and leaving others based on the condition. 4..What is the use looping statement? The looping statement is used to execute a block of repeatedly until the condition is true. 5. What is the difference between while and do..while? In case of while statement the block of code will not be executed atleast once if the condition is false at the first run. In case of do..while statement the block of code will be executed atleast once if the condition is false at the first run. 10

Experiment-3 Aim: Write a program to implement array, polymorphism, inheritance using methods in java Source Code: class Array { public static void main(string args[]){ int a[]=new int[4];//declaration and instantiation a[0]=1;//initialization a[1]=2; a[2]=3; a[3]=4; //printing array for(int i=0;i<a.length;i++)//length is the property of array System.out.println(a[i]); (ii). Polymorphism Public class Car { void run() { System.out.println("running"); class Swift extends Bike{ void run() { System.out.println("running safely with 80km"); public static void main(string args[]){ Car c = new Swift();//upcasting c.run(); Output: running safely with 80km 11

(iii). Inheritance class Employee{ float salary=40000; class Programmer extends Employee{ int bonus=10000; public static void main(string args[]) { Programmer p=new Programmer(); System.out.println("Programmer salary is:"+p.salary); System.out.println("Bonus of Programmer is:"+p.bonus); Output: Programmer salary is:40000 Bonus of Programmer is: 10000 12

Viva Questions: 1. What is an array? An array is a collection of elements of same data type referred by a common name. The elements are of the array are stored in consecutive memory locatons. 2. What are the types of arrays? One dimensional array, two dimensional array and multidimensional arrays. 3. How to declare a two dimensional array? Datatype arrayname[][]=new datatype[ row size][column size] 4. How the individual elements of an array can be accessed? The individual elements can be accessed using the index. The index of the first element starts with 0. 5. What is Vector? Vector is just like an array that can store elements of different data types. The elements of the vector can only be objects. So the primitive data type must be converted into object data type before adding to the vector. 6. What is the difference between capacity and size of the Vector? Capacity specifies the maximum number of objects that can be stored in the vector. Size specifies the number of objects that are present in the Vector. 7. What are the difference between array and Vector? The elements of the array are of same data type. The elements of the Vector can be different data type. The elements of the array can be of primary data type. The elements of the Vector can only be objects. 13

The capacity of the array is fixed. The size of Vector can be changed during Run time. 8. What is class? A class is a collection of data and methods that defines an object. The variables and methods (functions) of a class are called members of the class. 9. What is an object? The variable of type class is called object. Syntax for defining a class class classname { //Declaration of instance variables //Constructors //Instance Methods 10. How can we create objects? The objects can be created using the new operator. classname objectnname=new classname(); 11. How the members of a class can be accessed? The members of the class can be accessed using the dot operator Objectname.variable Or Objectname.methodName(Arguments) 12. What is a constructor? Constructors are special methods whose name is same as the class name. The 14

constructors do not return any value. The constructors are automatically called when an object is created. They are usually used to initialize the member variables. 13. What is a default constructor? Constructor that does not take any argument is called default constructor. 14. What is meant by constructor overloading? Defining more than one constructor for a class which differ in the number of arguments / type of arguments or both is called constructor overloading. 15. What is inheritance? Inheritance is the process of deriving a new class from an existing class. The newly created class is called sub class and the already existing class is called super class. 16. What are the types of inheritance? Single inheritance: One super class and single sub class. Multiple inheritance: More than one super class and single subclass. Hierarchial inheritance: one super class and more than one subclass. Multilevel inheritance : Deriving a sub class from another sub class Syntax for deriving a sub class class subclassname extends superclassname { //define the members 15

Experiment-4 Aim: Write a program to implement packages and interface in java. Source code: package mypack; public class Test{ public static void main(string args[]){ System.out.println("Welcome to First package"); Save Test.java Compile: Syntax : javac -d directory javafilename Eg. javac d.test.java Run: java mypack.test Output: Welcome to First package (ii) package my; public class A{ void show() { System.out.print( Hello ); Compile using javac d A.java 16

How to use package in another class import my.*; class B{ public static void main(string args[]){ A obj = new A(); obj.msg(); Output : javac B.java java B Hello (iii). interface printable{ void print(); class A implements printable{ public void print(){system.out.println("hello"); public static void main(string args[]){ A obj = new A(); obj.print(); Output: Hello Viva Questions: 17

1. What is an interface? Interface is just like a class which contains final variables and public abstract methods. It is used to implement multiple inheritances in java. 2. What is an abstract method? The method which has only declaration in the super class and defined in the subclass is known as abstract method. Syntax for defining an interface interface interfacename { //define the static variables and declare abstract methods 3. How to implement interface? The abstract methods should be implemented in a class to use the interface in our program. class classname extends superclassname implements interface1, interface2, { //define the members 4. What is package? 18

Package is a collection of interfaces and classes. 5. How a package can be created? A package can be created using the package statement. 6. How a package can be imported into the program? A package can be imported using the import statement. 19

Experiment-5 Aim: Write a program in java to draw image using applet. To execute the applet by appletviewer tool, create an applet that contains applet tag in comment and compile it. After that run it by: appletviewer First.java. Now Html file is not required but it is for testing purpose only. import java.applet.applet; import java.awt.graphics; public class First extends Applet{ public void paint(graphics g){ g.drawrect(10,10,50,100); g.drawrect(10,10,50,100); /* <applet code="first. class" width="300" height="300"> </applet> */ Output: To execute the applet by appletviewer tool, write in command prompt: c:\>javac First.java c:\>appletviewer First.java 20

21

Viva Questions: 1. What is an applet? Applet is a small interactive java programs that are used for web application. 2. What are the two packages that are needed to create an applet? Java.awt and java.applet 3. What is an applet tag? Applet tag is an HTML tag that is used to run the java applets. 4. What is an event? Events is an interruption given to the running program using input devices such as mouse, keyboard etc. 5. What package is needed to handle an event? java.awt.event. 6. What are the steps needed to handle the event? 1. Import java.awt.event 2. Implement the corresponding Event Listener interfaces 3. Register the Event Listeners with the event source. 4. Override the appropriate methods of the listener interfaces. 22

Experiment-6 Aim : Write a program to read and write data in a file using java Source Code: import java.io.*; class Test{ public static void main(string args[]){ try{ FileOutputstream fout=new FileOutputStream("abc.txt"); String s="anup Kumar is a good player"; byte b[]=s.getbytes();//converting string into byte array fout.write(b); fout.close(); System.out.println("File created..."); catch(exception e){system.out.println(e); import java.io.*; class SimpleRead{ public static void main(string args[]){ try{ FileInputStream fin=new FileInputStream("abc.txt"); int i=0; while((i=fin.read())!=-1){ System.out.println((char)i); fin.close(); catch(exception e){system.out.println(e); Output: Anup Kumar is a good player 23

Experiment-7 Aim: Create a webpage using HTML to describe your department using paragraph and list. Source Code: <html> <body> <center> <b><u>department of Computer Science and Engineering</b></u></center> <p>the fundamental aim of faculty is to provide academic, professional and research support for students by designing and developing educational programmes that contribute the effective learning and critical thinking with theoretical and practical knowledge about sustainable developing field of Computer Science and Engineering.</p> <p>the discipline is one of the most leading and demanding professional careers in today's modern era. It involves designs, supports and operations of computer software / hardware systems. Here the Computer Science programme of RPS Group of Institutions provides a balanced blend of software and hardware learning experiences, founded on solid mathematics and science with a definite engineering flavour, and hands on experience with the latest equipments in our laboratories. The department also highlights diversified areas of computer science such as programming, algorithms, hardware, software, testing, networking and simulation ranging from elementary to upper intermediate levels. For practical orientation, highly advanced research laboratories have been installed with the latest configured computer machines. </p> <p> Some of Our Faculty Members:</p> <ol> <li>mr. Mahesh Kumar</li> <li>mr. Jitender </li> <li>mr. Mukesh Kumar</li> <li>mr. Kuldeep Yadav</li> 24

</ol> </html> Output: 25

Experiment-8 Aim: Create a table in HTML to show your class time table. Source Code: <html> <body> <center> <b><u>time Table</b></u></center> <center><table border="1"> <tr><th>day-time</th><th>9:00-10:00 </th><th>10:00-11:00</th><th>11:00-12:00</th><th>12:30-1:30 </th><th>1:30-2:30</th><th>2:30-3:30</th></tr> <tr><td><b>monday</b></td><td>cao</td><td>c-programming</td><td>- </td><td>wd</td><td>dis</td><td>-</td></tr> <tr><td><b>tuesday</b></td><td>-</td><td>c-programming</td><td>- </td><td>cao</td><td>-</td><td>-</td></tr> <tr><td><b>wednesday</b></td><td>cao</td><td>c-programming</td><td>- </td><td>swd</td><td>-</td><td>-</td></tr> <tr><td><b>thrusday</b></td><td>-</td><td>c- Programming</td><td>DIS</td><td>CAO</td><td>-</td><td>WD</td></tr> <tr><td><b>friday</b></td><td>-</td><td>c-programming</td><td>dis</td><td>- </td><td>wd</td><td>wd Lab</td></tr> </table> </center> </html> 26

Output: 27

Experiment-9 Aim : Apply CSS(Cascade Style Sheet) to change a certain portion, Bold, Italic and underline certain words in your HTML web page. Source: Style.css body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;.stylebig { font-size: 18px; font-family: "Times New Roman", Times, serif; font-weight: bold;.stylemedium { font-size: 14px; font-family: "Times New Roman", Times, serif; font-weight: bold;.stylesmall { font-family: "Times New Roman", Times, serif; 28

font-size: 12px; font-weight: bold;.stylegreen {font-family: "Times New Roman", Times, serif; font-size: 12px; font-weight: bold; color: #007F00;.stylered { font-size: 12px; font-family: "Times New Roman", Times, serif; color: #FF0000; font-weight: bold;.stylegrey {font-family: "Times New Roman", Times, serif; font-size: 12px; font-weight: bold; color: #550055;.stylelink {font-family: "Times New Roman", Times, serif; font-size: 12px; font-weight: bold; color: #AA0000; Home.Html <%@ page contenttype="text/html; charset=iso-8859-1" language="java" errorpage="errorpage.jsp" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="stylesheet/style.css" type="text/css"/> <title>home Page</title> 29

</head> <body> <table width="100%" height="100%" > <tr height="15%"> <td ><%@ include file="header.jsp" %></td> </tr> <tr height="80%"> <td align="center" valign="baseline"><table width="70%"> <tr> <td align="center"><a href="home.jsp" class="stylelink" style="textdecoration:none">home</a></td> <td align="right"><a href="student_login.jsp" class="stylelink" style="textdecoration:none">student Login</a> <a href="admin_login.jsp" class="stylelink" style="textdecoration:none">administrator Login</a></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> 30

<td> </td> </tr> </table></td> </tr> <tr height="5%"> <td><%@ include file="footer.jsp" %></td> </tr> </table> </body> </html> 31

Experiment-10 Aim: Create a registration form and put validation checks on values entered by the users using java scripts. Source Code: StudentLogin.jsp <%@ page contenttype="text/html; charset=iso-8859-1" language="java" errorpage="errorpage.jsp" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>login Page</title> <link rel="stylesheet" href="stylesheet/style.css" type="text/css"/> <script type="text/javascript"> function val() { if(document.form1.studentid.value=="") { alert("please Enter Your Login ID"); document.form1.studentid.focus(); return false; if(document.form1.studentpassword.value=="") { 32

alert("please Enter Your Password"); document.form1.studentpassword.focus(); return false; </script> </head> <body onload="javascript:document.form1.studentid.focus()"> <form name="form1" method="post" action="student_login_handler.jsp" onsubmit="return val()"> <table width="100%" height="100%" cellpadding="3" cellspacing="0" > <tr> <td bgcolor="#e1e1e1" height="15%"><%@ include file="header.jsp" %></td> </tr> <tr> <td width="100%" height="80%" align="center" valign="baseline"><table width="90%" cellpadding="3" cellspacing="0" > <tr> <td width="8%"><a href="home.jsp" class="stylelink" style="text-decoration:none; fontfamily: "Times New Roman", Times, serif;">home</a></td> <td width="35%" align="center"> </td> <td width="27%"> </td> 33

<td width="30%" align="right"><a href="student_registration.jsp" class="stylelink" style="text-decoration:none ; font-weight: bold;">new Student Click Here</a></td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <% if(session.getattribute("message")!= null) { %> <tr> <td colspan="4" class="stylegreen" align="center"><%= session.getattribute("message")%></td> </tr> <% %> <tr> session.removeattribute("message"); <td colspan="4"> </td> </tr> <tr> 34

<td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="4"><table width="40%" border="1" align="center" bordercolor="#cccccc" bgcolor="#cccccc"> <tr align="center" bgcolor="#999999"> <td colspan="2" class="stylebig">student Login Here</td> </tr> <tr bgcolor="#e1e1e1"> <td colspan="2"> </td> </tr> <tr bgcolor="#e1e1e1" class="stylesmall"> <td width="35%" class="style7">login Id: </td> <td width="65%"><input name="studentid" type="text" id="studentid"></td> 35

</tr> <tr bgcolor="#e1e1e1" class="stylesmall"> <td class="style7">password:</td> <td><input name="studentpassword" type="password" id="studentpassword"></td> </tr> <% if(request.getparameter("valid")!= null && request.getparameter("valid").equals("invalid")) { %> <tr bgcolor="#e1e1e1"> <td colspan="2" align="center" class="stylered">invalid Login Id or Password.</td> </tr> <% %> <tr bgcolor="#e1e1e1"> <td colspan="2" align="center"><input name="login" class="style10" type="submit" id="login" value="login"> <input name="close" type="button" id="close" class="style10" value="close" onclick="self.location='home.jsp'"> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="5%" align="center" ><%@ include file="footer.jsp" %></td> </tr> 36

</table> </form> </body> </html> 37

Experiment-11 Aim: Create a JSP page for the form which embedded JSP in HTML. Source Code: 1) Create the dynamic web project For creating a dynamic web project click on File Menu -> New -> dynamic web project -> write your project name e.g. first -> Finish. 38

39

40

41

42

2) Create the JSP file in eclipse IDE For creating a jsp file explore the project by clicking the + icon -> right click on WebContent -> New -> jsp -> write your jsp file name e.g. index -> next -> Finish. 43

44

45

46

47

48

Now JSP file is created, let's write some code. 49

3) Start the server and deploy the project: For starting the server and deploying the project in one step Right click on your project -> Run As -> Run on Server -> choose tomcat server -> next -> addall -> finish. If you are using Eclipse IDE first time, you need to configure the tomcat server First. Click for How to configure tomcat server in eclipse IDE 50

Now start the tomcat server and deploy project For starting the server and deploying the project in one step Right click on your project -> Run As -> Run on Server -> choose tomcat server -> next -> addall -> finish. 51

Yes, Let's see JSP is successfully running now. 52

Next 53

Experiment-12 Aim: Using idea from the above experiments tries to create a website for your college (RPS) 54