myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: Problem with Trinidad's uploads
Date Wed, 01 Jun 2011 00:51:25 GMT
Hi

You can setup Tomahawk and Trinidad together. The problem here is you
are not taking into consideration how file upload works and which
library will be used to upload files. This applies to any jsf library
with a file upload solution.

There are two things any jsf library provides for file upload:

1. A jsf tag like t:inputFileUpload or tr:inputFile
2. A filter or FacesContext wrapper (special case for portlets) to
handle the incoming request.

Both trinidad and tomahawk has its own filter to handle this stuff.
>From page side it looks like this:

<form id="form1" enctype="multipart/form-data" ...>
  <!-- ... jsf generated html code -->
  <input type="file" ... />
  <!-- ... jsf generated html code -->
</form>

Note the part that says enctype="multipart/form-data". By default, JSF
does not handle this encode type, so you need to setup a filter that
handle this. Here is the important part: the filter that is setup ON
TOP will be the one who handle the request. If tomahawk is on top,
trinidad tr:inputFile will not work and viceversa, if trinidad is on
top, t:inputFileUpload will not work.

How to solve it? Put the entry for <filter-mapping> of your choice in
the right order on web.xml file. If your current setup does not work,
try to change the order. If that does not work, create a filter that
delegates first to the one you want and then to the other one.

Quite simple, isn't it?

regards,

Leonardo Uribe

2011/5/31 Joachim Schrod <jschrod@acm.org>:
> jitechno wrote:
>>
>> I just got a really bad experience with Tomahawk and Trinidad. Deadline is
>> out, project is out, client is out.
>
> Well, then quite obviously you should have asked earlier. Or the
> deadline was not realistic from the very start.
>
>> But question still exists : I am uploading files with Trinidad ver. 2. I am
>> not able upload large file, only appr. up to 100 Kb.
>> I found  tons of advices to change config parameters and did it, without
>> success.
>
> How about telling which config parameters you changed, where, and
> to what? That way readers here wouldn't need to 2nd guess your
> situation.
>
> Your approach to problem reports is not helpful, neither to you nor
> to other Trinidad users. I hope for you that it's different elsewhere.
>
>        Joachim
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Joachim Schrod                          Email: jschrod@acm.org
> Roedermark, Germany
>
>

Mime
View raw message