0% found this document useful (0 votes)
6 views25 pages

Acn Microproject

This project report focuses on the implementation and advantages of Java Servlets for creating dynamic web pages. It discusses the architecture of servlets, their benefits over CGI, and the resources required for the project. Additionally, the report includes an introduction to HTML and a sample HTML code for creating a resume form.

Uploaded by

kundanmhatre2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views25 pages

Acn Microproject

This project report focuses on the implementation and advantages of Java Servlets for creating dynamic web pages. It discusses the architecture of servlets, their benefits over CGI, and the resources required for the project. Additionally, the report includes an introduction to HTML and a sample HTML code for creating a resume form.

Uploaded by

kundanmhatre2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

A

PROJECT REPORT
ON

Project Report On Servlets

Submitted in the partial fulfillment of the requirements for


the award of diploma in Computer Engineering

SUBMITED BY,
Kundan Kanchan Mhatre (2211450042)
Mr. Sagar Surekar

SUBMITED TO
Maharashtra State Board of Technical Education
&
Department of Computer
Engineering
BHARTIYA EDUCATION/SOCIAL CHARITABLE TRUSTS
SHETH SHREE OTARMAL SHESHMAL PARMAR COLLEGE OF
DIPLOMA ENGINEERING AT/POST: - NAGOTAHNE
(VELSHET)-402106, TAL:- ROHA, DIST:-RAIGAD (M.S.) INDIA

AT/POST: - NAGOTAHNE (VELSHET)-402106, TAL:-ROHA, DIST:-RAIGAD


(M.S.)

Academic Year 2023-24


CERTIFICATE

This is to certify that the project on Study of Storage Area Network


submitted by Kundan mhatre to the S.S.O.S.P. College of Diploma
Engineering, Nagothane, and (second year department of Computer
engineering for the year (2023-24) in partial fulfillment for the Diploma in
Engineering, is his own work carried out under my guidance and is worthy
of examination.

I further certify that this work has not been submitted to any other college
for the purpose of degree or diploma.

DATE: - Place:-Nagothone

. Swaranjali Mr. Sagar Surekar Mr. P.P. Jain


Lokhande

(Project Guide) (H.O.D) (Principal)


ACKNOWLEDGEMEMT

It is with profoundly sense of gratitude that we acknowledge from our guide Mr.
Sagar Surekar he has been guide in the true sense of word a guide who
satisfaction from our word & progress.

We are highly obliged Mr. Sagar Surekar of Department for aberrance & good co-
operation given to us fur bringing this project to almost standard.

We are grateful to our principal Mr. P.P. Jain for proceeding acknowledgement to us
in the connection of this project concluding. We appreciate the assistance of all staff
that helps us in for their sincere& obliging help to make our project successfully.
PREFACE

We the student of second Year Computer Engineering (S.S.O.S.P. COLLEGE


OFDIPLOMA ENGG) have a great pleasure in presenting our report on our project on.
“Project Report On Servlets”

Consistent with the level of presentation every effort has been made to ensure that the
material included in the report is state of art and in the current expectation of the direct of
future development.

This report has covered as much as it could and especially all the important points
about our project. The Information in this report is accurate and great care has been taken
about the face and figures mentioned in this report.

All the information that could be brought before you have been provided in this
report. The synopsis has been a joint effort of all members of our group and I am thank full
to them for their co-operation.
.

Part A
Micro-Project Proposal

1. 0 Brief introduction:

Today we all are aware of the need of creating dynamic web pages i.e the oneswhich have the
capability to change the site contents according to the time orare able to generate the contents
according to the request received by the client.If you like coding in Java, then you will be
happy to know that using Java therealso exists a way to generate dynamic web pages and that
way is Java Servlet.But before we move forward with our topic let’s first understand the need
forserver-side extensions.Servlets are the Java programs that run on the Java-enabled web
server orapplication server. They are used to handle the request obtained from thewebserver,
process the request, produce the response, then send a response backto the
webserver.Properties of Servlets are as follows:
 Servlets work on the server-side.
 Servlets are capable of handling complex requests obtained from thewebserver.Servlet
Architecture is can be depicted from the image itself as provided belowas follows:
Execution of Servlets basically involves six basic steps:

1.The clients send the request to the webserver.2.The web server receives the
request.3.The web server passes the request to the corresponding servlet.4.The
servlet processes the request and generates the response in the formof
output.5.The servlet sends the response back to the webserver.6.The web server
sends the response back to the client and the client browserdisplays it on
the screen.

Now let us do discuss eccentric point that why do we need For Server-
Sideextensions?

The server-side extensions are nothing but the technologies that are used tocreate
dynamic Web pages. Actually, to provide the facility of dynamic Web pages, Web
pages need a container or Web server. To meet this requirement , independent
Web server providers offer some proprietary solutions in the form of
APIs(Application Programming Interface).

These API s allow us to build programs that can run with a Web server. In this
case , Java Servlet is also one of the component APIs of Java Platform Enterprise
Edition which sets standards for creating dynamic Web applications in Java.
Before learning about something, it’s important to know the need for that
something , it’s not like that this is the only technology available for creating
dynamic Web pages.

The Servlet technology is similar to other Web server tensions such asCommon
Gateway Interface(CGI) scripts and Hypertext Preprocessor (PHP). However,
Java Servlets are more acceptable since they solve the limitations of CGI
such as low performance and low degree scalability.
What is CGI?CGI is actually an external application that is written by using any
of the programming languages like C or C++

It then creates a new process to service the client’s request.


 Invokes the CGI applicaon within the process and passes the
requestinformaon to the applicaion.
 Collects the response from the CGI applicaon.
 Destroys the process, prepares the HTTP response, and sends it to theclient.
So, in CGI
server has to create and destroy the process for every request. It’seasy
to understand that this approach is applicable for handling few clients butas
the number of clients increases, the workload on the server increases and so
the time is taken to process requests increases.
Servlets API’s :
o Servlets are build from two packages:
o javax.servlet (Basic)
o javax.servlet.http(Advance)Various classes and interfaces present in these
packages are:
Reliability
o Faster Speeds: IPv6 supports multicast rather than broadcast in
IPv4.Thisfeature allows bandwidth-intensive packet flows (like multimedia
streams) to be sent to multiple destinations all at once.
Advantages of a Java Servlet

o Servlet is faster than CGI as it doesn’t involve the creaon of a


newprocess for every new request received.
o Servlets, as writen in Java, are platorm -independent.
o Removes the overhead of creatng a new process for each request as
Servlet doesn’t run in a separate process. There is only a single instance
that handles all requests concurrently. This also saves the memory
andallows a Servlet to easily manage the client state.
o It is a server-side component, so Servlet inherits the security provided by
the Web server.
o The API designed for Java Servlet automatcally acquires the advantages
of the Java plaorms such as platorm-independent and portability.
Inadditon, it obviously can use the wide range of APIs created on Java
platorms such as JDBC
o to access the database.
o Many Web servers that are suitable for personal use or low-travc websites
are orered for free or
o At extremely cheap costseg. Java servlet. However, the majority of
commercial-grade Web servers are rather expensive, with the
o notable excepon of Apache, which is free.
3.0 Resources Required:

Sr. No. Name of resources Specifications Quantity


/material

1. Operating system Windows 10 10-15

2. MS word Microsoft 2010 1

3. Internet 2400 mbps 1

4. SSD 512 SSD 1

5. Paper A4 As per requirement


Advantages of a Java Servlet

 Servlet is faster than CGI as it doesn’t involve the creaon of a


newprocess for every new request received.

 Servlets, as written in Java, are platform-independent.

 Removes the overhead of creating a new process for each request


asServlet doesn’t run in a separate process. There is only a single
instance that handles all requests concurrently. This also saves the
memory and allows a Servlet to easily manage the client state.

 It is a server-side component, so Servlet inherits the security


provided by the Web server.

 The API designed for Java Servlet automatcally acquires the


advantages of the Java platorms such as plaorm-independent
and portability. In additon, it obviously can use the wide range of
APIs created on Javaplatorms such as JDBC to access the
database.

 Many Web servers that are suitable for personal use or low-trac
websites are orered for free or at extremelycheap costs
eg. Java servlet.However, the majority of commercial-grade Web
servers are ratherexpensive, with the notable excepon
of Apache, which is free.

+
HTML

Introduction On HTML In Java

HTML
stands for Hyper Text Markup Language. It is used to design web
pages using a markup language. HTML is the combination of
Hypertext and Markup language. Hypertext desnes the link between
web pages. A markup language is used to defne the text document
within the tag which defines the structure of web pages. This language
is used to annotate (make notes for the computer)text so that a
machine can understand it and manipulate text accordingly. Most
markup languages (e.g. HTML) are human-readable. The language
uses tags to define what manipulation has to be done on the
text.HTML is a markup language used by the browser to manipulate
text, images, and other content, in order to display it in the required
format. HTML was created by Tim Berners-Lee in 1991. The first-
ever version of HTML was HTML1.0, but the first standard version
was HTML 2.0, published in 1995.
<!DOCTYPE html>: This is the document type declaration (not technically a
tag). It declares a document as being an HTML document. The doctype
declaration is not case-sensitive

<html>: This is called the HTML root element. All other elements are
contained within it.

<head>: The head tag contains the “behind the scenes” elements for a webpage.
Elements within the head aren’t visible on the front-end of a webpage. HTML
elements used inside the <head> element include:

 <style>-This html tag allows us to insert styling into our webpages and
make them appealing to look at with the help of CSS.

 <title>-The title is what is displayed on the top of your browser when


you visit a website and contains title of the webpage that you are
viewing.

 <base>-It specifies the base URL for all relative URL’s in a document.

 <noscript>– Defines a section of HTML that is inserted when the


scripting has been turned off in the users browser.

 <script>-This tag is used to add functionality in the website with the help
of JavaScript.

 <meta>-This tag encloses the meta data of the website that must be
loaded every time the website is visited. For eg:- the metadata charset
allows you to use the standard UTF-8 encoding in your website. This in
turn allows the users to view your webpage in the language of their
choice. It is a self closing tag.
 <link>– The ‘link’ tag is used to tie together HTML, CSS and JavaScript.
It is self closing.
Source Code:

index.html:

<!DOCTYPE html>
<html>
<head>
<title>Create you Resume Here!</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
</head>
<body bgcolor="Silver">

<H1 style="color:slateblue;"> Personal Information</H1><br>


<form action="Resume" method="post">
Your Name : <input type="text" name="name"/><br/>
Fathers Name : <input type="text"
name="fathersname"/><br/> Residential Address : <input
type="text" name="address"/><br/> Phone Number : <input
type="text" name="phonenumber"/><br/> Email ID : <input
type="text" name="emailid"/><br/>
Date of Birth: D <select name="Date">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
M <select name="Month">
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
Y <select name="Year">
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
</select><br>
<h1 style="color:slateblue;"> Qualification Related
Information: </h1><br>
<h3 style="color:slateblue;">Graduation</h3><br> Course:
<input type="text" name="Course1"/> <br>
Grade:<select name="Grade1">
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="B1">B1</option>
<option value="B2">B2</option>
<option value="C1">C1</option>
<option value="C2">C2</option>
<option value="D">C</option>
<option value="E">E</option>
</select>
Passing Year : <input type="text"
name="passingyear1"/><br/>
<h3 style="color:slateblue">Intermediate: </h3><br> Course:
<input type="text" name="Course2"/> <br> Grade:<select
name="Grade2">
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="B1">B1</option>
<option value="B2">B2</option>
<option value="C1">C1</option>
<option value="C2">C2</option>
<option value="D">C</option>
<option value="E">E</option>
</select>
Passing Year : <input type="text"
name="passingyear2"/><br/>
<h3 style="color:slateblue">Matriculation: </h3><br> Course:
<input type="text" name="Course3"/><br> Grade:<select
name="Grade3">
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="B1">B1</option>
<option value="B2">B2</option>
<option value="C1">C1</option>
<option value="C2">C2</option>
<option value="D">C</option>
<option value="E">E</option>
</select>
Passing Year : <input type="text"
name="passingyear3"/><br/>

<h1 style="color:slateblue;"> Experience: </h1><br>

Organization name : <input type="text" name="org1"/>


Designation : <input type="text" name="desig1"/> Years of
Experience: <select name="Years1">
<option value="<1"><1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value=">10">>10</option>
</select> <br>
Organization name : <input type="text" name="org2"/>
Designation : <input type="text" name="desig2"/> Years of
Experience:<select name="Years2">
<option value="<1"><1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value=">10">>10</option>
</select> <br>
Organization name : <input type="text" name="org3"/>
Designation : <input type="text" name="desig3"/> Years of
Experience:<select name="Years3">
<option value="<1"><1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value=">10">>10</option>
</select><br>
<h1 style="color:slateblue;"> Skills: </h1><br>
Programming Languages Known: <br><input type="radio"
name="lang1" value="C" />C
<br>
<input type="radio" name="lang2" value="C++" />C++<br>
<input type="radio" name="lang3" value="Java" />Java<br>
<input type="radio" name="lang4" value="JavaScript"
/>JavaScript<br>
<input type="radio" name="lang5" value="Python"
/>Python<br>
<input type="radio" name="lang6" value="C#" />C#<br>
<input type="radio" name="lang7" value="HTML-CSS"
/>HTML-CSS<br> Any other <input type="text"
name="lang8" /><br>
<br>
<input type="submit" value="Generate Resume"/>
</form>
</body>
</html>

Servlet:
import java.io.IOException; import java.io.PrintWriter;
import javax.servlet.ServletException; import
javax.servlet.annotation.WebServlet; import
javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import
javax.servlet.http.HttpServletResponse;
@WebServlet("/Resume")
public class Resume extends HttpServlet { @Override
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException
{
String name=request.getParameter("name");
String fathername=request.getParameter("fathersname"); String
address=request.getParameter("address");
String phonenumber =request.getParameter("phonenumber");
String emailid=request.getParameter("emailid");
String date=request.getParameter("Date"); String
month=request.getParameter("Month"); String
year=request.getParameter("Year");
String course1=request.getParameter("Course1"); String
course2=request.getParameter("Course2"); String
course3=request.getParameter("Course3"); String
grade1=request.getParameter("Grade1"); String
grade2=request.getParameter("Grade2"); String
grade3=request.getParameter("Grade3"); String
py1=request.getParameter("passingyear1"); String
py2=request.getParameter("passingyear2"); String
py3=request.getParameter("passingyear3"); String
org1=request.getParameter("org1");
String desig1=request.getParameter("desig1"); String
Years1=request.getParameter("Years1"); String
org2=request.getParameter("org2"); String
desig2=request.getParameter("desig2"); String
Years2=request.getParameter("Years2"); String
org3=request.getParameter("org3"); String
desig3=request.getParameter("desig3"); String
Years3=request.getParameter("Years3"); String
h1=request.getParameter("h1");
String h2=request.getParameter("h2"); String
h3=request.getParameter("h3");
String h4=request.getParameter("h4"); String
r1=request.getParameter("lang1"); String
r2=request.getParameter("lang2"); String
r3=request.getParameter("lang3"); String
r4=request.getParameter("lang4"); String
r5=request.getParameter("lang5"); String
r6=request.getParameter("lang6"); String
r7=request.getParameter("lang7"); String
r8=request.getParameter("lang8");
response.setContentType("text/html"); PrintWriter out =
response.getWriter(); out.print("<h1>Resume</h1> <br/>");
out.print("<h3><u>Personal Information</u></h3><br/>");
out.print("Name :"+name+"<br>");
out.print("Father's name : "+ fathername +"<br/>");
out.print("Resisential Address : "+ address +"<br/>");
out.print("Contact Number : "+ phonenumber +"<br/>");
out.print("Email Address : "+ emailid +"<br/>");
out.print("Date of Birth :"+date+ " "+month+" "+year);
out.print("<h3><u>Qualification Related
Information</u></h3><br/>");
out.print("<h2><b>Graduation:</b></h2><br/>");
out.print("Course : "+course1+"<br/>"); out.print("Grade :
"+grade1+"<br/>"); out.print("Year of Passing :
"+py1+"<br/>");
out.print("<h2><b>Intermediate:</b></h2><br/>");
out.print("Course : "+course2+"<br/>"); out.print("Grade :
"+grade2+"<br/>"); out.print("Year of Passing :
"+py2+"<br/>");
out.print("<h2><b>Matriculation:</b></h2><br/>");
out.print("Course : "+course3+"<br/>");
out.print("Grade : "+grade3+"<br/>"); out.print("Year of Passing :
"+py3+"<br/>"); out.print("<h3><u>Experience</u></h3><br/>");
out.print("Organisation's Name : "+org1+"<br/>");
out.print("Designation : "+desig1+"<br/>"); out.print("Years of
Experience: "+Years1+"<br/>"); out.print("Organisation's Name :
"+org2+"<br/>"); out.print("Designation : "+desig2+"<br/>");
out.print("Years of Experience: "+Years2+"<br/>");
out.print("Organisation's Name : "+org3+"<br/>");
out.print("Designation : "+desig3+"<br/>"); out.print("Years of
Experience: "+Years3+"<br/>");
out.print("<h3><u>Skills</u></h3><br/>");

out.print("Hobbies and Interests : <br>"+ h1+"<br>"+h2+"<br>"+h3+"

"+h4+"<br>"); String a="Any Other-";

out.print("Programming Languages Known : <br>"+

r1+"<br>"+r2+"<br>"+ r3+"<br>"+ r4+"<br>" + r5+"<br>"+

r6+"<br>"+ r7+"<br>"+a+" "+r8);

out.print("</body></html>")

}
 References:

1. https://www.google.com
2. www.geeksforgeeks.com
3. www.tutorialspoint.com
4. https://www.techtarget.com

You might also like