• Post Reply Bookmark Topic Watch Topic
  • New Topic

h:outputStylesheet and servlet mapping  RSS feed

Dennis Ryan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, the new tag in JSF 2.0 outputStylesheet has been vexing me for a while now. I want to configure my web application so that the jsf servlet mapping is *.jsf but when I use this mapping and the outputStylesheet tag, my css is rendered correctly but any images I have included in my css (e.g. "url(../images/bg-094c09.gif)" ) are not rendered. If I add the "/faces/*" servlet mapping and access the site via "faces/index.xhtml" the images are rendered correctly but pages accessed via *.jsf still do not render the images correctly but the css is rendered. I have a resources directory under my web apps root directory and my css and images are in the resources directory.

Furthermore, if I use a outputlink tag with the value set to "faces/something.xhml" each clink on the rendered hyperlink adds an additional "faces" word the url in the browser: first click http://mysite/faces/something.xhtml next click produces http://mysite/faces/faces/something.xhtml, next click will produce http://mysite/faces/faces/faces/something.xhtml and so on but the css images are rendered correctly each time.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!