Author: bpapez
Date: Tue Sep 18 09:03:06 2007
New Revision: 18528
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18528&repname=
=3Djahia
Log:
JAHIA-2244: =
- Removed a check in ProcessingContext.checkPageAccess() as it was not cons=
idering the Login_Engine usecase and a similar check, considering the Login=
_Engine is already there
- In the exception handling for JahiaPageNotFoundException there was an end=
less redirection loop to the same URL in the case, where there is no /pid/ =
parameter in the URL. Changed that, so that I am not redirecting if the hom=
epage-ID could not be set as pid-parameter.
JAHIA-2224: For ServerOverloadedExceptions the stacktrace is no more writte=
n to the log
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/Jahia.java
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/JahiaAction.ja=
va
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/Jahia.ja=
va
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/bin/Jahia.java&rev=3D18528&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/Jahia.java (or=
iginal)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/Jahia.java Tue=
Sep 18 09:03:06 2007
@@ -972,8 +972,8 @@
} else {
redirectURL =3D requestURI.substring(0, pidPos=
) + "/pid/"+site.getHomePageID() + requestURI.substring(nextSlashPos);
}
+ response.sendRedirect(redirectURL); =
=
}
- response.sendRedirect(redirectURL);
} catch (IOException e) {
logger.error("error during redirection to homepage",e);
}
@@ -1007,7 +1007,6 @@
} catch (JahiaSiteNotFoundException snfex) {
// VIRTUAL SITE NOT FOUND
logger.debug(snfex.getJahiaErrorMsg(), snfex);
- logger.error(snfex.getJahiaErrorMsg(), snfex);
JahiaErrorDisplay.DisplayException(request, response,
getStaticServletConfig().getServletContext(), jSetting=
s, false, false, snfex);
} catch (JahiaForbiddenAccessException jfae) {
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/JahiaAct=
ion.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/bin/JahiaAction.java&rev=3D18528&repname=3D=
jahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/JahiaAction.ja=
va (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/bin/JahiaAction.ja=
va Tue Sep 18 09:03:06 2007
@@ -24,6 +24,7 @@
import org.jahia.params.ParamBean;
import org.jahia.exceptions.JahiaPageNotFoundException;
import org.jahia.exceptions.JahiaForbiddenAccessException;
+import org.jahia.exceptions.JahiaServerOverloadedException;
import org.jahia.services.sites.JahiaSite;
=
import javax.servlet.ServletException;
@@ -90,8 +91,8 @@
} else {
redirectURL =3D requestURI.substring(0, pidPos=
) + "/pid/"+site.getHomePageID() + requestURI.substring(nextSlashPos);
}
+ response.sendRedirect(redirectURL); =
=
}
- response.sendRedirect(redirectURL);
} catch (IOException e) {
logger.error("error during redirection to homepage",e);
}
@@ -108,6 +109,13 @@
servlet.getServletContext(), Jahia.getSettings(),
false, false,
jfae);
+ } catch (JahiaServerOverloadedException ex) {
+ // let's log this at debug for maintenance purposes.
+ logger.warn("Server is overloaded. Request : " + request.getRe=
questURI() + " queryString=3D" + request.getQueryString() + " was not proce=
ssed");
+ logger.debug("Server is overloaded exception : ", ex);
+ JahiaErrorDisplay.DisplayException(request, response,
+ servlet.getServletContext(), Jahia.getSettings(),
+ ex); =
} catch ( Throwable t ){
logger.error("Error", JahiaErrorDisplay.getNestedException(t));
// should redirect to an error page here
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/Proce=
ssingContext.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/params/ProcessingContext.java&rev=3D18528&r=
epname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java Tue Sep 18 09:03:06 2007
@@ -341,8 +341,6 @@
* @param site
* @param user
* @param contentPage
- * @throws JahiaPageNotFoundException
- * when the requested page could not be found
* @throws JahiaSessionExpirationException
* when the user session expired
* @throws JahiaSiteNotFoundException
@@ -352,9 +350,8 @@
*/
public ProcessingContext(final SettingsBean jSettings,
final long aStartTime, final JahiaSite aSite, final JahiaUser =
user,
- final ContentPage aContentPage) throws JahiaPageNotFoundExcept=
ion,
- JahiaSessionExpirationException, JahiaSiteNotFoundException,
- JahiaException {
+ final ContentPage aContentPage) throws JahiaSessionExpirationE=
xception, =
+ JahiaSiteNotFoundException, JahiaException {
this(jSettings, aStartTime, aSite, user, aContentPage,
new EntryLoadRequest(EntryLoadRequest.STAGED));
}
@@ -362,7 +359,7 @@
public ProcessingContext(final SettingsBean jSettings,
final long aStartTime, final JahiaSite aSite, final JahiaUser =
user,
final ContentPage aContentPage, final EntryLoadRequest loadReq=
uest)
- throws JahiaPageNotFoundException, JahiaSessionExpirationExcep=
tion,
+ throws JahiaSessionExpirationException,
JahiaSiteNotFoundException, JahiaException {
Jahia.setThreadParamBean(this);
// default vars
@@ -3232,8 +3229,6 @@
&& !getEngine().equals(Login_Engine.ENGINE_NAME)) {
throw new JahiaForbiddenAccessException();
}
- if (getPage() =3D=3D null)
- throw new JahiaPageNotFoundException(pageID);
// last requested page
Integer lrpID =3D (Integer) getSessionState().getAttribute(
SESSION_LAST_REQUESTED_PAGE_ID);
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list