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 - Facelets Template generated by NetBeans uses wrong css file path
Summary: Facelets Template generated by NetBeans uses wrong css file path
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 18:50 UTC by stanleyshi
Modified: 2017-06-15 18:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of the template file generated by NetBeans (52.98 KB, image/png)
2017-06-15 18:50 UTC, stanleyshi
Details

Note You need to log in before you can comment on or make changes to this bug.
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <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>

    <h:body> ... </h:body>

</html>