Try this: <link rel="stylesheet" href="<s:url value='/css/pp.css'/>"
----- Original Message ----- From: Larry Reed <larryr...@comcast.net> Date: Monday, July 6, 2009 3:08 Subject: link to stylesheet in jsp doesn't work To: user@struts.apache.org > I'm having a problem linking to a stylesheet and could use some help. > > My project layout in Eclipse is as follows: > > pp_base > WebContent > css > pp.css > guest > GuestWelcome.jsp > index.html > > in index.html, I have > > <html> > <head> > <link rel="stylesheet" href="css/pp.css" > type="text/css"/> </head> > > <body> > <h1>One moment please.</h1> > </body> > > </html> > > in GuestWelcome.jsp, I have > > <%@ page contentType="text/html; charset=UTF-8" %> > <%@ taglib prefix="s" uri="/struts-tags" %> > <html> > <head> > <link > rel="stylesheet" href="../css/pp.css" type="text/css" /> > </head> > > <body> > <h1>Another moment please.</h1> > > </body> > > </html> > > The style sheet is referenced correctly by index.html but is not > referenced correctly by GuestWelcome.jsp. > > However, if I replace the link in GuestWelcome.jsp with > > <style > type="text/css"> <jsp:include page="../css/pp.css"/> > </style> > > then the style sheet is included in place, and it works fine. > > What am I doing wrong? > > Thanx, Larry > > ----------------------------------------------------------------- > ---- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > -- Cand.-Ing. (FH) Christian B. Ries Fachhochschule Bielefeld University of Applied Sciences FB3 / Ingenieurwissenschaften und Mathematik Fon: +49 (0) 521 32 73 538 Mobile: +49 (0) 176 64 64 63 58