Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 23rd, 2006, 08:01 AM
Robbert Robbert is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 Robbert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 9 sec
Reputation Power: 0
My CSS not being used by the Servlet.

Hey, I've got a small problem. I want to make a website with JSP pages and servlets with tomcat 5 as a server. Here's what it should do:

The guest arrives on the JSP page. The JSP page grabs the HTTP headers, invokes the StatistiekServlet servlet and passes the values of these headers to the servlet and the servlet stores them somewhere.

Here's the problem: If I include the Servlet using jsp:include and if the web.xml file is configured correctly, it will invoke the Servlet, but the CSS won't load.
If I change the URL pattern, the Servlet won't be invoked ("Resource unavailable") but the CSS is rendered.

Here's where the files are:

$CATALINA_HOME/webapps/ROOT/doc/o23/index.jsp (deze jsp file roept dus de StatistiekServlet aan)
$CATALINA_HOME/webapps/ROOT/doc/o23/StatistiekServlet
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/o23/StatistiekServlet
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/StatistiekServlet

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

Here's the code for the servlet in web.xml

Code:
	<servlet>
	  <servlet-name>StatistiekServlet</servlet-name>
	  <servlet-class>StatistiekServlet</servlet-class>
	</servlet>
	
	<servlet-mapping>
	  <servlet-name>StatistiekServlet</servlet-name>
	  <url-pattern>/</url-pattern>
	</servlet-mapping>


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)?

Thanks!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > My CSS not being used by the Servlet.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT