Developing Web Applications, Servlets, and JSPs for WebLogic Server
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The following sections contain BEA best practices for designing, developing, and deploying WebLogic Web applications and application resources:
The following are CGI best practices with respect to calling a subscript:
Consider the following best practices when writing HTTP servlets:
WEB-INF/classes
directory of your Web Application.web.xml
).init()
method of the servlet is called. All servlets are reloaded when a modified servlet class is discovered due to the possibility that there are interdependencies among the servlet classes.You can set the interval (in seconds) at which WebLogic Server checks the time stamp with the Servlet Reload
attribute. This attribute is set on the Files
tab of your Web Application, in the Administration Console. If you set this attribute to zero, WebLogic Server checks the time stamp on every request, which can be useful while developing and testing servlets but is needlessly time consuming in a production environment. If this attribute is set to -1
, WebLogic Server does not check for modified servlets.
For a complete explanation on how to avoid JSP recompilation, see Avoiding Unnecessary JSP Compilation and specifically the section called Scenarios that Cause Recompilation of JSPs.
J2EE provides the class javax.servlet.ServletResponseWrapper
, which you can subclass in your Servlet to adapt its response.
BEA recommends that if you create your own response wrapper by subclassing the ServletResponseWrapper
class, you should always override the flushBuffer()
and clearBuffer()
methods. Not doing so might result in the response being committed prematurely.
![]() |
![]() |
![]() |