Java Mpro 1 - Merged
Java Mpro 1 - Merged
BRAHMAVALLEYCOLLEGEOFTECHNICALEDUCATION,
ANJANERI, NASHIK
DepartmentofComputerTechnology
PROJECTWORKBOOKYEAR
2024 -2025
ProjectTitle:“CurrencyConverterusingServlet”
ProjectGuide:Prof.S.A.Bhamare
1
MAHARASHTRASTATE
BOARDOFTECHNICALEDUCATION(MSBTE),MUMBAI
BrahmaValleyCollegeofTechnicalEducation,Anjaneri,Nashik
Department of Computer Technology
2024-2025
A
ProjectReport
On
[CurrencyConverterusingServlet]
By
[PrathameshKadve][420951]
[Utkarsh Pawar][420923]
[Vishal Sharma][420984]
Undertheguidanceof
[Prof.S.A.Bhamare]
2
BrahmaValleyCollegeofTechnicalEducation,
Anjaneri, Nashik
DepartmentofComputerTechnology
CERTIFICATE
Thisistocertifythat
[Prathamesh Kadve]
[Utkarsh Pawar]
[Vishal Sharma]
havesuccessfullycompletedtheirProjecton“CurrencyConverterusingServlet”at
Brahma Valley College of Technical Education, Anjaneri, Nashik in the
partial fulfillment of the Diploma course in Computer Technologyin the
academic Year 2024-2025.
Prof.
Prof.S.A.Bhamare External
Guide
We would like to deeply thank the various people who, during the several months which this
endeavor lasted, provided us with usefuland helpful assistance. Without care and consideration,
this seminar would likely not have matured.
First we would like to thank our project guide Head of Dept. Prof. M. M. Kulkarni Sir for his
guidance and interest. His guidance reflects expertise we certainly do not master ourselves. We
alsothank himfor his patience throughout, in cross-reviewing which constitutesa rather difficult
balancing act.
Second,wewouldliketothanktosubteacherProf.S.A.Bhamare alltheStaffMembersofComputer
Department for providing us their admirable feedback and insights whenever we discussed our
projectwiththem.Wealsoextendourthankstoourlabassistantswhoguidedusinimplementation of our
seminar.
We would like to extend my special thanks to our Principal, Prof. V. P. Nikhadefor his
encouragement and words of wisdom.
Finally, We express our deepest gratitude to our familyand friends who encouraged us since the
beginning and provided us with their insightfulreviews to help me make my Project successful.
[PrathameshKadve]
[Utkarsh Pawar]
[Vishal Sharma]
4
Index
1. Abstract 4
2. Introduction 5
3 Concept 6
4. TestCaseTemplate 7
5. TestCases 9
6. Conclusion 11
7. References 12
5
Introduction
6
LiteratureReview
WhatisServlet?
We studied about Servlet for developing the currency converter. Servlet technology is
used to create a web application (resides atserver side and generates a dynamic web page).
Servlettechnologyisrobustandscalablebecauseofjavalanguage.Therearetwotypesofservlet:1.
GenericServlet and 2. HttpServlet.
WhatisHTTPServlet?
In this project HttpServlet is used. The HttpServlet class extends the GenericServlet
class and implements Serializable interface. It provides HTTP specific methods such as doGet,
doPost, doHead, doTrace etc.
MethodsareusedtocreateServlet?
GeneralReview:-
Viewedmanyexistingconvertorsandvaluesofanothercountrycurrencyforcalculating
Rupees to Dollar, Euro ,Pounds and Rubal collecting the information about the project.
Searched on internetabout the flow ofprocedurethat we include inour program.
Books:
BookName:CompleteReference
Author: Schildt,Herbert
Publisher:McgrawHillEducation.
7
Aimofthemicroproject
DevelopCurrencyConvertorUsingServlet
8
CourseOutcomesAchieved
DevelopaprogramusingServlet.
ProgramusingGUIframework(AWT andSwing)
HandleEventsofAWTandSwing Components
EventsinJavaProgramming
ProgramusingFileHandling
ProgramusingDatabase
FileHandlingtoDatabaseandViceVersa
9
ActualResourcesUsed
1. Hardware: Computer(i3-i5Preferable),minimum 1
2GB RAM and onwards
ComputerSystem
3. Software Notepad 1
JDKsetup
ApacheTomcat9
10
ProgramCode
1. HTML CODE:
<!DOCTYPEhtml>
<html>
<head>
<title>CurrencyConvertor</title>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
</head>
<body>
<h1>Wel-comeToCurrencyConverter</h1>
<br>
<br>
<inputtype='submit'name='submit'value='Convert'>
</form>
</body>
</html>
11
2. JavaHttpSevletProgram:
importjavax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
publicclassDollarextendsHttpServlet
publicvoiddoGet(HttpServletRequestreq,HttpServletResponseres)throws
IOException,ServletException
PrintWriter pr=res.getWriter();
res.setContentType("text/html");
try
intx=Integer.parseInt(req.getParameter("t1"));
pr.println("TheDollarvalueis="+(x/70.83));
pr.println("<br>");
pr.println("TheEurovalueis="+(x/77.76));
pr.println("<br>");
pr.println("TheRublevalueis="+(x/1.10));
12
pr.println("<br>");
pr.println("ThePoundvalueis="+(x/87.32));
catch(Exceptione)
pr.println("InvalidInput");
3. XMLcode:
<web-app>
<servlet>
<servlet-name>Dollar</servlet-name>
<servlet-class>Dollar</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Dollar</servlet-name>
<url-pattern>/Dollar</url-pattern>
</servlet-mapping>
</web-app>
13
OutputofTheMicroProject
14
15
SkillsDeveloped/
LearningoutofthisProj
ect
ProgramusingGUIframework(AWTandSwing)
EventsinJavaProgramming
ProgramusingFileHandling
ProgramusingDatabase
FileHandlingtoDatabaseandViceVersa
16
ApplicationOfThisProject
currencyconversionintheshoppingcart
userfriendly
lesshumanresourcerequired
providessecurity
Acurrencyconverterisalsoverycrucialtohelpusers
Easymethodforusertoconvert currency
17
References:
Websites:
https://www.geeksforgeeks.org/introduction-java-servlets/
https://www.tutorialspoint.com/servlets/servlets-auto-refresh.htm
18