tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Drake" <...@pobox.com>
Subject Re: dynamic content not mapping correctly
Date Tue, 08 Jan 2002 00:34:28 GMT
Try href="MyServlet/style.css" (drop the leading slash)

----- Original Message ----- 
From: "Etienne Deleflie" <etienne.deleflie@proxima-tech.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Monday, January 07, 2002 4:08 PM
Subject: dynamic content not mapping correctly


| Hello list,
| 
| I just want to describe my problem better..............I have an XML 
| application.
| 
| Via a web-app (in Tomcat 4.0.1) a URL is mapped to a servlet
| The servlet reads an XML file which defines the retrieval of other XML 
| data and what XSL files to render that retrieved XML data with.
| 
| The XML and XSL is rendered together using JAXP 1.1 before the servlet 
| outputs the result back to the browser.
| 
| .... all this works.
| 
| 
| BUT, the HTML stylesheets ( that are in written in the XSL files), and 
| images, have absolute links ......... that is, absolute to the web-app. 
| eg. the XSL file contains this line:
| 
| <link rel="stylesheet" href="/MyServlet/style.css" type="text/css"/>


| 
| When the page eventually hits the browser, the HTTP request that this 
| causes is
| 
| http://localhost:8080/MyServlet/style.css , instead of
| http://localhost:8080/myWeb-appName/MyServlet/style.css
| 
| ................ the page that contains this stylesheet link is 
| http://localhost:8080/myWeb-appName/MyServlet/index.html
| 
| shouldn't Tomcat always prepend the name of the web-app to any request 
| that comes FROM a page in the web-app ?
| (or am I doing something wrong?)
| 
| etienne
| 
| 
| 
| --
| To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
| For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
| Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
| 
| 
| 


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message