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

View File

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

View File

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

View File

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