The url pattern for your servlet is the issue. Somehow it is "/", which means just about everthing. I would use something different like, /employees or /employees.html. Your path to the css should be just "../blah.css", and include the blah.css in your war file at the root.
 
regards,
 
the elephantwalker
 
 
 
 
 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Brynolf Andersson
Sent: Wednesday, June 20, 2001 3:28 PM   
To: Orion-Interest
Subject: Aaarrrghhh!! CSS and Servlet again

Hi all again,
I have been trying all lot of different ways to pick uppthe CSS file but without any success. So I'll try to see if anyone has some more thing to add to my problem.

The question is still there, where should I put my CSS file and how should I pick it up from the servlet.

Som information:
server.xml:
<application name="Lab01" path="C:\oracle\JDeveloper 3.2.3\myprojects\lab_01" />

default-web-site.xml:
<!-- LAB 01 -->
<web-app application="Lab01" name="web" root="/lab01" />

web.xml:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<display-name>Lab 01</display-name>
<description>desc</description>
<servlet>
<servlet-name>EmployeeServlet</servlet-name>
<servlet-class>training.EmployeeServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>training.EmployeeServlet</servlet-name>
<url-pattern>/</url-pattern> -->
</servlet-mapping>
</web-app>

application.xml:
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">

<display-name>Lab01</display-name>
<module>
<web>
<web-uri>web</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>

Directory structure of the WEB-APP:
_lab_01
|_META-INF
| |_application.xml
|_web
|____|WEB-INF
|____________|web.xml
|____________________|classes
|____________________________|pkg
|________________________________|myServlet

Help



Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to