Greetings fellow Tomcat dancers,
Been losing cycles in a gumption trap, trying to hook a CSS file
up to XSLT-generated XHTML pages. Many thanks to whomever sees
my obvious error.
If I hardwire the full-path filename of my development environment
into the XSLT file, all works as hoped/planned/dreamed. But all
other techniques I've tried fail.
Tomcat: 5.0.19. Webapp name: nrd.
WAR layout:
|-nrd
|-css/nrd.css
|-images/
|-Meta-inf/
|-Web-inf/
|-classes/
|-dtd/
|-lib/
|-xsl/
|-web.xml
web.xml:
<web-app>
<servlet>
<servlet-name>
controller
</servlet-name>
<servlet-class>
org.apnp.nrd.ControlServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
controller
</servlet-name>
<url-pattern>
/*
</url-pattern>
</servlet-mapping>
</web-app>
XSLT source that works:
<head>
<meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=utf-8"/>
<link rel="stylesheet" type="text/css"
href="C:\Apache\Tomcat\Tomcat50\webapps\nrd\css\nrd.css"/>
</head>
Versions of CSS href that do not work:
href="css/nrd.css"/>
href="/css/nrd.css"/>
href="./css/nrd.css"/>
href="nrd/css/nrd.css"/>
href="/nrd/css/nrd.css"/>
href="./nrd/css/nrd.css"/>
I've also tried setting a global XSLT parameter:
<xsl:param name="rootDir" select="'../docroot'"/>
and calling that:
<link rel="stylesheet" type="text/css"
href="{$rootDir}css/nrd.css"/>
which results in a known unsuccesful link:
href="/nrd/css/nrd.css"
Please, if you can, tell me what obvious thing I've missed.
Thanks for any suggestions.
Best wishes,
William BC Crandall
bc.crandall [around] earthlink.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]