tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbert <robbert.ouweh...@gmail.com>
Subject RE: CSS not being used when a Servlet is involved
Date Sun, 29 Oct 2006 12:32:50 GMT



Caldarale, Charles R wrote:
> 
>> From: Robbert [mailto:robbert.ouwehand@gmail.com] 
>> Subject: RE: CSS not being used when a Servlet is involved
>> 
>> Hm, alright. Should all else fail, is it possible to let a 
>> Servlet handle the CSS?
> 
> Some servlet must handle everything; static content (including .css
> files) is normally handled by Tomcat's DefaultServlet.

Ah, and because I called a different Servlet in my JSP, any and all requests
went to that Servlet and since that Servlet couldn't handle them, it just
showed text.


Caldarale, Charles R wrote:
> > I have four JSP pages (index, profile, statistics and 
>> gallery) that must invoke the StatistiekServlet. The
>> page is simply a normal, static HTML page that calls
>> the Servlet.
> 
> By definition, a JSP page isn't static, but that's probably irrelevant.

Yeah, I actually meant that it outputs static HTML, mostly.


Caldarale, Charles R wrote:
> > That works! Thank you very much! 
> 
> If you have not redefined the servlet-name "default" within your webapp,
> you can simplify what I gave you before.  Leave out the <servlet>
> declaration for "tcdefault", and change the *.css mapping to use just
> "default".  As someone else pointed out, "default" is already declared
> in conf/web.xml to use the proper servlet class, and conf/web.xml is
> automatically included in for every webapp.

Ah, I see. It's all starting to make sense now. I'm so glad I posted this
here 'cause no one else knew an answer. It does sound like a neatier
solution.


Caldarale, Charles R wrote:
> > Are there any drawbacks to this method?
> 
> None that I can think of.
> 
>  - Chuck

Good. I owe you one. Thanks!

Robbert
-- 
View this message in context: http://www.nabble.com/CSS-not-being-used-when-a-Servlet-is-involved-tf2521410.html#a7060454
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message