!--a11y-->
Checklist for J2EE Web
Applications 
J2EE Web Application Development
|
Do you plan to perform specific initializations or other time-consuming actions that need to be done once for the servlet’s lifetime? We recommend that you perform those actions using the init() method of the servlet. This method is called once per servlet’s life cycle. |
|
Do you use enterprise beans or other external resources such as DataSource objects for database access, JMS factories and so on in your Web application? You need to define references to those resources in the deployment descriptors of your Web application. Otherwise, you are not able to look those resources up in your servlet or JSP. |
|
Do you use HTTP session failover in your Web application? If yes, than remember that objects that you store in the HTTP session must be serializable. The only exceptions to this rule are the following: · References to enterprise bean interfaces · Reference to javax.ejb.SessionContext · Reference to naming contexts · Reference to javax.transaction.UserTransaction. |
|
Do you need failover for your application? To enable failover, you can set the <fail-over-enable> tag in the application-j2ee-engine.xml of your enterprise application. |
|
Do you need to restrict access to particular set of resources in your Web application? Use the web.xml descriptor of your Web application to define the constraints. |
|
Do you use security roles for a role-based access to your servlets or JSPs? Use the web-j2ee-engine.xml descriptor to map the declarative security role to a real, server-side security role. This implies that you have to define the server-side role using the Security Provider service on the J2EE Engine. |
|
Did you define a context root for your Web application in the application.xml in your enterprise application (EAR file)? This context root string is used in the URL that calls your Web application. Note that the context root string must be unique (that is, no other Web application deployed on the server should have the same context root). Otherwise, you are not able to deploy your Web application. |
|
Do you use the PrintWriter and the ServletOutputStream objects in the same request-response cycle in your servlets or JSPs? This is prohibited by the Java Servlet 2.3 specification. |
|
Do you use filters in your Web application? Use the web.xml deployment descriptor to define the filter classes and to determine the order the container calls them. |
|
Do you release objects such as DataSources, sockets, files, threads and so on that you have obtained in the init() method of the servlet or JSP? Use the destroy() method to release those resources. |