Fixed jsp's to be compatibel with Tomcat 7 and Jasper

git-svn-id: https://svn.libreccm.org/ccm/trunk@2650 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2014-05-23 09:35:04 +00:00
parent d9eee88edd
commit ae9f7503c0
4 changed files with 25 additions and 27 deletions

View File

@ -13,18 +13,17 @@
<jsp:scriptlet>
// Restore the wrapped request
request = DispatcherHelper.getRequest();
HttpServletRequest myRequest = DispatcherHelper.getRequest();
DispatcherHelper.cacheDisable(response);
ContentSection section =
ContentSectionServlet.getContentSection(request);
ContentSection section = ContentSectionServlet.getContentSection(myRequest);
if (! ContentSectionServlet.checkAdminAccess(request, section)) {
if (! ContentSectionServlet.checkAdminAccess(myRequest, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
}
RequestContext context = DispatcherHelper.getRequestContext(request);
RequestContext context = DispatcherHelper.getRequestContext(myRequest);
imageSelectPage.init();
imageSelectPage.dispatch(request, response, context);
imageSelectPage.dispatch(myRequest, response, context);
</jsp:scriptlet>
</jsp:root>

View File

@ -11,26 +11,26 @@
<jsp:declaration>
private ContentSectionPage sectionPage = new ContentSectionPage();
// private HttpServletRequest myRequest = DispatcherHelper.getRequest();
</jsp:declaration>
<jsp:scriptlet>
// Restore the wrapped request
request = DispatcherHelper.getRequest();
HttpServletRequest myRequest = DispatcherHelper.getRequest();
DispatcherHelper.cacheDisable(response);
ContentSection section =
ContentSectionServlet.getContentSection(request);
ContentSection section = ContentSectionServlet.getContentSection(myRequest);
if (Web.getWebContext().getUser() == null) {
throw new LoginSignal(request);
} else if (! ContentSectionServlet.checkAdminAccess(request, section)) {
throw new LoginSignal(myRequest);
} else if (! ContentSectionServlet.checkAdminAccess(myRequest, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
}
RequestContext context = DispatcherHelper.getRequestContext(request);
RequestContext context = DispatcherHelper.getRequestContext(myRequest);
sectionPage.init();
sectionPage.dispatch(request, response, context);
sectionPage.dispatch(myRequest, response, context);
</jsp:scriptlet>
</jsp:root>

View File

@ -22,18 +22,18 @@
<jsp:scriptlet>
s_log.debug("entered item.jsp's service method");
// Restore the wrapped request
request = DispatcherHelper.getRequest();
HttpServletRequest myRequest = DispatcherHelper.getRequest();
DispatcherHelper.cacheDisable(response);
request = DispatcherHelper.getRequest();
// ?? just doubles the initial line
// request = DispatcherHelper.getRequest();
ContentSection section =
ContentSectionServlet.getContentSection(request);
ContentSection section = ContentSectionServlet.getContentSection(myRequest);
if (Web.getWebContext().getUser() == null) {
throw new LoginSignal(request);
} else if (! ContentSectionServlet.checkAdminAccess(request, section)) {
throw new LoginSignal(myRequest);
} else if (! ContentSectionServlet.checkAdminAccess(myRequest, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
}
@ -52,14 +52,14 @@
}
s_log.debug("Starting dispatch process...");
RequestContext context = DispatcherHelper.getRequestContext(request);
RequestContext context = DispatcherHelper.getRequestContext(myRequest);
if(itemPage == null) {
s_log.warn("WARNING: itemPage is NULL");
}
else {
s_log.info("ALL OK: itemPage is not null");
}
itemPage.dispatch(request, response, context);
itemPage.dispatch(myRequest, response, context);
s_log.debug("exited item.jsp's service method");
</jsp:scriptlet>
</jsp:root>

View File

@ -13,20 +13,19 @@
<jsp:scriptlet>
// Restore the wrapped request
request = DispatcherHelper.getRequest();
HttpServletRequest myRequest = DispatcherHelper.getRequest();
DispatcherHelper.cacheDisable(response);
ContentSection section =
ContentSectionServlet.getContentSection(request);
ContentSection section = ContentSectionServlet.getContentSection(myRequest);
if (! ContentSectionServlet.checkAdminAccess(request, section)) {
if (! ContentSectionServlet.checkAdminAccess(myRequest, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
}
RequestContext context = DispatcherHelper.getRequestContext(request);
RequestContext context = DispatcherHelper.getRequestContext(myRequest);
sectionPage.init();
sectionPage.dispatch(request, response, context);
sectionPage.dispatch(myRequest, response, context);
</jsp:scriptlet>
</jsp:root>