Skip to Content
Former Member
Mar 23, 2006 at 06:59 AM

Using a custom service in masthead



We have a custom service which returns a string.We would like to display the string in the masthead.

I have added the sharing reference to the custom service and using the following code to get the String

private String GetOrgCode(IPortalComponentRequest request){
			IUserContext userContext = request.getUser();
			IConnectionService cgservice =(IConnectionService) PortalRuntime.getRuntimeResources().getService(IConnectionService.KEY);
			String s=cgservice.getOrgDesc(userContext.getLogonUid());
			return s;

And display the string using <%=GetOrgCode(componentRequest)%>

The masthead on the portal does not display the string and when I preview the masthead from portal content I am getting an error which says:

Caused by: com.sapportals.portal.prt.component.PortalComponentException: Error occurs during the compilation of java generated from the jsp

What is wrong in the code or Have I missed something?