Documentation
File Naming
Files are named according to the following rules :
<ModuleName>_<ScreenName>_<Opperation>.jsp
For example:
Appointment_DeveloperAppointment_new.jsp
Appointment_ClientAppointment_new.jsp
Standart Operations are
_del.jsp delete a object and go to some useful page
_ins.jsp insert or update a object and go to some useful page
_new.jsp display a form to generate a new
object
_update.jsp display a form to modify an existing
object
_show.jsp show all information of a object
_select.jsp display a form to search for objects
_overview.jsp display a selection of objects
Directory Structure
and important files under /project1/ root directory
index.jsp
/html/ html displays
/jsp/ jsp files
/images/ all images
/includes/ all include files
/WEB-INF/web.xml
/WEB-INF/classes/com/project1/servlet/ servlets
/WEB-INF/classes/com/project1/base/ base objects
/WEB-INF/classes/com/project1/util/ usefull utils
/WEB-INF/classes/com/project1/database/ base objects with database methods
Architecture
Model-View-Controller (MVC) design pattern for web applications that
is commonly known as "Model 2". This nomenclature originated with a description
in the JavaServerPages Specification, version 0.92, and has persisted
ever since (in the absence of a better name).
Generally, a "Model 2" application is architected as follows:
- The user interface will generally be created with JSP pages, which
will not themselves contain any business logic. These pages represent
the "view" component of an MVC architecture.
- Forms and hyperlinks in the user interface that require business logic
to be executed will be submitted to a request URI that is mapped to the
controller servlet.
- There will be one instance of this servlet class,
which receives and processes all requests that change the state of
a user's interaction with the application. This component represents
the "controller" component of an MVC architecture.
- The controller servlet will select and invoke an action class to perform
the requested business logic.
- The action classes will manipulate the state of the application's
interaction with the user, typically by creating or modifying JavaBeans
that are stored as request or session attributes (depending on how long
they need to be available). Such JavaBeans represent the "model"
component of an MVC architecture.
- Instead of producing the next page of the user interface directly,
action classes will generally use the
RequestDispatcher.forward() facility of the servlet API
to pass control to an appropriate JSP page to produce the next page
of the user interface.
Contributors to this text:
|