cancel
Showing results for 
Search instead for 
Did you mean: 

custom portal header css scripts not loading

0 Kudos

Hi,

I have created the portal component to load the custom css/images/scripts. I have added below lines in the .jsp and not working. Please suggest the steps. Also we need to load multiple files. We are on 7.3 portal.

<%@ page import="com.sapportals.portal.prt.resource.IResource" %>
<Html>
<Head>
<%
IResource rs = componentRequest.getResource(IResource.CSS, "css/ex1.css");
response.addResource(rs);
%>
</Head>
<body>
<h1>This is header 3</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>
</body>
</html>

Accepted Solutions (0)

Answers (1)

Answers (1)

richard-zhao
Employee
Employee
0 Kudos

Please follow the below step to check.

  1. Open developer Tool of your browser. click console tab.
  2. Reload your JSP file.
  3. To see is there any error in the console.

I guess maybe the path of CSS is not correct cannot be loaded.

or you can try to using this way to load your CSS files <link href="mystyle.css" rel="stylesheet" type="text/css"/>