Search code examples
tomcatfaceletsfilenotfoundexception

Tomcat facelets issue. fnf exception but file is there?


Annoyingly I am getting a very inconsistent error that is difficult to understand. I can probably easily work around it by simply changing the file name or directory structure of my project or files, but I would like to keep it in it's current format.

I have a navigation menu with the relevant sub-navigation that looks as follows:

<li><a jsfc="h:link" outcome="Windows">#{global.windowsNormal}</a>
<ul class="leftSubNav">
    <li><a jsfc="h:link" outcome="javaSetupWin">#{global.javaInstall}</a></li>
    <li><a jsfc="h:link" outcome="vBoxSetupWin">#{global.virtualBoxInstall}</a></li>
    <li><a jsfc="h:link" outcome="mavenSetupWin">#{global.mavenInstall}</a></li>
</ul>

The outcomes are configured as follows:

<navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
        <from-outcome>javaSetupWin</from-outcome>
        <to-view-id>/views/tutorials/windows/Java-Setup.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>
<navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
        <from-outcome>vBoxSetupWin</from-outcome>
        <to-view-id>/views/tutorials/windows/Virtualbox-Setup.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>
<navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
        <from-outcome>mavenSetupWin</from-outcome>
        <to-view-id>/views/tutorials/windows/Setup-Maven.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>

Of course all the files are present in the same directory and syntax is correct. Yet when I click on the 'mavenSetupWin' link in browser I get a fnf as follows!! :

Note that Tomcat is looking in totally the wrong directory (views/includes/...) vs (views/windows/...) ?

Please post any clues as to what may be reason.

Thank you, Yucca Nel

As I can't answer my own question I am editing that I found the problem... I needed to clear my cache.


Solution

  • If you face similar issue, I solved mine by clearing my cache...