Re: app-fileservices no files in Request?
Nathan Kontny <Nathan.Kontny-UgwZ4owrJFB8UrSeD/[email protected]>
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
Stephen,
I have modified the struts-config as you mentioned, and I have stepped through
the StrutsClientConnector and see now that the request is picking up the
uploaded files. However, there seems to be a disconnect between the latest CVS
versions of app-fileservices and the StrutsClientConnector.
The FileUploadModel is checking for request pararameters like this:
if(oneKey.indexOf("_file_data_") > 0){
However, the strutsClientConnector is no longer naming the file parameters that
way, its commented out. From the code:
//HACK: Temporary fix until bug #819550 gets fixed.
// //Then file object can be queried on file
name, and will
// //not need to embed in attribute key.
//kreq.setParameter(oneName + "_file_data_"+ fileInfo.getFileName(),data);
Does app-fileservices still need to be fixed, or do you have a version that is
waiting to be committed?
-Nate
Quoting Stephen Davidson <[email protected]>:
> Nathan Kontny wrote:
> > I am using the latest app-fileservices and pretty close to the latest of
> > everything else from CVS. When I use the file.upload-example, I see that
> > inside the FileUploadModel during the example it doesn't find any
> "file_data"
> > request parameters. ( from the code: if(oneKey.indexOf("_file_data_") >
> 0){ ).
> >
> >
> > I am just using the example just as it comes out of the box, with a jpg of
> 27KB.
> > Is this app working for anyone else right now?
> >
> > -Nate
> > _______________________________________________
> > User mailing list
> > [email protected]
> > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
> >
> Hi Nate.
>
> Mike is currently reworking the build process to make overrides easier.
>
> In the meantime, here is a (slightly modified) excerpt from an
> internal project README I had put together. I was planning on posting
> this when I had a few minutes, but I am hoping that Mike's build changes
> will elimnate much of the headaches involved.
> The other alternative is to
> 1) go modify clnt-struts/conf/client/snippets/
> struts-config.xml
> struts-config1.xml
> 2) Delete the keel-build/install directory, as well as the
> unpacked keel-build/deploy/jakarta-tomcat-4.1.30 directory
> (note that the clean target does NOT cause the modified snippet
> files to be redeployed - will possibly be fixed in the current build
> overhaul?)
> 3) build with the "clean complete-install" targets.
>
> Regards,
> Steve
>
> <===Begin Readme===>
> After a completeinstall, the following change needs to be made;
> * The struts-config.xml file used in the webapp should be altered to add the
> <form-property> tag for
> each file input specified in the jsp page. This is to tell the
> org.apache.struts.action.DynaActionForm
> that the file type inputs should be mapped to
> org.apache.struts.upload.FormFile objects.
>
> This change would be made to the
>
keel-build/deploy/jakarta-tomcat-4.1.29/webapps/struts/WEB-INF/struts-config.xml
>
> <!-- ========== Form Bean Definitions ===================================
> -->
> <form-beans>
> <form-bean name="none" type="org.apache.struts.action.DynaActionForm">
> <form-property name="myFile1" type="org.apache.struts.upload.FormFile"/>
> <form-property name="myFile2" type="org.apache.struts.upload.FormFile"/>
> </form-bean>
> </form-beans>
>
> <!-- ========== To Enable Svc-Fileupload-Struts as well =================
> -->
> <!-- ========== Form Bean Definitions ===================================
> -->
> <form-beans>
>
> <form-bean name="none"
> type="org.apache.struts.action.DynaActionForm">
> <form-property name="file1"
> type="org.apache.struts.upload.FormFile"/>
> <form-property name="file2"
> type="org.apache.struts.upload.FormFile"/>
> <form-property name="file3"
> type="org.apache.struts.upload.FormFile"/>
> <form-property name="clipView"
> type="org.apache.struts.upload.FormFile"/>
> <form-property name="clipFile"
> type="org.apache.struts.upload.FormFile"/>
> </form-bean>
>
> </form-beans>
>
>
> --
> Java/J2EE Developer/Integrator
> Chair, Dallas/FortWorth J2EE Sig
> 214-724-7741
>
>
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
>