I'm new to using XSLT/XML to deliver web pages to a user. However, I have managed to create a working servlet example using the response Printwriter to return the results to be displayed. But I am unable to link the CSS stylesheet referenced in a <link> attribute in the XSLT page. The page displays but with no style information. The (existing) folder structure (not designed by me) looks like this:
Existing JSPs are contained under the web folder, CSS stylesheets under css, and servlets under classes.
What is the correct way to reference a stylesheet in the css folder from the output of a servlet (in the classes folder)? I have been considering creating a generic JSP in the web folder and dumping all servlet output into it but it seems like there must be a better way. Besides, I hate to create a JSP just for that purpose.
Thanks for your assistance! [ September 10, 2005: Message edited by: James Danson ]
Just remember that the URL is used by the browser to fetch the stylesheet, and the browser knows nothing about anything in WEB-INF. If the stylesheet URL is a relative one, it's relative to the apparent URL of the JSP or servlet it's embedded in; if it's absolute, then it's the URL you'd need to type in the browser to fetch that file.