You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anton Berg <an...@versanet.de> on 2009/04/08 23:24:16 UTC

firefox css is not loaded

Hello,

I have a simple JSP that is served by jboss (4.2.3-GA) under ubuntu linux. A 
stylesheet is used in the header of the jsp.

If I use a konqueror browser the css styles are loaded. If I use the firefox 
(3.08) which is actually my standard browser the stylesheet is not loaded. 
Generally the stylesheets are loaded correctly in firefox only if I load the 
struts-jsps from my local machine I get this problems. Any ideas ?

Thanks in advance
Tony

I've shortened the files just to show the problem:

JSP

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8">
<link rel="stylesheet" type="css/text" media="screen" href="<s:url 
value="/css/bpportal.css"/>" />
<title>Sign on</title>
</head>
<body>
<h4>Bitte Loginname und Passwort eingeben</h4>
<div class="test">
<s:form action="/portal/Login.action">
    <s:textfield label="Loginname" name="username"/>
    <s:password label="Passwort" name="password" />
    <s:submit/>
</s:form>
</div>
</body>
</html>


CSS
 
body,html {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 100.01%;
	margin: 0;
	padding: 0;
	text-align: left;
}

.test {
	background: #ccc;
}

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: firefox css is not loaded

Posted by Wes Wannemacher <we...@wantii.com>.
On Wednesday 08 April 2009 18:00:34 Martin Gainty wrote:
> > <link rel="stylesheet" type="css/text" media="screen" href="<s:url


After taking a second look at this, maybe your type attribute is wrong. Try 
changing it to text/css

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: firefox css is not loaded

Posted by Martin Gainty <mg...@hotmail.com>.
link href attribute is pointing to the wrong location.. here is mine
 <LINK type="text/css" rel="stylesheet" href="resources/space.css">

Seien Sie sinnvoll?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> From: anton.berg@versanet.de
> To: user@struts.apache.org
> Subject: firefox css is not loaded
> Date: Wed, 8 Apr 2009 23:24:16 +0200
> 
> Hello,
> 
> I have a simple JSP that is served by jboss (4.2.3-GA) under ubuntu linux. A 
> stylesheet is used in the header of the jsp.
> 
> If I use a konqueror browser the css styles are loaded. If I use the firefox 
> (3.08) which is actually my standard browser the stylesheet is not loaded. 
> Generally the stylesheets are loaded correctly in firefox only if I load the 
> struts-jsps from my local machine I get this problems. Any ideas ?
> 
> Thanks in advance
> Tony
> 
> I've shortened the files just to show the problem:
> 
> JSP
> 
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
> Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/xml; charset=UTF-8">
> <link rel="stylesheet" type="css/text" media="screen" href="<s:url 
> value="/css/bpportal.css"/>" />
> <title>Sign on</title>
> </head>
> <body>
> <h4>Bitte Loginname und Passwort eingeben</h4>
> <div class="test">
> <s:form action="/portal/Login.action">
>     <s:textfield label="Loginname" name="username"/>
>     <s:password label="Passwort" name="password" />
>     <s:submit/>
> </s:form>
> </div>
> </body>
> </html>
> 
> 
> CSS
>  
> body,html {
> 	font-family: Arial, Helvetica, sans-serif;
> 	font-size: 100.01%;
> 	margin: 0;
> 	padding: 0;
> 	text-align: left;
> }
> 
> .test {
> 	background: #ccc;
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Quick access to your favorite MSN content and Windows Live with Internet Explorer 8. 
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A

Re: firefox css is not loaded

Posted by Anton Berg <an...@versanet.de>.
Thanks Wes for the quick reply. But the error was too simple. I've made a 
mistake:

wrong:
<link rel="stylesheet" type="css/text" media="screen" href="<s:url

right:
<link rel="stylesheet" type="text/css" media="screen" href="<s:url
        
Sorry for posting
Tony

Am Mittwoch 08 April 2009 23:39:21 schrieb Wes Wannemacher:
> On Wednesday 08 April 2009 17:24:16 Anton Berg wrote:
> > Hello,
> >
> > I have a simple JSP that is served by jboss (4.2.3-GA) under ubuntu
> > linux. A stylesheet is used in the header of the jsp.
> >
> > If I use a konqueror browser the css styles are loaded. If I use the
> > firefox (3.08) which is actually my standard browser the stylesheet is
> > not loaded. Generally the stylesheets are loaded correctly in firefox
> > only if I load the struts-jsps from my local machine I get this problems.
> > Any ideas ?
>
> A few quick thoughts as I've had similar problems. Make sure that the app
> server is serving the CSS with the right content-type header. It seems to
> me that between FF 2 and FF 3, firefox became less forgiving of the css
> file's content-type header. I think I had an app where I was using s2 tags
> in the CSS (for pointing to images, etc.) and since the JSP compiler was
> mapped to look at them, it was setting the content-type to text/html.
> Somewhere along the line, this quit working.
>
> Another thing to check for is whether the app server is appending it's
> jsessionid=blahblahblah; stuff to the s:url you are using to point to the
> css file. I've had that problem as well.
>
> Last thing, in FF, go to the Error Console. It displays CSS errors, you
> might find an interesting pointer in there as to why it's ignoring your CSS
> file.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: firefox css is not loaded

Posted by Wes Wannemacher <we...@wantii.com>.
On Wednesday 08 April 2009 17:24:16 Anton Berg wrote:
> Hello,
>
> I have a simple JSP that is served by jboss (4.2.3-GA) under ubuntu linux.
> A stylesheet is used in the header of the jsp.
>
> If I use a konqueror browser the css styles are loaded. If I use the
> firefox (3.08) which is actually my standard browser the stylesheet is not
> loaded. Generally the stylesheets are loaded correctly in firefox only if I
> load the struts-jsps from my local machine I get this problems. Any ideas ?
>

A few quick thoughts as I've had similar problems. Make sure that the app 
server is serving the CSS with the right content-type header. It seems to me 
that between FF 2 and FF 3, firefox became less forgiving of the css file's 
content-type header. I think I had an app where I was using s2 tags in the CSS 
(for pointing to images, etc.) and since the JSP compiler was mapped to look 
at them, it was setting the content-type to text/html. Somewhere along the 
line, this quit working. 

Another thing to check for is whether the app server is appending it's 
jsessionid=blahblahblah; stuff to the s:url you are using to point to the css 
file. I've had that problem as well. 

Last thing, in FF, go to the Error Console. It displays CSS errors, you might 
find an interesting pointer in there as to why it's ignoring your CSS file.

-Wes


>
> I've shortened the files just to show the problem:
>
> JSP
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/xml; charset=UTF-8">
> <link rel="stylesheet" type="css/text" media="screen" href="<s:url
> value="/css/bpportal.css"/>" />
> <title>Sign on</title>
> </head>
> <body>
> <h4>Bitte Loginname und Passwort eingeben</h4>
> <div class="test">
> <s:form action="/portal/Login.action">
>     <s:textfield label="Loginname" name="username"/>
>     <s:password label="Passwort" name="password" />
>     <s:submit/>
> </s:form>
> </div>
> </body>
> </html>
>
>
> CSS
>
> body,html {
> 	font-family: Arial, Helvetica, sans-serif;
> 	font-size: 100.01%;
> 	margin: 0;
> 	padding: 0;
> 	text-align: left;
> }
>
> .test {
> 	background: #ccc;
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org