Hi Experts,
Greetings for the day!
We have a requirement to change the URL redirection of Help link on BI Launchpad to some other internal Knowledge Base site. Please see the below attached screenshot-1.jpg for reference.
I have identified the source code by applying Fiddler trace & captured the JSP, which is called when clicking on the Help link. Attached screenshot-2.jpg is the snapshot of the Fiddler trace. The URL is generated like this : /BOE/portal/1606032340/PlatformServices/jsp/Help/helpRedirect.faces?cafWebSesInit=true&bttoken= ≈pKind=InfoView&service=%2FInfoView%2Fcommon% 2FappService.do&loc=en&pvl=en_US&ctx=standalone∾tId=4891&containerId=⪯f=maxOpageUt%3D200%3BmaxOpageC%3D10%3Btz%3DEtc%2FUTC%3BmUnit%3Dinch%3BshowFilters%3Dtrue%3BsmtpFrom%3Dtrue%3BpromptForUnsavedData%3Dtrue%3B&resourceId=4848
Considering above points, I dig down the code & gone through with the helpRedirect.jsp file from the below location: <BOBJ-Install-Directory>/webapps/tomcat/BOE/eclipse/plugins/webpath.PlatformServices/jsp/Help/
Below is the content of helpRedirect.jsp file:
-----------------------------------------------------------------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ page import="com.businessobjects.webutil.ClientUtils,java.util.Locale,java.util.Arrays"%>
<jsp:useBean id="helpBean"
class="com.businessobjects.clientaction.help.HelpRedirectBean"
scope="request" />
<%
/*
validation for loc parameter for XSS issue ADAPT01632397.
*/
String locparam = request.getParameter("loc");
Locale localeObj = null;
Locale locs[] = Locale.getAvailableLocales();
if(locparam!= null){
if(locparam.contains("_")){
String locparams[] = locparam.split("_");
localeObj = new Locale(locparams[0],locparams[1]);
}else
localeObj= new Locale(locparam);
if(!Arrays.asList(locs).contains(localeObj)){
%>
<jsp:forward page="/jsp/Validation_Error/httperror_400.jsp"></jsp:forward>
<% return; }}
helpBean.init(request);
response.setHeader("Expires", "0");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
<script type="text/javascript" src="<h:outputText value="#{helpBean.helpContextPath}#{helpBean.resourceMap}" />"></script>
<script type="text/javascript">
var resourceId = "<h:outputText value="#{helpBean.resourceId}" />";
var page = "<h:outputText value="#{helpBean.defaultPage}" />";
if (resourceId.length > 0 && window[resourceId]) {
page = page + "?" + window[resourceId];
}
var target = "<h:outputText value="#{helpBean.helpContextPath}" />" + "/" + page;
window.location = target;
</script>
</head>
</f:view>
</html>
-----------------------------------------------------------------------------------------------------------------------
Does anyone have tried this scenario?
As per my understanding above JSP file contains a Java script code snippet, which has a variable "target" which is containing the final link for the Help site redirection.
Now the question is –
Thanks,
Shailendra
Best practice is not to mess with default BOE webapp, outside of the Customization guide.