Skip to Content
0
May 26, 2005 at 08:41 AM

Adding External Style sheet

104 Views

Hi,

I am using JspDynPage.How to add CSS(Style Sheet) in my *.jsp file. For Internal CSS(Style sheet) it is working properly. For External CSS(Style sheet) Style sheet properties was not reflecting. Anything i have to add in portalapp.xml. whether i need to configure anything in portal? Is there any documentation available about External stylesheet.

This is the JSP code :

<%@ page import="com.sapportals.portal.prt.resource.IResource" %>

<Html>

<Head>

<%

IResource rs = componentRequest.getResource(IResource.CSS, "css//ex1.css");

String URL = rs.getResourceInformation().getURL(componentRequest);

%>

<link rel= "stylesheet"

type= "text/css"

href= "<%=URL%>"

/>

</Head>

<body>

<h1>This is header 1</h1>

<h2>This is header 2</h2>

<p>This is a paragraph</p>

</body>

</html>

Thanks & Regards

suresh kb