2016-07-24 3 views
2

다른 콘텐츠 구조를 사용하는 다중 사용자 응용 프로그램의 AEM 오류 처리에 대해 궁금합니다. 단계는 내 응용 프로그램은 다음과 같습니다aem의 응용 프로그램에 대한 오류 처리

/content/firstapp/en 

---- Difficulty in the multicountry and multitenancy 
/content/secondapp/country-1/en 
/content/secondapp/country-2/en 
/content/secondapp/country-3/en 

/contente/thirdapp/en 

Please suggest in this case someone implemented this kind of structure in the past or have more information to do this approachae,. thanks, Sandeep 

답변

0

첫 번째 단계는, 올바르게 설정을 오류 처리기를 가지고있다 위치를 응답 상태에 적절한 에러 코드를 설정하고있다. 404 구성 404.jsp 대한 오류 처리기

샘플

<% 
if (com.day.cq.wcm.api.WCMMode.fromRequest(request) != com.day.cq.wcm.api.WCMMode.DISABLED) { 
%> 
    <%@include file="/libs/sling/servlet/errorhandler/404.jsp"%> 
<% 
} else { 
    response.setStatus(404); 
} 
%> 

다음 단계는 아파치/운영자 (가상 호스트 구성에서 구성) 정확한 오류 문서를로드하도록 구성하는 것이다. 오류 페이지의 적절한 로딩이 아파치/디스패처에 위임이 방법 - 구성 위

<LocationMatch "^/content/secondapp/country-1/en/.*$"> 
    ErrorDocument 404 "/country-1/not-found.html" 
    ErrorDocument 500 "/country-1/error.html" 
</LocationMatch> 

<LocationMatch "^/content/secondapp/country-2/en/.*$"> 
    ErrorDocument 404 "/country-2/not-found.html" 
    ErrorDocument 500 "/country-2/error.html" 
</LocationMatch> 

<LocationMatch "^/content/secondapp/country-3/en/.*$"> 
    ErrorDocument 404 "/country-3/not-found.html" 
    ErrorDocument 500 "/country-3/error.html" 
</LocationMatch> 

<LocationMatch "^/content/secondapp/country-4/en/.*$"> 
    ErrorDocument 404 "/country-4/not-found.html" 
    ErrorDocument 500 "/country-4/error.html" 
</LocationMatch> 

이 패턴에서 짧은 URL을 기반으로는 /content/secondapp/country-x/en/.*to /country-4/en/.* 단축 이며, 각 사이트는 자신의 error.html 페이지가 및 not-found.html

관련 문제