primefacesglassfish-4.1netbeans-8.1

Primefaces default css not work with Glassfish 4.1.1


When creating a template and it automatically creates css files and after create jsp using template,


Solution

  • I found the solution.

        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <h:outputStylesheet name="./css/default.css"/>
            <h:outputStylesheet name="./css/cssLayout.css"/>
            <title>Facelets Template</title>
        </h:head>
    

    Instead of
    <h:outputStylesheet name="./css/default.css"/>
    use
    <link href="./../resources/css/default.css" rel="stylesheet" type="text/css"/>