Professional Documents
Culture Documents
AJP Micro Project
AJP Micro Project
Institute
Of Technology Pune- 43
Affiliated to
Project Report
Submitted by:-
Servlets API’s:
Servlets are build from two packages:
javax.servlet(Basic)
javax.servlet.http(Advance)
Various classes and interfaces present in these packages are:
Component Type Package
Servlet Interface javax.servlet.*
ServletRequest Interface javax.servlet.*
ServletResponse Interface javax.servlet.*
GenericServlet Class javax.servlet.*
HttpServlet Class javax.servlet.http.*
HttpServletRequest Interface javax.servlet.http.*
HttpServletResponse Interface javax.servlet.http.*
Filter Interface javax.servlet.*
ServletConfig Interface javax.servlet.*
Advantages of a Java Servlet
HTML stands for HyperText Markup Language. It is used to design web pages
using a markup language. HTML is the combination of Hypertext and Markup
language. Hypertext defines the link between web pages. A markup language
is used to define 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 page structure: The basic structure of an HTML page is laid out below. It
contains the essential building-block elements (i.e. doctype declaration, HTML,
head, title, and body elements) upon which all web pages are created.
<!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.
<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">
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>");