This is from Portal V7, but it may help.We have a check in our head.jsp that checks to see if it is an ESRI page. If so, we're pulling in ESRI's dojo, otherwise, we're pulling in Portal's.Hope that helps.DeWayne
<c:choose>
<c:when test='${(currentNavNode.metadata["esriPage"] == "true")}'>
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/Grid.css">
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/claroGrid.css">
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/InfoWindow.css">
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/widget/Dialog/Dialog.css">
<%-- <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/css/esri.css"> --%>
<%-- link the customStyles.css for the page --%>
<link rel="stylesheet" type="text/css" href="<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/css/customStyles${localEnvironment}.css" />
<!-- Dojo JS Files -->
<script type="text/javascript">
djConfig = {
isDebug: false,
locale: 'en',
dojoIframeHistoryUrl: '<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/fromDojo/iframe_history.html'
};
</script>
<%-- <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8compact"></script> --%>
<script type="text/javascript" src="https://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script>
</c:when>
<c:otherwise>
<%-- link the dojo stylesheets for the page --%>
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dojo/resources/dojo.css">
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/resources/Grid.css">
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/resources/claroGrid.css">
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/enhanced/resources/claro/EnhancedGrid.css">
<link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/widget/Portlet/Portlet.css">
<%-- link the core portal stylesheet (we use parts related to the search center) --%>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/base/core.css"/>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/defaultTheme/defaultTheme.css"/>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/base/dojo.css"/>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/defaultTheme/dojoTheme.css"/>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/wps/search/css/searchWidgets.css" />
<%-- link the customStyles.css for the page --%>
<link rel="stylesheet" type="text/css" href="<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/css/customStyles${localEnvironment}.css" />
<!-- Dojo JS Files -->
<script type="text/javascript">
var djConfig = {
parseOnLoad: false,
locale: 'en',
modulePaths : { "ibm" : "/portal_dojo/ibm",
"com" : "/portal_dojo/com"
}
};
</script>
<script type="text/javascript" src="${dojoRoot}/dojo/dojo.js" ></script>
<!-- <script type="text/javascript" src="/portal_dojo/v1.6/dojo/dojo.js" ></script> -->
</c:otherwise>
</c:choose>