cmailleux 2005/03/31 10:10:25 CEST
Modified files: (Branch: JAHIA-4-1-BRANCH)
src/java/org/jahia/services/applications
JahiaApplicationsDispatchingServletService.java
Log:
Ensure no caching if the webapp said so (even request caching)
Add a test for weblogic to make an include if we show a jsp
Revision Changes Path
1.50.2.4.2.1 +9 -5
jahia/src/java/org/jahia/services/applications/JahiaApplicationsDispatchingServletService.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/services/applications/JahiaApplicationsDispatchingServletService.java.diff?r1=1.50.2.4&r2=1.50.2.4.2.1&f=h
Index: JahiaApplicationsDispatchingServletService.java
===================================================================
RCS file:
/home/cvs/repository/jahia/src/java/org/jahia/services/applications/Attic/JahiaApplicationsDispatchingServletService.java,v
retrieving revision 1.50.2.4
retrieving revision 1.50.2.4.2.1
diff -u -r1.50.2.4 -r1.50.2.4.2.1
--- JahiaApplicationsDispatchingServletService.java 9 Nov 2004 17:32:34
-0000 1.50.2.4
+++ JahiaApplicationsDispatchingServletService.java 31 Mar 2005 08:10:25
-0000 1.50.2.4.2.1
@@ -304,7 +304,12 @@
// for JSP's we do a forward to avoid generation of the extra
// include parameters to be set internally by the servlet
// container.
- sessionDispatcher.forward (requestWrapper, responseWrapper);
+ String name =
requestWrapper.getRequest().getClass().getName();
+ if(name.indexOf("weblogic")>-1) {
+ sessionDispatcher.include(requestWrapper,
responseWrapper);
+ } else {
+ sessionDispatcher.forward(requestWrapper,
responseWrapper);
+ }
} else if (servletBean.getWebAppType () ==
ServletBean.SERVLET_TYPE) {
logger.debug ("servletBean is of SERVLET TYPE");
sessionDispatcher.include (requestWrapper, responseWrapper);
@@ -407,7 +412,7 @@
}
- if (appRequest.getMethod ().equalsIgnoreCase ("GET")) {
+ if (appRequest.getMethod ().equalsIgnoreCase ("GET") && mustCache) {
HttpSession curSession = jParams.getSession ();
if (curSession != null) {
requestCache.put (buildCacheKey (curSession, appUniqueIDStr),
@@ -444,7 +449,7 @@
boolean fullScreenActivated)
throws JahiaException {
- String outputResult = "";
+ String outputResult = null;
// we are in the case were there is no application ID
// default behavior :
// 1. lookup in cache for output for the current app
@@ -454,9 +459,8 @@
if (cacheRead) {
outputResult = (String) outputCache.get (buildCacheKey
(curSession,
appUniqueIDStr));
- } else {
- outputResult = null;
}
+
if (outputResult == null) {
// we must now check the request table to know if we can use a
// previous request.