WebSphere Portal Server - Trouble finding css files for themes

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > June 2004 > Trouble finding css files for themes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Trouble finding css files for themes
twgerber

2004-06-22, 6:00 pm

I have my own theme created and it appears to work just fine.

However some pages that use this theme utilize my CSS files while others do not.

I can not figure out why some pages do not apply my CSS files.

I can see them getting retrieved in the HTTPD log files.

Actually I see two sets of retrievals - one request gets a 304 response code - file unchanged since the files were already retrieved once, then I see another retrieval which returns a 204 - empty file.

Perhaps Portal is not using the CSS files it has already retrieved in some cases??


172.20.16.49 - - [22/Jun/2004:07:53:03 -0500] "GET /wps/themes/html/FNNIIntranet/ie/en/emp_content_ie5.css HTTP/1.1" 304 0
172.20.16.49 - - [22/Jun/2004:07:53:03 -0500] "GET /wps/themes/html/FNNIIntranet/ie/en/emp_wrapper_ie5.css HTTP/1.1" 304 0

172.20.16.49 - - [22/Jun/2004:07:59:03 -0500] "GET /wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_wrapper_ie5.css HTTP/1.1" 204 0
172.20.16.49 - - [22/Jun/2004:07:59:18 -0500] "GET /wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_content_ie5.css HTTP/1.1" 204 0

Can anyone help me??
Oliver Meyer

2004-06-22, 6:00 pm

Actually, this looks like css file "emp_content_ie5.css" cannot be found
at the given location. This means somewhere in your JSPs you try to
include the css file, but the location for this file is wrong.
The URL
"/wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_wrapper_ie5.css"

gets created because your theme cannot be located, and therefore the
browser (?) cuts off the last parameter of the URL and looks for the css
file at this location. However, of course the css file cannot be found
at the given URL. Therefore your HTTP server returns 204.

So in my opinion you need to figure out which JSP contains the wrong
path to the css. Then you have to put in the correct path.

Oliver

twgerber wrote:

> I have my own theme created and it appears to work just fine.
>
> However some pages that use this theme utilize my CSS files while others do not.
>
> I can not figure out why some pages do not apply my CSS files.
>
> I can see them getting retrieved in the HTTPD log files.
>
> Actually I see two sets of retrievals - one request gets a 304 response code - file unchanged since the files were already retrieved once, then I see another retrieval which returns a 204 - empty file.
>
> Perhaps Portal is not using the CSS files it has already retrieved in some cases??
>
>
> 172.20.16.49 - - [22/Jun/2004:07:53:03 -0500] "GET /wps/themes/html/FNNIIntranet/ie/en/emp_content_ie5.css HTTP/1.1" 304 0
> 172.20.16.49 - - [22/Jun/2004:07:53:03 -0500] "GET /wps/themes/html/FNNIIntranet/ie/en/emp_wrapper_ie5.css HTTP/1.1" 304 0
>
> 172.20.16.49 - - [22/Jun/2004:07:59:03 -0500] "GET /wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_wrapper_ie5.css HTTP/1.1" 204 0
> 172.20.16.49 - - [22/Jun/2004:07:59:18 -0500] "GET /wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_content_ie5.css HTTP/1.1" 204 0
>
> Can anyone help me??

twgerber

2004-06-22, 6:00 pm

The only JSP's I have are for my Theme.

The other pages and portlets on them were created via the Admin interface.

So I have one parent page and 4 children all using the same theme.

Of the children 1 will display using the CSS files and the other 3 do not.

The activity in the http logs and portal logs looks exactly the same.

So I do not have my own JSP's for each of these pages.

Oliver Meyer

2004-06-22, 6:00 pm

Navigate to one of the pages that does not display the JSP and have
a look at the source HTML output. Porbably you will see that the CSS
file cannot be found or a wrong location is given for the CSS file.

Oliver

twgerber wrote:

> The only JSP's I have are for my Theme.
>
> The other pages and portlets on them were created via the Admin interface.
>
> So I have one parent page and 4 children all using the same theme.
>
> Of the children 1 will display using the CSS files and the other 3 do not.
>
> The activity in the http logs and portal logs looks exactly the same.
>
> So I do not have my own JSP's for each of these pages.
>

twgerber

2004-06-22, 6:00 pm

I wonder if its because some Portlets are generating whole HTML documents - see below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>doView.jsp</TITLE>
<SCRIPT language=javascript>
function openWindow(letter,nextLetter){
window.open('/wps/PA_1_0_4J/sample10/glossary/list.jsp?letter=' + letter + '&nextLetter=' + nextLetter, null, 'width=400,height=400,resizable=1,toolba
r=0,location=0,menubar=0,titlebar=0,dire
ctories=0,status=0,scrollbars=0');
}
</SCRIPT>
</HEAD>
<BODY>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<link href='/wps/themes/html/FNNIIntranet/ie/en/Styles.css' rel="styleSheet" type="text/css">

<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
</HEAD>
<BODY>
</BODY>
</HTML>

So I have multiple HTML, BODY, DOCTYPE tags on the resulting page.


For example on one page I added the "Glossary of Terms" portlet and this page doesn't use my CSS files.

On another page I have the "Documents" portlet and it doesn't generate these extra HTML documents and appears to use my CSS files.

How can one fix this??? Is this a bug in Portal and the supplied Portlets?


Oliver Meyer

2004-06-24, 5:57 pm

I still believe this happens because your css file cannot be found at
the given location in some cases. The URL to change the selection never
contains the css file as a parameter in normal cases, but your http log
file shows that the css file got appended to the URL at a point where
normally another portal parameter appears:
/wps/myportal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_1M8/_s.7_0_A/emp_wrapper_ie5.css

I have seen this before with css files and images and it always turned
out that the css file or image cannot be found at a given location.
Once the location issue was fixed, those URLs did not appear in the http
access.log any more.

Oliver
twgerber

2004-06-24, 5:57 pm

Ok - so how do I figure out where they should be placed?

I have them in the root of my theme folder and under ./ie/en/ folder.

Should they be elsewhere too?

The odd thing is earlier in my log it is retrieving the files from the ie/en directory successfully.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com