if (servlet == null || servlet.getServletContext() == null
|| servlet.getServletContext().getMajorVersion() < 3) {
factory = new SlingHttpServletRequestFactory() {
public SlingHttpServletRequest createRequest(RequestData requestData, HttpServletRequest request) {
return new SlingHttpServletRequestImpl(requestData, request);
}
};
} else {
factory = new SlingHttpServletRequestFactory() {
public SlingHttpServletRequest createRequest(RequestData requestData, HttpServletRequest request) {