Project Report
Project Report
Project Report
REPORT ON
“<RTO-Managment>”
Submitted By:
1. Vikas Gawande (8925)
2. Saurabh Kharkate (8889)
Submitted To
At
ASM‟s Institute of Business Management and Research,
Chinchwad, Pune – 19
Audyogik Shikshan Mandal‟s
(Society Regd. No. Maharashtra/ 1330/ Pune 83; Public Trust No. F-2451/ Pune 83)
INSTITUE OF BUSINESS MANAGEMENT AND RESEARCH, MCA, PUNE
Approved by AICTE, Govt. of India & Affiliated to Savitribai Phule Pune University
CERTIFICATE
By
1. Vikas Gawande (8925)
2. Saurabh Kharkate (8889)
Session 2023-2024
DECLARATION
Date:
(MCA I Semester)
Department of Master of Computer Application,
ASM’s Institute of Business Management and Research, MCA,
Chinchwad
Audyogik Shikshan Mandal‟s
(Society Regd. No. Maharashtra/ 1330/ Pune 83; Public Trust No. F-2451/ Pune 83)
INSTITUE OF BUSINESS MANAGEMENT AND RESEARCH, MCA, PUNE
Approved by AICTE, Govt. of India & Affiliated to Savitribai Phule Pune University
EXAMINER CERTIFICATE
of MCA, semester - I
HOD
(MCA Department)
effort. Honestly speaking, this project has turned me into a debtor. First and foremost,
I feel indebted to my guide and all the faculty members of Department of MCA,
ASM’s IBMR-MCA, Chinchwad for their valuable guidance, continuous support and
Finally, I would like to extend my thanks to all those who have contributed, directly
1.1 Introduction:
1.4 References :
https://platerecognizer.com/
https://parklio.com/
2)PROPOSED SYSTEM:
Software Environment:
Other - Docker
Hardware Environment:
Client Configuration:
Server Configuration:
CPU
Operating System: Linux
RAM :8GB Minimum
40GB Minimum Free Space on Drive
750MHz
2.2) Project Module:
1)Admin-
2)Users-
Users can register their vehicles information.
Users can apply for Driving License.
Users can view the status of License.
Users can change the password.
Users can VIEW/UPDATE Profile
2.3)Feasibility Study:
This project will be developed on computer, so first check
whether the technology is technically available or not. Now a day’s
computer interaction with any job becomes common for any kind of job or
work.
And because of increasing usage of Computer, Computer is also available
with a variety of hardware. Vendors can fulfill any type of hardware
requirement. The whole project is developed by some special tools or by
using languages and databases, which are also available in a variety.
Preliminary investigation of a system examines the feasibility of a
system that is useful to an organization. It is the first phase of system
development.
The main objective of this phase is to identify the current deficiencies
in the user’s environment and to determine which existing problem are
going to be solve in proposed system and also which new function needs to
be added in proposed system.
An important outcome of such preliminary investigation is to
determine whether the system that will meet all needed requirements.
Thus, three tests are carried out on the system namely operation,
technical and economical.
Any project is beneficial if and only satisfies the organization
requirement. For any new system setup, it only meets to be communicated
and work the other supporting system.
The new system meets all existing operations since it provides right
information at a right time to the right user. A Leigh man can easily operate
with the system. Technical Feasibility examines whether the technology
needed is available and if it is available then it feasible to carry out all
project activities.
The technical needs of a system include:
• The facility to produce outputs in a given time.
• Ability to process large number of transactions at a particular speed.
Giving response to users under certain conditions.
These technologies are available which helps to carry out the system
efficiently. Economic feasibility of a system examines whether the finance is
available for implementing the new system and whether the money spent is
recoverable the satisfaction. The cost involves is in designing and developing
a good investment for the organization. Thus, hardware requirements used
for proposed system are very standard. Moreover, by making use of proposed
system to carry out the work speedily will increase and also saves the
valuable time of an organization.
In the proposed system the finance is highly required for the installation
of the software’s which can also be recovered by implementing a better
system.
3) ANALYSIS & DESIGN:
3.1) Use-Case Diagram:
3.2) Data Flow Diagram:
3.3)ER Diagram:
3.4)Sequence Diagram:
3.5)Database Design:
3
3.5)Screen Layout:
3.5)Sample Code:
Controller:
UserRegistrationCtl:
package com.rto.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import com.rto.bean.BaseBean;
import com.rto.bean.UserBean;
import com.rto.exception.ApplicationException;
import com.rto.exception.DatabaseException;
import com.rto.exception.DuplicateRecordException;
import com.rto.model.UserModel;
import com.rto.util.DataUtility;
import com.rto.util.DataValidator;
import com.rto.util.PropertyReader;
import com.rto.util.ServletUtility
/**
* Servlet implementation class UserRegistrationCtl
*/
@WebServlet(name="UserRegistrationCtl",urlPatterns={"/register"})
public class UserRegistrationCtl extends BaseCtl {
private static final long serialVersionUID = 1L;
public static final String OP_SIGN_UP = "SignUp";
private static Logger log = Logger.getLogger(UserRegistrationCtl.class);
/**
* @see HttpServlet#HttpServlet()
*/
public UserRegistrationCtl() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected boolean validate(HttpServletRequest request)
{
boolean pass=true;
String username=request.getParameter("uname");
if(DataValidator.isNull(request.getParameter("name"))){
request.setAttribute("name",PropertyReader.getValue("error.require", "name"));
pass=false;
}
else if(!DataValidator.isName(request.getParameter("name")))
{
request.setAttribute("name",PropertyReader.getValue("error.name", "name"));
pass=false;
}
if(DataValidator.isNull(username)){
request.setAttribute("username", PropertyReader.getValue("error.require","username"));
pass=false;
}
if(DataValidator.isNull(request.getParameter("password"))){
request.setAttribute("password", PropertyReader.getValue("error.require", "password"));
pass=false;
}
else if(!DataValidator.isPassword(request.getParameter("password"))){
request.setAttribute("password", PropertyReader.getValue("error.password", "password"));
pass=false;
}
if(DataValidator.isNull(request.getParameter("emailid"))){
request.setAttribute("emailid", PropertyReader.getValue("error.require", "emailid"));
pass=false;
}
else if(!DataValidator.isEmail(request.getParameter("emailid"))){
request.setAttribute("emailid", PropertyReader.getValue("error.emailid", "emailid"));
pass=false;
}
if(DataValidator.isNull(request.getParameter("contact"))){
request.setAttribute("contact", PropertyReader.getValue("error.require", "contact"));
pass=false;
}
else if(!DataValidator.isPhoneNo(request.getParameter("contact"))){
request.setAttribute("contact", PropertyReader.getValue("error.invalid", "contact"));
pass=false;
}
return pass;
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
String op=DataUtility.getString(request.getParameter("operation"));
UserModel model=new UserModel();
int id=DataUtility.getInt(request.getParameter("id"));
if(id>0 || op!=null){
UserBean bean=null;
try {
bean = model.findByPK(id);
} catch (ApplicationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ServletUtility.setBean(bean, request);
}
ServletUtility.forward(getView(), request, response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
String op=DataUtility.getString(request.getParameter("operation"));
UserModel model=new UserModel();
int id=DataUtility.getInt(request.getParameter("id"));
System.out.println("Id in do psot"+id);
if(OP_SIGN_UP.equalsIgnoreCase(op))
{
UserBean bean=(UserBean)populateBean(request);
try {
System.out.println("in try sign up");
int pk = model.registerUser(bean);
System.out.println("value of pk is "+pk);
//System.out.println("in register");
bean.setId(pk);
request.getSession().setAttribute("UserBean", bean);
ServletUtility.setSuccessMessage("User Successfully Registered", request);
ServletUtility.forward(RTOView.User_Registration_View, request, response);
return;
} catch (DuplicateRecordException e) {
log.error(e);
ServletUtility.setBean(bean, request);
ServletUtility.setErrorMessage("Username already exist!!",request);
ServletUtility.forward(getView(), request, response);
} catch (ApplicationException e) {
ServletUtility.handleException(e, request, response);
e.printStackTrace();
return;
} catch (DatabaseException e) {
e.printStackTrace();
}
}else if (OP_RESET.equalsIgnoreCase(op)) {
ServletUtility.redirect(RTOView.User_Registration_Ctl, request, response);
return;
}
}
protected BaseBean populateBean(HttpServletRequest request) {
// TODO Auto-generated method stub
UserBean bean=new UserBean();
bean.setId(DataUtility.getInt(request.getParameter("id")));
bean.setUserName(DataUtility.getString(request.getParameter("uname")));
bean.setName(DataUtility.getString(request.getParameter("name")));
bean.setPassword(DataUtility.getString(request.getParameter("password")));
bean.setEmailid(DataUtility.getString(request.getParameter("emailid")));
bean.setContactno(DataUtility.getString(request.getParameter("contact")));
bean.setRoleid(2);
populateDTO(bean, request);
return bean;
}
protected String getView() {
return RTOView.User_Registration_View;
}
}
Vehicle RegistartionCtl:
package com.rto.controller;
import java.io.IOException;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.rto.bean.BaseBean;
import com.rto.bean.VehicleBean;
import com.rto.exception.ApplicationException;
import com.rto.exception.DuplicateRecordException;
import com.rto.model.VehicleModel;
import com.rto.util.DataUtility;
import com.rto.util.DataValidator;
import com.rto.util.PropertyReader;
import com.rto.util.ServletUtility;
/**
* Servlet implementation class VehicleRegistrationCtl
*/
@WebServlet(name="VehicleRegistrationCtl",urlPatterns={"/ctl/VehicleRegister"})
public class VehicleRegistrationCtl extends BaseCtl {
private static final long serialVersionUID = 1L;
public static final String OP_SIGN_UP = "SignUp";
/**
* @see HttpServlet#HttpServlet()
*/
public VehicleRegistrationCtl() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
ServletUtility.forward(getView(), request, response);
}
@Override
protected boolean validate(HttpServletRequest request) {
// TODO Auto-generated method stub
boolean pass=true;
if(DataValidator.isNull(request.getParameter("typeofvehicle"))){
request.setAttribute("typeofvehicle", PropertyReader.getValue("error.require","typeofvehicle"));
pass=false;
}
if(DataValidator.isNull(request.getParameter("name"))){
request.setAttribute("name", PropertyReader.getValue("error.require","name"));
pass=false;
}
else if(!DataValidator.isName(request.getParameter("name"))){
request.setAttribute("name", PropertyReader.getValue("error.name","name"));
pass=false;
}
if(DataValidator.isNull(request.getParameter("modelname"))){
request.setAttribute("modelname", PropertyReader.getValue("error.require","modelname"));
pass=false;
}
else if(!DataValidator.isName(request.getParameter("modelname"))){
request.setAttribute("modelname",PropertyReader.getValue("error.name","modelname"));
pass=false;
}
return pass;
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
@Override
protected BaseBean populateBean(HttpServletRequest request) {
// TODO Auto-generated method stub
VehicleBean bean=new VehicleBean();
bean.setId(DataUtility.getInt(request.getParameter("id")));
bean.setTypeOfVehicle(DataUtility.getString(request.getParameter("typeofvehicle")));
bean.setOwnerName(DataUtility.getString(request.getParameter("name")));
bean.setRegistrationNo(DataUtility.getString(request.getParameter("regno")));
bean.setRegistrationDate(DataUtility.getDate(request.getParameter("dor")));
bean.setChassisNo(DataUtility.getString(request.getParameter("cno")));
bean.setModelName(DataUtility.getString(request.getParameter("modelname")));
populateDTO(bean, request);
return bean;
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
String op=DataUtility.getString(request.getParameter("operation"));
System.out.println("op is "+op);
VehicleModel model=new VehicleModel();
int id=DataUtility.getInt(request.getParameter("id"));
if(OP_SIGN_UP.equalsIgnoreCase(op)){
VehicleBean bean=(VehicleBean)populateBean(request);
try {
int pk=model.registerVehicle(bean);
request.getSession().setAttribute("VehicleBean", bean);
ServletUtility.setSuccessMessage("Vehicle Successfully Registered", request);
ServletUtility.forward(getView(), request, response);
return;
} catch (ApplicationException e) {
// TODO Auto-generated catch block
ServletUtility.handleException(e, request, response);
e.printStackTrace();
return;
} catch (DuplicateRecordException e) {
// TODO Auto-generated catch block
e.printStackTrace();
//log.error(e);
ServletUtility.setBean(bean, request);
ServletUtility.setErrorMessage("Vehicle already Exist",
request);
ServletUtility.forward(getView(), request, response);
}
}
}
@Override
protected String getView() {
// TODO Auto-generated method stub
return RTOView.Vehicle_Registration_View;
}
}
LicenseRegistartionCtl:
package com.rto.controller;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Blob;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import javax.sql.rowset.serial.SerialBlob;
import javax.sql.rowset.serial.SerialException;
import org.apache.lucene.util.IOUtils;
import com.rto.bean.BaseBean;
import com.rto.bean.LicenceBean;
import com.rto.exception.ApplicationException;
import com.rto.exception.DuplicateRecordException;
import com.rto.model.LicenceModel;
import com.rto.util.DataUtility;
import com.rto.util.DataValidator;
import com.rto.util.PropertyReader;
import com.rto.util.ServletUtility;
/**
*/
@MultipartConfig(maxFileSize = 16177215)
@WebServlet(name="LicenceRegisterCtl",urlPatterns={"/ctl/Licence"})
/**
* @see HttpServlet#HttpServlet()
*/
public LicenceRegisterCtl() {
super();
/**
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
/**
*/
@Override
bean.setId(DataUtility.getInt(request.getParameter("id")));
bean.setApplicantName(DataUtility.getString(request.getParameter("applicantname")));
bean.setGender(DataUtility.getString(request.getParameter("gender")));
bean.setDob(DataUtility.getDate(request.getParameter("dob")));
bean.setPlaceOfBirth(DataUtility.getString(request.getParameter("pob")));
bean.setAddress(DataUtility.getString(request.getParameter("address")));
bean.setTypeOfLicence(DataUtility.getString(request.getParameter("licence")));
bean.setStatus(" ");
InputStream inputStream=null;
Blob blob=null;
try {
Part filepart=request.getPart("photo");
inputStream =filepart.getInputStream();
inputStream.read(b);
try {
} catch (SerialException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
e.printStackTrace();
bean.setPhoto(blob);
populateDTO(bean, request);
return bean;
@Override
boolean pass=true;
if(DataValidator.isNull(request.getParameter("applicantname"))){
request.setAttribute("applicant",
PropertyReader.getValue("error.require","Name of Applicant"));
pass=false;
else if(!DataValidator.isName(request.getParameter("applicantname"))){
request.setAttribute("name", PropertyReader.getValue("error.name","name"));
pass=false;
if ("-----Select-----".equalsIgnoreCase(request.getParameter("gender"))) {
request.setAttribute("gender",
PropertyReader.getValue("error.require", "Gender"));
pass = false;
if (DataValidator.isNull(request.getParameter("dob"))) {
request.setAttribute("dob",
pass = false;
} else if (!DataValidator.isDate(request.getParameter("dob"))) {
pass = false;
if(DataValidator.isNull(request.getParameter("pob"))){
request.setAttribute("pob", PropertyReader.getValue("error.require","Place of
Birth"));
pass=false;
else if(!DataValidator.isName(request.getParameter("pob"))){
request.setAttribute("name", PropertyReader.getValue("error.name","name"));
pass=false;}
if(DataValidator.isNull(request.getParameter("address"))){
request.setAttribute("name",
PropertyReader.getValue("error.require","Address"));
pass=false;
else if(!DataValidator.isName(request.getParameter("address"))){
request.setAttribute("name", PropertyReader.getValue("error.name","name"));
pass=false;
if ("-----Select-----".equalsIgnoreCase(request.getParameter("licence"))) {
request.setAttribute("licence",
PropertyReader.getValue("error.require", "Licence"));
pass = false;
return pass;
System.out.println("helloe");
String op=DataUtility.getString(request.getParameter("operation"));
System.out.println("in op of dopost"+op);
int id=DataUtility.getInt(request.getParameter("id"));
if(OP_SIGN_UP.equalsIgnoreCase(op)){
LicenceBean bean=(LicenceBean)populateBean(request);
inputStream =filepart.getInputStream();*/
try {
int pk=model.registerApplicant(bean);
request.getSession().setAttribute("LicenceBean", bean);
return;
} catch (ApplicationException e) {
e.printStackTrace();
} catch (DuplicateRecordException e) {
e.printStackTrace();
ServletUtility.setBean(bean, request);
request);
} catch (SQLException e) {
e.printStackTrace();
@Override
return RTOView.Licence_Registration_View;
ChangePasswordCtl:
package com.rto.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.rto.bean.BaseBean;
import com.rto.bean.UserBean;
import com.rto.exception.ApplicationException;
import com.rto.exception.RecordNotFoundException;
import com.rto.model.UserModel;
import com.rto.util.DataUtility;
import com.rto.util.DataValidator;
import com.rto.util.PropertyReader;
import com.rto.util.ServletUtility;
/**
*/
@WebServlet(name="ChangePasswordCtl",urlPatterns="/ctl/ChangePasswordCtl")
/**
* @see HttpServlet#HttpServlet()
*/
public ChangePasswordCtl() {
super();
/**
*/
@Override
boolean pass=true;
String op=DataUtility.getString(request.getParameter("operation"));
if (DataValidator.isNull(request.getParameter("old"))) {
pass = false;
}else if (!DataValidator.isPassword(request.getParameter("old"))) {
return false;
}
if (DataValidator.isNull(request.getParameter("new"))) {
pass = false;
} else if (!DataValidator.isPassword(request.getParameter("new"))) {
return false;
return pass;
@Override
bean.setPassword(DataUtility.getString(request.getParameter("old")));
bean.setPassword(DataUtility.getString(request.getParameter("new")));
return bean;
}
/**
*/
HttpSession session=request.getSession();
String op=DataUtility.getString(request.getParameter("operation"));
UserBean bean=(UserBean)session.getAttribute("user");
String newPass=request.getParameter("new");
String oldPass=request.getParameter("old");
int id=bean.getId();
if(OP_SAVE.equalsIgnoreCase(op)){
try {
boolean flag=model.changepassword(id,oldPass,newPass);
if (flag == true) {
bean = model.findByLogin(bean.getUserName());
session.setAttribute("user", bean);
ServletUtility.setBean(bean, request);
ServletUtility.setSuccessMessage("Password changed
Successfully", request);
} catch (RecordNotFoundException e) {
} catch (ApplicationException e) {
e.printStackTrace();
@Override
return RTOView.CHANGE_PASS_VIEW;
VehicleBean:
package com.rto.bean;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name="r_vehicle")
public class VehicleBean extends BaseBean {
@Column(name="typeofvehicle",length=45)
@Column(name="ownername",length=45)
@Column(name="registrationno", length=45)
@Column(name="registrationdate")
@Column(name="chassisno", length=45)
@Column(name="modelname", length=45)
return typeOfVehicle;
this.typeOfVehicle = typeOfVehicle;
}
public String getOwnerName() {
return ownerName;
this.ownerName = ownerName;
return registrationNo;
this.registrationNo = registrationNo;
return registrationDate;
this.registrationDate = registrationDate;
return chassisNo;
}
this.chassisNo = chassisNo;
return modelName;
this.modelName = modelName;
LicenseBean:
package com.rto.bean;
import java.io.InputStream;
import java.sql.Blob;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name="r_licence")
public class LicenceBean extends BaseBean{
@Column(name="applicantname",length=45)
@Column(name="gender",length=45)
@Column(name="dob",length=45)
@Column(name="status")
@Column(name="placeofbirth",length=45)
@Column(name="address",length=145)
@Column(name="typeoflicence",length=45)
@Column(name="photo")
return applicantName;
}
this.applicantName = applicantName;
return gender;
this.gender = gender;}
return dob;
this.dob = dob;
return placeOfBirth;
this.placeOfBirth = placeOfBirth;
return address;}
this.address = address;
this.typeOfLicence = typeOfLicence;
return photo;
this.photo = inputStream;
return status;
this.status = status;
}
4:CONCLUSION:
4.1)Limitation & Conclusion:
Limitation:
Futures Enhancement:
In future we can expand this project on the web.
We can make another module where can generate the License card to user.
Limitation :
In this, we have only one admin section. In future we can make another login for
officers.
Conclusion: