myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: Tomahawk & Spring Webflow : enctype="multipart/form-data" doesnt work
Date Thu, 06 Nov 2008 16:23:27 GMT
thanks!

do you mind to document this in the wiki ?
I heard that the spring wf does some wild stuff, and since you figured,
it would be great to create a wiki page for that!

thanks!
Matthias

On Wed, Nov 5, 2008 at 9:57 PM, djohnjimmy <djohnjimmy@gmail.com> wrote:
>
> I got it working now.
>
> The problem was that...
>
> "When Spring Web Flow comes into picture, the faces Servlet is not the big
> guy delivering the views - its Spring's MVC Dispatcher Servlet that serves
> the requests"
>
> Although, everyone advises Tomahawk Extensions Filter to be mapped to Faces
> Servlet. That doesnt serve well when we have SWF in between. So, instead of
> the following fliter-mapping in web.xml.
>
> <filter-mapping>
> <filter-name>Extensions Filter</filter-name>
> <servlet-name>Faces Servlet</servlet-name>
> </filter-mapping>
>
> Try this :
> <filter-mapping>
> <filter-name>Extensions Filter</filter-name>
> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
> </filter-mapping>
>
> <!-- Map all /spring requests to the Dispatcher Servlet for handling -->
> <servlet-mapping>
> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
> <url-pattern>/spring/*</url-pattern>
> </servlet-mapping>
>
> <filter>
> <filter-name>Extensions Filter</filter-name>
> <filter-class>org.apache.myfaces.webapp.filter.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>
> <init-param>
> <description>
> Set the path where the intermediary files will be stored.
> </description>
> <param-name>uploadRepositoryPath</param-name>
> <param-value>/temp</param-value>
> </init-param>
> </filter>
>
>
> djohnjimmy wrote:
>>
>> Can someone please take a look at this. I am stuck BIG time. Thanks!
>>
>>
>> djohnjimmy wrote:
>>>
>>> My uploadedFile is null.
>>>
>>> If I put the  <h:form enctype="multipart/form-data"> then the page never
>>> goes to the next view. If the enctype="plain/text" then it navigation
>>> works but the uploadedFile is null.
>>>
>>> Environment :
>>>  Spring WebFlow : 2.0.3.Release
>>>  Myfaces : 1.2.4
>>>  Tomahawk : 1.1.6
>>>  tomahawk-facelets (google project) : 1.1.6.2
>>>  Websphere AS : 6.1.0.17
>>>
>>>
>>> My web.xml
>>>  http://www.nabble.com/file/p20333785/web.xml web.xml
>>>
>>> Webflow xml
>>>  http://www.nabble.com/file/p20333785/upload.xml upload.xml .
>>>
>>> The upload xhtml (I am using facelets and not jsp)
>>>  http://www.nabble.com/file/p20333785/csvUpload.xhtml csvUpload.xhtml
>>>
>>> The backend bean :
>>>  http://www.nabble.com/file/p20333785/UploadCSV.java UploadCSV.java
>>>
>>> The POJO that I am populating with the CSV values :
>>>  http://www.nabble.com/file/p20333785/CSVPractice.java CSVPractice.java
>>>
>>> The uploaded CSV details in the 2nd Page : // It uses a h:dataTable to
>>> display the CSV data uploaded in the previous page i.e. csvUpload.xhtml
>>>  http://www.nabble.com/file/p20333785/uploadedCSVDetails.xhtml
>>> uploadedCSVDetails.xhtml
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/InputFileUpload-UploadedFile-returns-null-tp4903754p20349023.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Mime
View raw message