aspose file tools
The moose likes JSF and the fly likes external Stylesheet  .css file in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "external Stylesheet  .css file in JSF" Watch "external Stylesheet  .css file in JSF" New topic
Author

external Stylesheet .css file in JSF

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
Hi All,

I am trying to include a external stylesheet file in the JSF page. But It is not applying any styles. can anyone give any ideas ?

Thanks
- Anand

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14480
    
    7

For that to work properly, you probably would need to escape it with <f:verbatim>. You also have to have the mystyle.css file in the same directory as the JSF page you're displaying. Finally, you have to be careful just where in the view definition you place it.

There's a RichFaces tag that's specially designed to reference CSS and JavaScript, and it additionally handles the relative URLs better than a raw <link> tag does.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: external Stylesheet .css file in JSF
 
Similar Threads
Linking External CSS in a JSP page
including .htc / .css files
h:outputStylesheet link ordering
ul + new web design = no bullets?
class= operation