Hi

I am using Apache MyFaces for my project (jsf 2.0) and I want to use the
tomahawk framework (for uploadfile, calendar, etc)

Sadly, Tomcat cancell buidling the war.

When I comment out filter mapping for tomahawk, war gets deployed, but
sided that use:
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"; %>
fail with server 500 error.

when i put filter mapping as suggested

http://myfaces.apache.org/tomahawk/extensionsFilter.html

all fails with SEVERE Filter error.

Please help I need the upload methods urgently for my apache myfaces
webproject.


Best Regards,

Adam
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" version="2.5">
  <display-name>docweb</display-name>
  <session-config>
  	<session-timeout>600</session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>index.jsf</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.php</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <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>
  <!--
  <filter>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>uploadMaxFileSize</param-name>
        <param-value>20m</param-value>
    </init-param>
</filter>
-->
 <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
 <!--
 <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
   
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
-->
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
<!--
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
</filter-mapping>
-->
  
  
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <description>
	This parameter tells MyFaces if javascript code should be allowed in
	the rendered HTML output.
	If javascript is allowed, command_link anchors will have javascript code
	that submits the corresponding form.
	If javascript is not allowed, the state saving info and nested parameters
	will be added as url parameters.
	Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
	If true, rendered HTML code will be formatted, so that it is 'human-readable'
	i.e. additional line separators and whitespace will be written, that do not
	influence the HTML code.
	Default is 'true'</description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
	If true, a javascript function will be rendered that is able to restore the
	former vertical scroll on every request. Convenient feature if you have pages
	with long lists and you do not want the browser page to always jump to the top
	if you trigger a link or button action that stays on the same page.
	Default is 'false'
</description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
	  <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
	  <param-value>true</param-value>
	</context-param>
	
	
  <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <error-page>
	    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
	    <location>/index.jsp</location>
  </error-page>
</web-app>

Reply via email to