Skip to Content

custom portal header css scripts not loading


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" %>
IResource rs = componentRequest.getResource(IResource.CSS, "css/ex1.css");
<h1>This is header 3</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 20, 2017 at 08:45 AM

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

    Add comment
    10|10000 characters needed characters exceeded