Skip to Content
0

custom portal header css scripts not loading

Jul 12, 2017 at 04:14 AM

60

avatar image

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>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Richard Zhao
Nov 20, 2017 at 08:45 AM
0

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"/>

Share
10 |10000 characters needed characters left characters exceeded