Using JSF 2, Facelets, NetBeans 7.0, Glassfish 3.2, Mojarra 2.1.0
I get the folllowing Warnings in my server log when changing pages or referencing resources.
WARNING: JSF1015: Request path '/faces/faces/EnrollPage.xhtml' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'. I am doing navigation through redirect with the following method:
I've tried leaving off the "faces/" prefix like the warning suggests, but when I do that, I cannot navigate.
I leave on the prefix and it navigates, but I get the warning message.
Web page resources:
WARNING: JSF1015: Request path '/faces/faces/resources/css/common.css' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'.
WARNING: JSF1015: Request path '/faces/faces/resources/scripts/calendar-setup.js' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'. Here is how I refernce the resources in the <head> section of the page xhtml code:
Css file resources:
WARNING: JSF1015: Request path '/faces/faces/resources/Images/backgroundPage.jpg' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'. Here is how I refernce the image resources in the css file:
My directory structure is:
Web Pages -> resources ->Images
I am at a loss to understand how to get rid of the warning messages.
I have tried several different permutations of the reference addresses, but nothing else I have tried works.
Well the reason is that you are redirecting using the servlet engine, rather than using the JSF navigation functionality.
Is the whole "redirect to random page" functionality required?
Can you not express this functionality using the JSF navigation rules?
I need to do the redirect from within a backing bean, because there are sometimes conditions that I need to check to determine the page.
I could probably get around this in most cases, but I am trying to migrate a fairly large application from JSF 1.2 where this behavior was acceptable and was trying to lessen the migration pains.
When you mention "JSF Navigation rules" are you referring to navigation coded in the page itself (action="newpage.xhtml")?
Or do you mean JSF 1.2 navigation rules in an xml file?
I am trying to get away from the xml file becsuse it ended up being over 5000 lines for this application (so far) and I really want to avoid propigating that.
Most pages have conditions that need to be met before I can allow navigation away from that page.
A magnificient life is loaded with tough challenges. En garde tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss