No errors in the log file.
 
I changed my web.xml file to:
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="
http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>true</param-value>
    </context-param>
 
    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
        </init-param>
    </filter>
 
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
 
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
 
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
 
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>
 
 
Plus, I changed the jsp-forward tag to:
 
<jsp:forward page="tbrowser.jsf"/>
 
Now I get the same ole' error:
javax.servlet.ServletException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered.
 
What's interesting is when I look in the myfaces-impl-1.1.2.jar, the following package isn't there:
 
org.apache.myfaces.webapp.filter
 
Only:
 
org.apache.myfaces.webapp
 
 
What is going on? Geez... I did get the simple.war to work, blank.war had a _javascript_ error.
 
Thanks,
 
--Todd


From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 10:22 AM
To: MyFaces Discussion
Subject: RE: How do I properly use jsp:forward in MyFaces?

Todd,
 
Does your web server have any startup errors in the log files for the /transactionbrowser web application?  Also, have you put a simple/basic JSF page in /tbrowser.jsp and can you post it so we can check the syntax?
 
Regards,
David
-----Original Message-----
From: Cagatay Civici [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 9:33 AM
To: MyFaces Discussion
Subject: Re: How do I properly use jsp:forward in MyFaces?

Hi,

Removing the "/" at the beginning may work,

<jsp:forward page="faces/tbrowser"/>

Cagatay

On 5/5/06, Todd Patrick <[EMAIL PROTECTED] > wrote:
OK, this is making sense;
 
I downloaded the blank.war file and I am installing it now - in the meantime, I went back and changed
 
<jsp:forward page="/faces/tbrowser.jsp"/>
 
to:
 
<jsp:forward page="/faces/tbrowser"/>
 
Now, I receive:

HTTP Status 404 - /transactionbrowser/tbrowser
type Status report
message /transactionbrowser/tbrowser
description The requested resource (/transactionbrowser/tbrowser) is not available.

My servlet-mapping is still:
 
<filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>maxFileSize</param-name>
        <param-value>20m</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
 
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
 
 
Thanks,
 
--Todd


From: David G. Friedman [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2006 12:49 AM
To: MyFaces Discussion
Subject: RE: How do I properly use jsp:forward in MyFaces?

Todd,
 
From your various posts tonight, you seem to have a number of JSF concepts mixed.  Is this your first Faces Webapp? (That is not meant to be an insult but a simple question)
 
If your project folder looks like this as you indicated:
 
/transactionbrowser/
- WEB-INF
- resources
-index.jsp
-tbrowser.jsp
 
Then the various mappings you have posted over the past 24 hours have often been incorrect.  With this webapp, your main url would likely be:
http://127.0.0.1/transactionbrowser and you would expect it to invoke the welcome page /index.jsp.  Your example index.jsp was listed as:
 
<jsp:forward page="/faces/tbrowser.jsp"/>
 
THAT is where your first make came from: your mappings.  JSF is often taught using SUFFIX mapping so the urls such as /index.jsf are understood to be imaginary (no such file exists) allowing the servlet to map /index.jsf to compile the view from the jsp file /index.jsp.  With prefix mapping the url "/index.jsf" would be equivalent to "/faces/index" see? When you switch to PREFIX mapping like having mappings start "/faces/whatever", you must skip the .jsp extension so your index.jsp file should contain:
 
<jsp:forward page="/faces/tbrowser"/>
 
Adding the .jsp suffix while using prefix mapping is causing your problem (that plus how your web.xml Servlet and Filter mappings are setup). I strongly recommend you to back to the myfaces blank.war and example war files to see how standard *.jsf suffix mapping works and begin your application with that style until you are positive you can make a working JSF application.  It will save you time and effort since searching (the web or this lists's archives) on the *.jsf SUFFIX extension will result in a much greater number of relevant posts than if you use PREFIX "/faces/*" mapping.
 
Regards,
David Friedman / [EMAIL PROTECTED]
-----Original Message-----
From: Todd Patrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2006 1:15 AM
To: MyFaces Discussion
Subject: How do I properly use jsp:forward in MyFaces?

I have a project folder that looks like:
 
/transactionbrowser/
- WEB-INF
- resources
-index.jsp
-tbrowser.jsp
 
 
With the servlet-mapping of:
 
<filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>maxFileSize</param-name>
        <param-value>20m</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
 
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
 
 
The only URLs that work are:
 
 
 
On my index.jsp I have:
 
<jsp:forward page="/faces/tbrowser.jsp"/>
 
 
So, when I go to:
 
 
I see the page, but not with the MyFaces rendering, I still plain control GUI components with none of the add MyFaces filter files. How do I use jsp:forward properly to get to:
 
 
or
 
 
 
I can't use the following since that doesn't run the MyFaces servlet:
 
<jsp:forward page="/transactionbrowser/faces/tbrowser.jsp"/>
 
 
Thoughts or examples are appreciated.
 
Thanks,
 
--Todd
 
 

Reply via email to