You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Duncan Smith <ds...@deckertelecom.net> on 2003/12/12 19:01:03 UTC

CSS in War file

I've just started deploying a web app as a war file instead of uploading
individual files. Everything works except my styles don't load.

The stylesheet is added to the war file in the same location as before,
but if I try to request the css file on it's own I get a
java.lang.NullPointerException
error.

Any suggestions anyone?

- Duncan
www.pennymail.com


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


Re: CSS in War file

Posted by Duncan Smith <ds...@deckertelecom.net>.
Sorry. Was a error in my server.xml that I had made.
The server was in fact only serving the home page and nothing else, but
seems to be working now.

Thanks for the suggestions

-Duncan
www.pennymail.com

Duncan Smith wrote:

> I've just started deploying a web app as a war file instead of uploading
> individual files. Everything works except my styles don't load.
>
> The stylesheet is added to the war file in the same location as before,
> but if I try to request the css file on it's own I get a
> java.lang.NullPointerException
> error.
>
> Any suggestions anyone?
>
> - Duncan
> www.pennymail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Re: CSS in War file

Posted by Philippe Valle <pv...@eprocess.fr>.
Duncan Smith wrote:

>I've just started deploying a web app as a war file instead of uploading
>individual files. Everything works except my styles don't load.
>
>The stylesheet is added to the war file in the same location as before,
>but if I try to request the css file on it's own I get a
>java.lang.NullPointerException
>error.
>
>Any suggestions anyone?
>
>- Duncan
>www.pennymail.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>
Wath tomcat version used ?

if tomcat 3.3 add this in your web.xml :
   <mime-mapping>
      <extension>css</extension>
      <mime-type>text/css</mime-type>
   </mime-mapping>

that all.


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