This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270889

Summary: Facelets Template generated by NetBeans uses wrong css file path
Product: javaee Reporter: stanleyshi
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot of the template file generated by NetBeans

Description stanleyshi 2017-06-15 18:50:33 UTC
Created attachment 164552 [details]
Screenshot of the template file generated by NetBeans

R-click the web project (either under Maven or not) name > new > other > Categories = JavaServer Faces, File Types = Facelets Template > next > enter File Name, select the CSS radio button on Layout Style > Finish.

The css file path in the generated template file (shown below and the screenshot) is: name="./css/default.css".

It should be: name="css/default.css" instead.

------ Template.xhtml -----
<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""

        <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:body> ... </h:body>