title: Apache tomhawk <t:inputFileUpload> tag not working
body: <p>I am trying to upload a file using Apache tomhawk with JSF 2.0, but when I try to navigate to the corresponding view I am getting the following error:</p>
  
  <pre><code>javax.faces.view.facelets.TagAttributeException: /jsf/importReport.xhtml @30,51 value="#{import.uploadedFile}" Failed to parse the expression [#{import.uploadedFile}]
  at com.sun.faces.facelets.tag.TagAttributeImpl.getValueExpression(TagAttributeImpl.java:401)
  at com.sun.faces.facelets.tag.TagAttributeImpl.getValueExpression(TagAttributeImpl.java:351)
  at com.sun.faces.facelets.tag.jsf.ValueHolderRule$DynamicValueExpressionMetadata.applyMetadata(ValueHolderRule.java:129)
  at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)
  at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:129)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:102)
  at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.doNewComponentActions(ComponentTagHandlerDelegateImpl.java:402)
  at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:159)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
  at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:103)
  at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
  at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
  at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
  at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:108)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
  at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
  at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:186)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
  at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
  at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
  at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
  at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
  at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
  at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
  at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
  at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
  at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
  at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
  at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
  at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
  at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
  at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
  at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
  at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
  at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:619)
  Caused by: javax.el.ELException: Failed to parse the expression [#{import.uploadedFile}]
  at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:146)
  at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:172)
  at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:217)
  at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:67)
  at com.sun.faces.facelets.tag.TagAttributeImpl.getValueExpression(TagAttributeImpl.java:385)
  ... 87 more
  Caused by: javax.el.ELException: The identifier [import] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.
  at org.apache.el.parser.AstIdentifier.setImage(AstIdentifier.java:133)
  at org.apache.el.parser.ELParser.Identifier(ELParser.java:1217)
  at org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1193)
  at org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1019)
  at org.apache.el.parser.ELParser.Value(ELParser.java:968)
  at org.apache.el.parser.ELParser.Unary(ELParser.java:950)
  at org.apache.el.parser.ELParser.Multiplication(ELParser.java:714)
  at org.apache.el.parser.ELParser.Math(ELParser.java:634)
  at org.apache.el.parser.ELParser.Compare(ELParser.java:446)
  at org.apache.el.parser.ELParser.Equality(ELParser.java:340)
  at org.apache.el.parser.ELParser.And(ELParser.java:284)
  at org.apache.el.parser.ELParser.Or(ELParser.java:228)
  at org.apache.el.parser.ELParser.Choice(ELParser.java:185)
  at org.apache.el.parser.ELParser.Expression(ELParser.java:177)
  at org.apache.el.parser.ELParser.DeferredExpression(ELParser.java:115)
  at org.apache.el.parser.ELParser.CompositeExpression(ELParser.java:43)
  at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:115)
  ... 91 more*
  </code></pre>
  
  <p>I am using the following web.xml:</p>
  
  <pre><code>&lt;servlet&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;filter&gt;
  &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;uploadMaxFileSize&lt;/param-name&gt;
          &lt;param-value&gt;20m&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
  
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;/filter-mapping&gt;
  
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/faces/myFacesExtensionResource/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  
  &lt;context-param&gt;
  &lt;param-name&gt;javax.faces.CONFIG_FILES&lt;/param-name&gt;
  &lt;param-value&gt;/WEB-INF/config/faces-config.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;context-param&gt;
  
  &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
  &lt;param-value&gt;client&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;context-param&gt;
  &lt;param-name&gt;javax.servlet.jsp.jstl.fmt.localizationContext&lt;/param-name&gt;
  &lt;param-value&gt;resources.application&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
  &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>I am using the following JSF code for the view:</p>
  
  <pre><code>&lt;ui:define name="content"&gt;
  &lt;div id="midbody" class="span-24"&gt;
  &lt;h:form enctype="multipart/form-data"&gt;
  &lt;t:inputFileUpload value="#{import.uploadedFile}"&gt;&lt;/t:inputFileUpload&gt;
  &lt;h:commandButton action="#{import.getFile}"&gt;&lt;/h:commandButton&gt;
  &lt;/h:form&gt;
  &lt;/div&gt;
  
  &lt;/ui:define&gt;
  </code></pre>
  
  <p>My managed bean is as follows:</p>
  
  <pre><code>public class ImportMB {
      private UploadedFile uploadedFile;
  
      public String getFile(){
         String fileName = FilenameUtils.getName(uploadedFile.getName());
         try {
  InputStream myInput = uploadedFile.getInputStream();
  System.out.println(fileName);
  } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }
  return "importReport";
      }
  </code></pre>