David: I cannot thank you enough for all of your
help...
I
agree with you on all points, I have been working with the core and the only
reason I have been have been messing with the tomahawk components is due to a
project requirement of using a calendar object and tree
object...
I
am going to spend the next few days working with the core to get up to speed as
best as I can - right now I have the critical path for my project - so I've been
busy learning as much as I can.
My web.xml file has been very close each time, I finally just copied the
web.xml file from myfaces-example-blank-1 and modified it as
needed.
"That did not work at first..."
The truly frustrating is this: "You cannot use
Myfaces-core-1.1.2 and Tomahawk-1.1.3-SNAPSHOT
together".
I'd wish that was noted on the http://myfaces.apache.org/... Because, the statement on
http://myfaces.apache.org/ is very
misleading:
Please pay attention to the fact
that you cannot use this release of MyFaces Core with the MyFaces Tomahawk
library in version 1.1.1 - it will only work with the Tomahawk library in
version 1.1.2 and onward. (The 1.1.2 release is currently only available as a
nightly. The official release is expected in a few
days.)
From the release 1.1.2 on, you can use any Tomahawk release with a release number greater than 1.1.2 with any MyFaces Implementation release - we have taken special care to enable this.
"So I had thought that using Myfaces-core-1.1.2 and
Tomahawk-1.1.3-SNAPSHOT was possible."
It is not... I had to use:
myfaces-api-1.1.1.jar
myfaces-impl-1.1.4-SNAPSHOT.jar
myfaces-impl-1.1.4-SNAPSHOT.jar
The way I found this out about this
part concerning the libraries - what I did was just copied the libraries
from myfaces-example-blank-1 into my project:
antlr-2.7.2.jar
commons-beanutils-1.7.0.jar
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-collections-3.1.jar
commons-digester-1.7.jar
commons-el-1.0.jar
commons-el-1.0.jar
commons-fileupload-1.0.jar
commons-lang-2.1.jar
commons-logging-1.0.4.jar
commons-lang-2.1.jar
commons-logging-1.0.4.jar
commons-validator-1.1.4.jar
jstl-1.1.2.jar
jstl-1.1.2.jar
myfaces-api-1.1.1.jar
myfaces-impl-1.1.4-SNAPSHOT.jar
oro-2.0.8.jar
myfaces-impl-1.1.4-SNAPSHOT.jar
oro-2.0.8.jar
struts-1.2.8.jar
tomahawk-1.1.3-SNAPSHOT.jar
tomahawk-1.1.3-SNAPSHOT.jar
xalan-2.5.1.jar
xml-apis-1.0.b2.jar
xml-apis-1.0.b2.jar
Once I had copied these (I don't believe I need the struts-1.2.8.jar), I
was off and running.
No where was it explained that you need a mixture of
myfaces-api-1.1.1.jar, myfaces-impl-1.1.4-SNAPSHOT.jar and
tomahawk-1.1.3-SNAPSHOT.jar, plus dependancies to get Tomahawk to work
properly.
Again, thank you for your help!
--Todd
From: David G. Friedman
[mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 3:52
PM
To: MyFaces Discussion
Subject: RE: Oh so very very close
- Filter Mapping Error still: ExtensionsFilter not correctly
configured.
Todd,
I really doubt you need it for learning MyFaces and I recommend you take those ExtensionFilter lines out of your web.xml until you get the hang of JSF. The core is basically equivalent to the JSF RI. Tomahawk is extra toys to play with and probably not even referenced in most older JSF books. And, since it has been changing lately and being moved into a separate set of package to help programmers see how distinct it is from the core, those books which do reference Tomahawk probably don't even have the new syntax or current usage information for it, hence your extensionsFilter problem as a prime example of how it has changed lately.
I really doubt you need it for learning MyFaces and I recommend you take those ExtensionFilter lines out of your web.xml until you get the hang of JSF. The core is basically equivalent to the JSF RI. Tomahawk is extra toys to play with and probably not even referenced in most older JSF books. And, since it has been changing lately and being moved into a separate set of package to help programmers see how distinct it is from the core, those books which do reference Tomahawk probably don't even have the new syntax or current usage information for it, hence your extensionsFilter problem as a prime example of how it has changed lately.
However, if you are sure you need Tomahawk, which is an optional, component, try taking the /WEB-INF/web.xml file from the tomahawk file (tomahawk-examples-1.1.3-SNAPSHOT-bin.zip) example war: tomahawk-examples-1.1.3-SNAPSHOT/myfaces-example-blank-1.1.3-SNAPSHOT.war
Both are available in the nightly section (I was just there and downloaded it).
But, basically, THIS is how
the tomahawk extensions are loaded in the 1.1.3 snapshot. Again, you
really should remove the extensions filter if you are learning JSF -
stick to the CORE until you can handle JSF with
ease.
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<!-- followed by mappings
-->
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
Regards,
David Friedman / [EMAIL PROTECTED]
-----Original Message-----
From: Todd Patrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2006 3:36 PM
To: MyFaces Discussion
Subject: Oh so very very close - Filter Mapping Error still:
ExtensionsFilter not correctly configured.
I have:
MyFaces Core 1.1.2
tomahawk-1.1.3-SNAPSHOT
My web.xml filter is set-up as:
<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>*.jsf</url-pattern>
</servlet-mapping>
However, I still return the error:
javax.servlet.ServletException: ExtensionsFilter not correctly
configured. JSF mapping missing. JSF pages not covered.
When I add:
<context-param>
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
<param-value>false</param-value>
</context-param>
I don't have the error, I just get plain HTML GUI controls.
I know I am close, but I can't get past this... Do I need to use the
SNAPSHOT of MyFaces Core instead of MyFaces Core 1.1.2?
Thanks,
--Todd
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
Regards,
David Friedman / [EMAIL PROTECTED]
-----Original Message-----
From: Todd Patrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2006 3:36 PM
To: MyFaces Discussion
Subject: Oh so very very close - Filter Mapping Error still:
ExtensionsFilter not correctly configured.
I have:
MyFaces Core 1.1.2
tomahawk-1.1.3-SNAPSHOT
My web.xml filter is set-up as:
<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>*.jsf</url-pattern>
</servlet-mapping>
However, I still return the error:
javax.servlet.ServletException: ExtensionsFilter not correctly
configured. JSF mapping missing. JSF pages not covered.
When I add:
<context-param>
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
<param-value>false</param-value>
</context-param>
I don't have the error, I just get plain HTML GUI controls.
I know I am close, but I can't get past this... Do I need to use the
SNAPSHOT of MyFaces Core instead of MyFaces Core 1.1.2?
Thanks,
--Todd

