on 05-26-2005 9:41 AM
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
Hi Suresh,
Put your CSS under dist->css folder. If css folder is not there then create it and use the following line.
<b>
<link rel=stylesheet href="<%=webpath%>css/logon.css">
</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi prakash,
thanks a lot, hereby i attached the JSP code it is working properly for all except background color. whether anything i have to add more for background color.
<%@ 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>
thanks
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.