0

I have read two discussion on the addressed error message (discussion 1, discussion 2) but none of them is relevant to my case. I do not use explicitly any javascript in my JSF template and JSF template client page. I use ajax by <f:ajax event="action" execute="@form" render=":tartalom"/> in my JSF template client. Obviously it uses the jsf.js which is generated to my xhtml: <script type="text/javascript" src="/muveltnepkampany/javax.faces.resource/jsf.js.xhtml?ln=javax.faces&amp;stage=Development"></script>. I do not have idea why I get the error message when I do not use javascript explicitly and I expect from jsf that if it uses its own javascript than it should know where to find it. The JSF template which generates the error is the following:

<?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 name="google-site-verification" content="iEntT6WhoXU3nAJnz7K77YMt1YP9XG9GTdqVdDaFEbE" />
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="description" content="A legfrissebb bestsellerek e-könyvben és könyvben. Folyamatosan frissülő kínálat és változatos akciók."/>
    <meta name="author" content="Somebody"/>
    <meta name="googlebot" content="index,follow"/>
    <meta name="Revist-after" content="7 days"/>
    <meta name="country" content="Hungary"/>
    <meta name="content-language" content="hu, hun, hungarian"/>
    <link rel="icon" type="image/x-icon" href="http://cdn.bknw.net/fav3.jpg" />
    <h:outputStylesheet library="css" value="3-col-portfolio.css"/>
    <title><ui:insert name="cim">Nem adtál meg címet</ui:insert></title>
    <ui:insert name="metaparam"></ui:insert>
</h:head>

<h:body>
    <div id="content">
        <ui:insert name="content">Content</ui:insert>
    </div>

</h:body>

Community
  • 1
  • 1
Roland
  • 327
  • 7
  • 19
  • 1
    Pleadse read http://www.stackoverflow.com/tags/jsf/info about [mcve], and version info – Kukeltje May 03 '16 at 10:14
  • Thanks @Kukeltje. I was using Mojarra implementation of JSF 2.2 with Glasfish 4.1.1 on a local windows 8 environment. – Roland May 03 '16 at 11:43
  • JSF 2.2 is an api version. Mojarra 2.2.x is an implementation version. And **was** using? Not anymore? – Kukeltje May 03 '16 at 11:44
  • Please search stackoverflow on good usage of the 'library' attribute. It is not meant to point to 'css' or 'js'. – Kukeltje May 07 '16 at 10:30

1 Answers1

1

During the debugging I relaized that I used wrong attribute in my outputStylesheet tag. Instead of using name attribute I put the filename into the value attribute and that did not work. As I fixed it there is no more error messages. The only question here is why we get misleading error message from JSF.

Roland
  • 327
  • 7
  • 19
  • Start by answering the my comment on the question... If someone wants to take a look at source code of some framework to try to help you, that person at least needs to know where to look at, and needs to know what code **you** used (in [mcve] format) – Kukeltje May 03 '16 at 11:43