Projects:Tomcat 7 Support/Technical Specifications
Contents |
Overview
The goal of this project is to enable Openbravo to be deployed on Tomcat 7.
Prerequisites
Weld needs to be updated, due to an issue in this library, current version does not support Tomcat 7. See 27244.
Servlet API 3.0
Tomcat 6 implements Servlet 2.5 specification whereas Tomcat 7 implements 3.0 specification.
In order to facilitate module compatibility, all code will still require to be compatible with 2.5 specs, this is, it will not be allowed to use 3.0 specs' capabilities.
But to allow a natural eclipse project definition, were servlet api is obtained from defined server, some changes are required in code to be adapted to 3.0 spec. Finally, when using eclipse with Tomcat 7, 3.0 specs will be available but they won't when compiling from command line.
API changes
In order to make code compatible with both Servlet APIs (2.5 and 3.0) some changes are required some infrastructural classes. These classes are not usually directly used by implementations.
Here is the list of changes:
- Missing classes
- org.openbravo.client.kernel.RequestContext.HttpServletResponseWrapper
- org.openbravo.client.kernel.RequestContext.LocalServletContext
- Missing methods
- org.openbravo.client.kernel.BaseKernelServlet.KernelHttpServletResponse
- default constructor: use KernelHttpServletResponse(javax.servlet.http.HttpServletResponse) constructor instead
- setDelegate(javax.servlet.http.HttpServletResponse): use new constructor instead
- org.openbravo.client.kernel.RequestContext.HttpServletRequestWrapper
- default constructor: use HttpServletRequestWrapper(javax.servlet.http.HttpServletRequest) constructor instead
- setDelegate(javax.servlet.http.HttpServletRequest): use new construcor instead
- org.openbravo.client.kernel.BaseKernelServlet.KernelHttpServletResponse
- Changes in return types:
- org.openbravo.client.kernel.RequestContext.HttpServletRequestWrapper
- getAttributeNames() return type: java.util.Enumeration<?> --> java.util.Enumeration<java.lang.String>
- getHeaderNames() return type: java.util.Enumeration<?> --> java.util.Enumeration
- getHeaders(java.lang.String) return type: java.util.Enumeration<?> --> java.util.Enumeration
- getLocales() return type: java.util.Enumeration<?> --> java.util.Enumeration
- getParameterMap() return type: java.util.Map<?, ?> --> java.util.Map
- getParameterNames() return type: java.util.Enumeration<?> --> java.util.Enumeration<java.lang.String>
- org.openbravo.client.kernel.RequestContext.HttpSessionWrapper
- getAttributeNames() return type: java.util.Enumeration<?> --> java.util.Enumeration<java.lang.String>
- org.openbravo.client.kernel.RequestContext.HttpServletRequestWrapper