Escolar Documentos
Profissional Documentos
Cultura Documentos
On
Bachelor of Technology In
Computer Science
APEX INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPURA, JAIPUR RAJASTHAN TECHNICAL UNIVERSITY
2011
Acknowledgements
I take this opportunity to express my profound sense of gratitude and respect to all those who helped me throughout the duration of this project. I acknowledge the effort of those who have contributed significantly to my project. I express my sincere gratitude and thankfulness towards our H.O.D Er. Yogesh Kumar (AIET), for his valuable time and guidance.
I feel privileged to offer my sincere thanks and deep sense of gratitude to Mr. Arun Gupta at NIIT Pvt. Ltd. for expressing their confidence in me by letting me work on a project of this magnitude and using latest technologies and providing their support, help & encouragement in implementing this project.
I am grateful to all our friends for providing critical feedback & support whenever required. There are times in such projects when the clock beats you time & again & you run out of energy, you just want to finish it once & forever. Parents made us endure such times with their unfailing humour & warm wishes.
Padmesh Soni
PREFACE
In todays competitive world, computers have assumed critical importance in every field. It has become an essential qualification for almost all ventures. In my Bachelor degree Of Computer Science I have been prepared to be at part with the industrial requirements. So, the industrial training is a must and the project work undertaken during this training exhibits the practical as well as the theoretical knowledge of the student.
As part of my industrial training I undertook a project in Adv. JAVA, MY SQL at NIIT Private Limited, Jaipur. While doing this project I learned a lot and brushed up my earlier knowledge. This training has provided me an opportunity to have practical, which has increased my sphere of knowledge to a great extent. Now I am better equipped to handle the real things than anyone else who has not undergone any such training does.
During my stay here I learned how an actual Web Site progresses, what sort of problems actually occurs during the development of such websites.
Front page......................... 1
Acknowledgement....... 2
Preface........................... 3
List of Contents......... 4
Company Profile...... 6
Introduction to Project 40
Interface Required. . 41
Bibliography 48
COMPANY PROFILE
Introduction: NIIT is a part of the HCL group which has a big presence in the Indian InfoTech industry. The Indian computer education industry is now worth around Rs. 6.5 bn. NIIT has pioneered the computer education business in India by creating a nation-wide network of training schools. There is a strong marketing focus with the company tapping uncharted overseas markets to expand the training business with the help of local business partners. Courses have been designed for special segments like computer illiterate mothers / senior citizens. NIIT has around 650 centers, out of which around 50 are owned. NIIT had a head-start of more than 2 years over Aptech. The management has a big emphasis on quality. All the aspects of NIITs business have ISO 9000 certifications. The company is now busy implementing Crosbys Complete Quality Management System at all its locations to provide high-quality, zero-defect service to all its customers. NIIT is the first company in India to adapt the Economic Value Added (EVA) concept as a measure of corporate performance. Around four hundred front-line managers at NIIT have been trained in EVA to extract maximum resource productivity at their respective business areas.
Major line of Business: It is one of the larger computer & software training organizations Select Products and Services: Computer Training: through franchises Software Services (Educational Multimedia): NIIT is the largest educational multimedia developer in the country. It started educational software development in 1991 with a contract for IBM and now has impressive clients in educational multimedia, namely AT & T - GIS, Chase Manhattan, IBM Thailand, NETG, Oracle, etc. Key Differentiating Factors: NIIT is one of the leading players in the computer training industry in India. NIIT has moved to be a developer of computer-based training tools and is now also a software services provider
Location:
Address: NIIT Pvt. Ltd. Vaishali Nagar Centre, Office No. 2,3 & 4, 3rd Floor, Unique Aspire Building, Cosmo Colony, Amrapali Marg, Viashali Nagar, Jaipur Rajasthan, India Phone No. 91-141- 4086300 E-mail. global@niit.com
Fig: HTTP Client-Server Architecture For every exchange over the web using HTTP, there is a request and a response. The web browser sends a single request to the server. The web server determines which file is being requested and sends the data in that file back as the response. The browser interprets the response and represents the content on the screen. 8
Web Site Structure: A web site is a collection of HTML pages and other media files that contains all the content that is visible to the user on a given web server.
The index.html file is a special file used when the user requests a Uniform Resource Locator (URL) that ends in a slash character (/). The web server presents the user with a directory listing for that URL unless an index.html file exists in that directory. If that is the case, then the web server sends the index.html file as the response to the original URL. Uniform Resource Locator: A URL is canonical name that locates a specific resource on the Internet. It consists of: protocol://host:port/path/file For example: http://www.soccer.org:80/league/Spring2001.html If the port no. is the standard port for the given protocol, then that no. can be ignored in the URL.
Fig: Running Multiple Instances of Servlet A Java servlet is a Java technology program that, similar to a CGI program, runs on the server. The types of tasks that you can run with servlets are similar to those you can run with CGI. However, the underlying executing architecture is different. The basic processing steps for Java servlets are quite similar to the steps for CGI. However, the servlet runs as a thread in the web container instead of in a separate OS process. The web container itself is an OS process, but it runs as a service and is available continuously.
Java Servlets:
Servlets run within the Java EE component container architecture. This container is called the web container is a Java Virtual Machine (JVM) tool interface that supplies an implementation of the servlet API. Servlet instances are components that are managed by the web container to respond to HTTP requests.
11
12
Three-tier architecture and MVC architecture are not the same. They are not even related concepts. Three-tier architecture and MVC architecture are completely separate (orthogonal) concepts. Even the topology of each is different: three-tier is a linear (layered) architecture; Model-View-Controller is triangular. A fundamental concept of three-tier architecture is that all communication passes through the middle ware tier. In MVC architecture the controller communicates with the model (and in some implementation with the view also), and the view obtains its date directory from the model.
13
Model 2 Architecture:
y y
Fig: Deployment Diagram of a web container using Model 2 architecture A Servlet acts as the controller, which verifies form data, updates the model with the form data, and selects the next view as the response. A JSP page acts as the view. This renders the HTML response, retrieving data from the model necessary to generate the response, and provides HTML forms to permit user interaction. Java technology classes act as the model, which implements the business logic of the web application.
15
Example Headers: Header Accept Host Referer Use The MIME types the client can receive The internet host and port number of the resource being requested The address from which the RequestUniversal Resource Identifier (URI) was obtained The information about the client originating the request
User-Agent
HTTP Response:
16
Example Headers: Header ContentType ContentLength Server CacheControl Use A MIME type (such as text/html) which classifies the type of data in the response The length (in bytes) of the payload of the response An informational string about the server that responded to this HTTP request A directive for the web browser (or proxies) to indicate whether or not the content of the response should be cached
17
18
19
20
Note: It is used when developing a user detail in online submission forms like as registrations.
21
y When the web container is started, each web application is initialized. y When the web container is shut down, each web application is destroyed. y A Servlet Context listener can be used to receive these web application life cycle events.
22
23
Component Boundary
Symbol
Description Communicates between the user and the system. Provides a services-oriented layer between boundary and entity components. Represents domain objects and persistent data.
Service
Entity
Entity Service:
Some entity-related operations cannot be performed by the entity component itself: y Creation- Creating a new instance of the entity. y Retrieval- Retrieving a unique instance in the data store. y Selection- Retrieving a set of instances in the data store. y Aggregation- Performing a calculation (such as an average) over a set of instances. y Deletion- Removing an instance from the data store.
24
Faade Service: y A Faade service might be used to reduce coupling between boundary components and
other services:
High Coupling
Low Coupling
25
26
27
You need to do following: y y y y Configuring the Struts infrastructure controller. Configure a servlet mapping for struts controller. Configure the action mappings. Install the struts library files.
28
The web container can keep a session object for each user:
29
Session API:
30
Cookies API:
32
URL-Rewriting Implications:
y y y y URL-rewriting is used when cookies cannot be used. The server appends extra data on the end of each URL. The server associates that identifier with data it has stored about that session. With this URL: o http://host/path/file;jsessionid=123 session information is jsessionid=123.
Every HTML page that participates in a session (using URL-rewriting) must include the session ID in all URLs in those pages. This requires dynamic generation. Use the encodeURL method on the response object to guarantee that the URLs include the session ID information.
33
Web Container Request Processing: y Request and response objects are created for each incoming request.
Fig: Request and Response Applying Filters to Incoming Request: y A filter intercepts the request before it gets to the requested resource. y A response is returned to the client through the filter.
34
Filters can be used for many activities in a web application, such as: o Blocking access to a resource based on user identity or role membership o Auditing incoming requests o Compressing the response data stream o Transforming the response o Measuring and logging servlet performance
Filters applied to a Dispatch: y Filters can be applied to an internal dispatch, such as a request forward or include.
Filters API:
35
y y
The init method is called once when the filter instance is first created. Use the init method to: o Perform one-time initialization of resources the filter uses over its lifetime o Retrieve the initialization parameters configured in the deployment descriptor
y y
The doFilter method is the filter equivalent of a servlets service method. As a developer, you implement the doFilter method to do the following: o Perform the operations you want to occur every time the filter is invoked. o Decide whether to pass the request to the next component in the filter chain or halt the request entirely. To pass on the request, call the doFilter method on the FilterChain reference. y y The destroy method is the last method called in the life cycle of a filter instance. Use the destroy method to clean up any resources allocated in the init method.
36
JDBC API:
The JDBCTM API is the Java technology API for interacting with a relational DBMS. The JDBC API includes interfaces that manage connections to the DBMS, statements to perform operations, and result sets that encapsulate the result of retrieval operations. Techniques are described for designing and developing a web application, in which the JDBC technology code is encapsulated using the DAO design pattern. An incorrect technique is to create a connection object for each request, but this approach is extremely slow and does not scale well. 37
y y y
DataSource API:
38
Processing of JSP:
39
Overview:
DVD Library Management is a report of recent occurrences, information of DVDs that has lately taken type. DVD Library Management is the management of DVDs which is presented by admin these are Padmesh and Jack with additional users. The world is changing at a very fast rate and so as they ways to access different medium. This project pattern has only three features which are describe by me the whole 11 modules of this report. In my summer training period I have done a course in J2EE and worked on a simple project of a DVD Library Management website. DVD Library Management is a module of simple three features in which admin and additional users are add their DVDs according to genre and show them with their preferences of title, year, genre. Purpose The purpose of my project is only that from this I can understand the processing of Servlets with their additional features.
40
Interface Required
Window XP HTML, J2EE (Servlets) MY SQL Netbeans 7, Glassfish and Apache Servers.
Hardware Requirements:
Processor Ram
::-
TOOLS:
Front-End
:-
J2EE
Back-End
:-
MY SQL
41
42
43
Bibliography
47