Beruflich Dokumente
Kultur Dokumente
JSP :
• Do name the Name the servlet file with starting letter in capitals
and ends with the ‘Service’ to denote it as servlet.
• Naming should be in relevant to Jsp file.
• The void method should always be ‘service’ in it.
• The import methods like LinkedHashMap should be the starting
order.
• Then Group the object import classes, such as DAO and Bean.
• Then follows the Session variables.
• Once this gets completed, start with the Request Parameter to get
the values from jsp.
• After grouping it, do the setBean in it.
• All servlets should contain try, catch in it, with Exception
mentioned in it.
• Inside the try catch the procedure is set and need to the same for all
the servlets.
• Having said that, every request is needed to be checked for session
variables ex., save, update, delete etc.,(get the variable name from
DB organizer) if you didn’t get it.
• The name ‘action’ is what set for the parameters, which is needed
to be the same for all.
• The Servlets should contain the parameter name as clear as
possible.
• Please name the variables in accordance to the page and fields (At
least try to give comments for a specific naming of variables).
• Try to give comments as clear as possible without elaboration.
• Point is mentioned here as the servlet file procedure may take
changes at any point of time, as the requirement changes.
• Make sure that all the parameter is checked on, in accordance with
the mas_authentication_user table.
• The ExceptionDAO file is to be called on servlet too.
• Don’t do any part of calculations or evaluation in servlets, if
required, do it in DAO classes.
DAO:
• Be clear with naming the methods.
• The storage method be named as save, insert as a part of it.
• The manipulate method should be named as update, modify, edit as a
part of it.
• The Group of variables listed on jsp should be named as List as a part
of the method name.
• All methods should contain the Exception and con.commit in it.
• Name should start with caps and end with ‘DAO’ in it.
Bean :
JS:
• Js name should start with small letter only.