environment OS : macOS Hight Sierra Eclipse : Neon.3 Release (4.6.3) Server : GlassFish 4.1 Java : JDK1.8 JSF : 2.2
XHTML before modification
<?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:h="http://xmlns.jcp.org/jsf/html"
  xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
  <title>input screen</title>
  <h:outputStylesheet library="css" name="base.css"/>
</head>
<body>
<h:form>
  <h:outputLabel>Please enter the password.</h:outputLabel>
  <br />
  <h:inputText id="password" value="#{passwordBean.password}">
    <f:validateRequired />
    <f:validateLength minimum="3" maximum="10"></f:validateLength>
  </h:inputText>
  <h:message for="password" errorClass="error" />
<abridgement>
base.css
@CHARSET "UTF-8";
.error {
    color: red;
}

server.log
[2017-12-12T20:29:46.608+0900] [glassfish 4.1] [INFO] [jsf.non_displayed_message] [javax.enterprise.resource.webcontainer.jsf.renderkit] [tid: _ThreadID=32 _ThreadName=http-listener-1(2)] [timeMillis: 1513078186608] [levelValue: 800] [[
  WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]]]
<head><h: head>Modified 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:h="http://xmlns.jcp.org/jsf/html"
  xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
  <title>input screen</title>
  <h:outputStylesheet library="css" name="base.css"/>
</h:head>
<abridgement>

Recommended Posts