Hi,
You have not put an absolute path on your href, so the webbrowser will
generate an absolute path by merging this filename with the URL it loaded
the parent document from (ie your servlet's URL).
Are you accessing your servlet as http://host:port/servlet/serletname?
If so, then the webbrowser will request http://host:port/servlet/blaf.css,
which I suspect doesn't exist.
Either:
(a) put an absolute path on your href for the css
(b) put a relative path (eg ../blaf.css, which will resolve to
http://host:port/servlet/../blaf.css, ie http://host:port/blaf.cxx)
(c) use the servlet-mapping tag in WEB-INF/web.xml so that your servlet
appears to be in the same directory as you want to put your stylesheet file
in.
Hope this helps,
Simon
> -----Original Message-----
> From: Brynolf Andersson [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2001 23:25
> To: Orion-Interest
> Subject: Servlet and CSS
>
>
> Hi all gurus,
> I am trying to include a CSS in my servlet:
>
> out.println("<html>");
> out.println("<head>");
> out.println("<title>Untitled Document</title>");
> out.println("<meta http-equiv=\"Content-Type\" content=\"text/html;
> charset=iso-8859-1\">");
> out.println("<link rel=\"StyleSheet\" href=\"blaf.css\"
> type=\"text/css\">");
> out.println("</head>");
>
> But it won't work for me. So where should I put the blaf.css
> in my Web
> application structure to get it working, or is there
> something wrong with my
> HTML ???
>
> Thanks a lot
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
___________________________________________________________________
This communication contains information which is confidential and
may also be privileged. It is for the exclusive use of the intended
recipient. If you are not the intended recipient, please note that
any form of distribution, copying or use of this communication or
the information in it is strictly prohibited. If you have received
this communication in error, please return it with the title
"received in error" to [EMAIL PROTECTED] then delete the
email and destroy any copies of it. Please contact our Helpdesk on
01628765555 if you need assistance. Thank you for your cooperation.
___________________________________________________________________