tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: CSS not being used when a Servlet is involved
Date Fri, 27 Oct 2006 17:44:58 GMT

> (Yes, I have three locations for the statistics servlet. I don't know where
> to place it!)

See below.

> $CATALINA_HOME/webapps/ROOT/doc/o23/index.jsp (deze jsp file roept dus de
> StatistiekServlet aan)

This should be fine.

> $CATALINA_HOME/webapps/ROOT/doc/o23/StatistiekServlet

This will not work: the servlet is not in the classpath (unless you've
done something really weird).

> $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/StatistiekServlet

This won't work: servlets basically do not work if they are not in packages.

> $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/o23/StatistiekServlet

This is the only one that will work, and your servlet must have a
"package o23;" declaration at the top.

You'll need your web.xml to look like this:

> 	<servlet>
> 	  <servlet-name>StatistiekServlet</servlet-name>
> 	  <servlet-class>o23.StatistiekServlet</servlet-class>
> 	</servlet>

> I always have this problem with Servlets. Is there any way to use CSS (and
> similar things...) with Servlets without too much trouble (like, changing
> some configuration settings)?

Can you give an example of the URL being used when trying to load a CSS
file? How about the servlet? You should make the changes noted above and
tell us if it helped. Then, we can deal with the CSS issue.


View raw message