sitemesh and css problem
843840Nov 1 2008 — edited Nov 1 2008Hi. I want to use SiteMesh to decorate various pages (jsp, html). I have a decorator, but i can't seem to link a css sheet to my pages.
I have decorators.xml in /WEB-INF/
<?xml version="1.0" encoding="ISO-8859-1"?>
<decorators defaultdir="/WEB-INF/decorators">
<decorator name="main" page="main.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
I have main.jsp in /WEB-INF/decorators/
<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemeshdecorator" %>
<head>
<title>
<decorator:title default="Java Tutorial" />
</title>
<link href="*/decorators/main.css*" rel="stylesheet" type="text/css"> //here I also tried href="<%= request.getContextPath() %>/decorators/main.css", but it //also does'n work
<decorator:head />
<body>
<decorator:body />
</body>
</html>
and I have main.css in /WEB-INF/decorators/
but when I run the application it displays everything except for the stylesheet elements. Any idea what I'm doing wrong?