Contents Unit 1 Introduction to Java and Web Design 1 Unit 2 Basic Web Page Development 20 Unit 3 Web Page Development with HTML 40 Unit 4 Using CSS for Web Designing 61 Unit 5 Web Servers 82 Unit 6 Using JavaScript 102 Unit 7 Script Languages for Web Development 122 Unit 8 The LAMP Stack 140 Unit 9 Search Engines 157 Edition: Spring 2010 BKID B1327 11 th Jan. 2011 Unit 10 Web Design Tools 174 Unit 11 Java Basics 192 Unit 12 Classes and Objects 218 Unit 13 Core Java API 240 Unit 14 Servlets and JSP 266 Unit 15 Java Development Tools 286
Dean Directorate of Distance Education Sikkim Manipal University (SMU DDE) Board of Studies Chairman HOD Management & Commerce SMU DDE Mr. Pankaj Khanna Director, HR Fidelity Mutual Fund Additional Registrar SMU DDE Controller of Examination SMU DDE Dr. T.V. Narasimha Rao Adjunct Faculty & Advisor, SMU DDE Prof. K.V. Varambally Director, Manipal Institute of Management Manipal Mr. Shankar Jagannathan Former Group Treasurer Wipro Technologies Limited Mr. Abraham Mathew Chief Financial Officer Infosys BPO, Bangalore Ms. Sadhna Dash Ex Senior Manager HR Microsoft India Corporation (Pvt.) Ltd. Content Preparation Team Team Triumph Triumph India Software Services Pvt Ltd. Bangalore 560 094 Instructional Designing Team Triumph Triumph India Software Services Pvt Ltd. Bangalore 560 094 Content Review Ms. Ramya S. Gowda Lecturer, SMU DDE Management & Commerce Dept. Bangalore 560 008 Language Editing Ms. Neelam Singh Curriculum Revised : Spring 2010 Printed : January 2011 This book is a distance education module comprising a collection of learning materials for our students. All rights reserved. No part of this work may be reproduced in any form by any means without permission in writing from Sikkim Manipal University, Gangtok, Sikkim. Printed and Published on behalf of Sikkim Manipal University, Gangtok, Sikkim by Mr. Rajkumar Mascreen, GM, Manipal Universal Learning Pvt. Ltd. Manipal 576 104. Printed at Manipal Press Limited, Manipal.
SUBJECT INTRODUCTION Java and Web Design (MI 0041) Java and Web designing are two concepts that are in use today to create dynamic and interactive Websites and Web applications which have become an inevitable part of our lives since the advent of Internet. Java refers to an object oriented programming language and Web designing refers to the task of developing or designing Web pages. This course begins with a brief introduction to the Web that helps you to learn about Web browsers and search engines. It also discusses about various tools available to design a Web page. It helps you to use the various tools used in Web designing and create a Web page using HTML. This course also explains the use of HTML tables, forms and frames that are used in structuring Web pages. CSS that is used to handle the presentation of Web pages, is described in association with creation of Web pages. This course also deals with Web servers. It describes about Apache Web servers and method to install an Apache Web Server. It also describes the techniques of securing a Web server. This course also deals with JavaScript that is used in the creation of dynamic and interactive Web pages. It describes about event handlers and to write simple JavaScript programs that can be embedded into a HTML program. It also describes about various other open source scripting languages such as Perl, PHP and Python. It assesses the difference between script languages and programming languages. This course analyses the concept of LAMP stack and also discuss about the tools that requires to be installed to develop Web applications using LAMP stack. It also describes about search engines and methods to get higher ranking for our Websites on a search engine. It also discusses about various popular Web design tools such as Photoshop, Flash, Firebug and HTML editors.
This course will help you to analyse the concept of Java and the difference between Java and script/programming languages. It also helps you to learn Java programming with the use of a simple program. It analyses the concept of object oriented programming in Java. It deals with inheritance, classes and interfaces. It also familiarises about Java API, packages, threads, exception handling and GUI swing. This course also describes about servlets and JSP used to create dynamic Web pages. It discusses about the working of servlets and life cycle of servlets. It also helps use to learn simple programs using servlets and JSP. This course also discusses about JDBC, struts, and JSF. It also describes various IDE's used in developing Java programs such as Eclipse and Netbeans. Unit 1: Introduction to the Web This unit familiarises you with the concept of Web and also helps you to analyse the difference between Internet and Web. This unit will also help you to learn about Web browsers and search engines. It even describes about the importance of Java in Web designing. Unit 2: Basic Web Page Development This unit helps you to learn the basic techniques used in Web designing. It also will help you to build a Web page using a mark-up language and add links to your Web page. It even helps you to learn about various tools that we can use to design a Web page. Unit 3: Web Page Development with HTML In this unit you will learn the use of HTML table elements to structure your Web page and also learn to insert multimedia files on the Web page. You will also learn to create forms using the tags that are available in HTML. You will even learn to create formatted list and frames to display more than one Web page on the same browser window. Unit 4: Using CSS for Web Designing This unit familiarises you with the concept of CSS and the working of CSS. This unit also helps you to organise the content on your Web page using CSS. It even helps you to learn the creation of Web page layout using CSS. Unit 5: Web Servers In this unit you will learn about Web servers wherein we will learn about Apache Web server and its installation. You will also learn to monitor the Web server using log files. You will even learn the techniques of securing a Web server. Unit 6: Using JavaScript This unit familiarises you with the concept of JavaScript. This unit also helps you to write simple JavaScript that we can embed within our HTML document. It also helps you to learn about event handlers to make our Web page interactive. It even discusses about the benefits and drawbacks of using JavaScript. Unit 7: Scripting Languages for Web Development This unit familiarises you with the concept of script languages. This unit also discusses about the difference between a script language and a typical programming language. It also helps you to learn about the three popular script languages such as, Perl, PHP and Python. Unit 8: The LAMP Stack In this unit you will learn about the LAMP stack and the reasons for its popularity. You will also learn about the tools that need to be installed to develop a Web application using LAMP. You will even learn about PHPMyAdmin that is used to manage a LAMP stack. Unit 9: Search Engines In this unit you will learn about search engines and its working. You will also learn about the importance of a search engine friendly Website. This unit also covers how to customise a Website for search engine optimisation. Unit 10: Web Design Tools This unit familiarises you with the concept of Web design and Web design tools. This unit also helps you to learn about the need for a Web design tools. It even helps you to learn about various Web design tools such as, HTML editors, Photoshop, Flash and Firebug.
Unit 11: Java Basics This unit familiarises you with the concept of Java. It also explains the difference between Java and other script/programming languages. This unit also discusses about the uses of classes in a program and about the looping, conditional, and transfer statements. Unit 12: Classes and Objects In this unit, object-oriented programming and its benefits are discussed. You will also learn about the methods and classes used in Java. You will even learn about inheritance, interfaces, and inner classes in Java and become familiar in writing a simple program using the inheritance. Unit 13: Core Java API This unit familiarises you with the concept of Java API and packages that is used as a Software Development Kit. You shall also learn a sample program to demonstrate the use of threads and exception handling. You will even study about the GUI Swing interface in Java. Unit 14: Servlets and JSP In this unit you will learn about servlets and JSP which is used in the creation of dynamic Web pages. You will also learn about the purposes of servlets and JSP. You shall also learn about the working and life cycle of servlets, and study the comparison of servlets with other script languages. You will even learn to write a simple servlet and JSP program. Unit 15: Java Development Tools In this unit you will learn about the JDK development environment that is used for developing Java based software applications. We will also learn about JDBC, struts, and JSF. You will even learn about IDE's such as Eclipse and Netbeans. Objectives of studying the subject: After studying this subject, you should be able to: Describe the purpose of a browser Analyse the basic tags that structure the HTML document Use the HTML table element to structure a Web page Analyse the working of CSS Define a Web Server Explain the purpose of JavaScript Evaluate the three popular script languages Explain why the LAMP stack is popular Explain how a search engine works Explain the need for Web development tools Explain the features and benefits of the Java programming language Define an object-oriented programming language Define an API Gain knowledge about the community enforcement of open source licensing Explain the purpose of servlets and Java Server Pages