Hi,

here're some snippets from my code:

JSP:

                 <tc:file id="newFileItem"
                   required="true"
                   value="#{anlagenController.newFileItem}">
                   <tc:validateFileItem
                     maxSize="1048576"
                     contentType="application/pdf"/>
                 </tc:file>

web.xml:

 <filter>
   <filter-name>multipartFormdataFilter</filter-name>
   
<filter-class>org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</filter-class>
   <init-param>
<description>Set the size limit for uploaded files. Default value is 1 MB.
       Format: 10 = 10 bytes
       10k = 10 KB
       10m = 10 MB
       1g = 1 GB
     </description>
     <param-name>uploadMaxFileSize</param-name>
     <param-value>20m</param-value>
   </init-param>
 </filter>

 <filter-mapping>
   <filter-name>multipartFormdataFilter</filter-name>
   <url-pattern>/faces/*</url-pattern>
 </filter-mapping>


Do you include commons-fileupload-1.1.x.jar and tobago-fileupload-1.0.xjar in your war file?

Hope that helps.

Regards
Helmut



----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, April 26, 2007 5:55 PM
Subject: file-upload


Hi,

I try to use tc:file to upload files but I get an error message:

ERROR -
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.FileRenderer:90

- Can't process multipart/form-data without TobagoRequest. Please check
the web.xml and define a
TobagoMultipartFormdataFilter. See documentation for <tc:file>

I have added a TobagoMultipartFormdataFilter to my web.xml.
(I even get messages sayin that the upload repository is exactly as I have
configured it)

Can anybody help or send working code snippets of <tc:file>-tag and
web.xml?

Gr., Martin Kelm


___________________________________________
Ed. Züblin AG
Direktion Zentrale Technik ·  Technical Head Office
Tunnelbau (TUB) ·  Dept. of Tunnel Design
Dr.-Ing. Martin Kelm
Projektingenieur ·  Project Engineer
Albstadtweg 3 · 70567 Stuttgart · Germany
Fon +49 711 7883-9710 ·  Fax +49 711 7883-207
www.zueblin.de  ·  [EMAIL PROTECTED]
Aufsichtsratvorsitzender: Dr. Hans Peter Haselsteiner
Vorstand:
Dipl.-Ing. Eberhard Gläser, Dipl.-Ing. Klaus Pöllath, Dipl.-Kfm.
Hans-Joachim Rühlig
Dipl.-Ing. Burkhard Schmidt, Dipl.-Ing. Edgar Schömig, Dr. rer.pol.
Alexander Tesche
Sitz der Gesellschaft: Stuttgart, HRB 110, Ust-IdNr.: DE 147 843 723



Reply via email to