You haven't said much about your environment and you haven't included any
code so it's hard to be sure what the problem is. However, I have no
problems accessing a CSS in my War file in Tomcat.

Here is a fragment from my servlet, which runs fine in Tomcat 4.1.24 on a
Linux box:

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

    response.setContentType(CONTENT_TYPE);

    PrintWriter out = response.getWriter();

    out.println("<html>");

    out.println("<head>");

    out.println("<title>SDAC Event Input</title>");

    out.println("<LINK rel=\"stylesheet\" TYPE=\"text/css\"
HREF=\"event_form.css\">");

    out.println("</head>");

    ....
}

The CSS, event_form.css, is in my $CATALINA_HOME/webapps/SDACServlet
directory.

I hope this helps.

Rhino

----- Original Message ----- 
From: "Duncan Smith" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 1:25 PM
Subject: Re: CSS in War file


> When I request a page which should have the styles applied, they are not.
>
> If I try to request the css file on it's own from a browser, I get the NPE
>
> (ie. www.pennymail.com/pennymail.css)
>
> -Duncan
> www.pennymail.com
>
> Wendy Smoak wrote:
>
> > > From: Duncan Smith [mailto:[EMAIL PROTECTED]
> >
> > > The stylesheet is added to the war file in the same location
> > > as before,
> >
> > Where in the .war file is the stylesheet?
> >
> > > but if I try to request the css file on it's own I get a
> > > java.lang.NullPointerException error.
> >
> > How are you requesting the CSS?  With a browser?  Where are you seeing
> > the NPE, browser window, or in a log file?
> >
> > --
> > Wendy Smoak
> > Application Systems Analyst, Sr.
> > ASU IA Information Resources Management
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to