You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by jitechno <ji...@gmail.com> on 2011/05/31 17:02:45 UTC

Problem with Trinidad's uploads

I just got a really bad experience with Tomahawk and Trinidad. Deadline is
out, project is out, client is out.
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. ONly instead message "File so large.." I have message "The system
is not able to find file".
Ok, had anybody success with upload up to 2 Mb and HOW he has schieved this
fantastic result?
-- 
View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31741639.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Problem with Trinidad's uploads

Posted by jitechno <ji...@gmail.com>.
Scott, I dont know where is a bug. I can upload whole project, it is not so
big. If you like to start it in your environment anf check, it is nice.
I thihk, it is not a question about permissions, at least, because I am able
to save small files. There any no restrictions  for local file store. Is it
out of space ? No, because I have enough space on disk.
May be, problem with trinidad's tmp folder configuration
/tmp/TrinidadUploads/?
And what really means org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE ?
Is is maximum size of uploaded file or Maximum disk space per request ? 
But here it looks as the same..

principal settings are below:
<context-param>
<!-- Maximum memory per request (in bytes) -->
<param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>
<!-- Use 500K -->
<param-value>512000</param-value>
</context-param>
<context-param>
<!-- Maximum disk space per request (in bytes) -->
<param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>
<!-- Use 5,000K -->
<param-value>5120000</param-value>
</context-param>
<context-param>
    <!-- directory to store temporary files -->
<param-name>org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR</param-name>
<!-- Use a TrinidadUploads subdirectory of /tmp -->
<param-value>/tmp/TrinidadUploads/</param-value>
</context-param>
-- 
View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31747960.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Problem with Trinidad's uploads

Posted by Scott O'Bryan <da...@gmail.com>.
Jitechno,

We use file upload all the time.  Perhaps you could create a simple
test case and upload it with a bug and we can take a look at it.  I
would venutre to guess that either your init parameters are configured
wrong or the local file store is either out of space or does not have
the correct permissions.  Large files are written to disk rather then
bein left in memory.

Scott

Sent from my iPhone

On May 31, 2011, at 9:34 AM, jitechno <ji...@gmail.com> wrote:

>
> hello Cédric,
> no, I did not mix them.
> Problems with Tomahawk I had before, I was not able fire upload method.
> So, last one was based on JSF and Trinidad.
> I have tested it with Firefox and on localhost.
> --
> View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31741957.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>

Re: Problem with Trinidad's uploads

Posted by jitechno <ji...@gmail.com>.
hello Cédric,
no, I did not mix them.
Problems with Tomahawk I had before, I was not able fire upload method.
So, last one was based on JSF and Trinidad.
I have tested it with Firefox and on localhost. 
-- 
View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31741957.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Problem with Trinidad's uploads

Posted by Cédric Durmont <cd...@gmail.com>.
Hi jitechno,

Sorry you had such a bad experience.
FYI, I just finished last week a small app with Trinidad2. It's a
release/update manager, where I put my other software. I have
successfully uploaded several files that where about 50Mb, all without
a hitch. But in this project I don't use Tomahawk. Maybe you had a
conflict between Trinidad filter and Tomahawk Extensions Filter ?

Regards,
Cedric

2011/5/31 jitechno <ji...@gmail.com>:
>
> I just got a really bad experience with Tomahawk and Trinidad. Deadline is
> out, project is out, client is out.
> 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. ONly instead message "File so large.." I have message "The system
> is not able to find file".
> Ok, had anybody success with upload up to 2 Mb and HOW he has schieved this
> fantastic result?
> --
> View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31741639.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Re: Problem with Trinidad's uploads

Posted by Martin Koci <ma...@gmail.com>.
forward from users@myfaces.apache.org:

Hi,

I tried you project and:

1) faces-config.xml is wrong, it needs <faces-config> as root element,
not <root>

2) trinidad-config is wrong, it has <filter> element - this one belongs
to web.xml and element <uploaded-file-processor-settings> with children
does not exist: see
http://myfaces.apache.org/trinidad/devguide/fileUpload.html


Please notice that in console you can see a lots and warnings like:
8.6.2011 20:25:04
org.apache.myfaces.trinidadinternal.config.ConfigParser$Handler
endElement
WARNING: Element upload-max-memory is not understandable

After correction of 1 and 2):

3) I created /tmp/TrinidadUpload and increased
org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE to 1000000000

and it uploads 1GB file without problem.


Regards, 

Kočičák

jitechno píše v Čt 02. 06. 2011 v 03:14 -0700:
> Joachim, I put entire project (without jaf&trinidad's jars) 
> http://old.nabble.com/Re%3A-Problem-with-Trinidad%27s-uploads-p31748075.html
> on this thread.
>  If you have time to look, thanks a lot.
>  This is the same version, what I use to test.
> Oleg
> 



Re: Problem with Trinidad's uploads

Posted by jitechno <ji...@gmail.com>.
Joachim, I put entire project (without jaf&trinidad's jars) 
http://old.nabble.com/Re%3A-Problem-with-Trinidad%27s-uploads-p31748075.html
on this thread.
 If you have time to look, thanks a lot.
 This is the same version, what I use to test.
Oleg

-- 
View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31756421.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Problem with Trinidad's uploads

Posted by jitechno <ji...@gmail.com>.
Hi Leonardo, 
I dont need setup Tomahawk and Trinidad together. I want find what is wrong
with 
Trinidad part. It is enough for me.
Ok, I just have attached project without libraries under Netbeans 6.9.1 .
I use Jsf 2.0 and trinidad-assembly-2.0.0.

Thanks for all advices

http://old.nabble.com/file/p31748075/TrinidadUpload.rar TrinidadUpload.rar 
 

Leonardo Uribe wrote:
> 
> 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 <js...@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
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-with-Trinidad%27s-uploads-tp31741639p31748075.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Problem with Trinidad's uploads

Posted by Leonardo Uribe <lu...@gmail.com>.
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 <js...@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
>
>

Re: Problem with Trinidad's uploads

Posted by Joachim Schrod <js...@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