construktor ;P
----- Original Message -----
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 9:29 AM
Subject: RE: Still having problems with File upload (multipart-formdata)
Hi Patrick,
okay attched is my class
it offers only two methods.
soon more... perhaps ;-)
one stores a form-file to a place, defined in a PROPERTIES-File
under uploadPath-KEY
the other stores the file to a place which is the second-parameter ;-)
both methods are static. The class has only a private Construktor,
so it is final... :-)
With
String placeString =
getServlet().getServletContext().getRealPath("/");
you get the Path of your Struts-App
like: C:\Tomcat\webapps\myStrutsApp
so you could use the second like:
UploadFile.saveFile(myFormFile, placeString);
your file is then in root.
hope this is what you needed.
greetings
matthias
-----Original Message-----
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 5:15 PM
To: Struts Users Mailing List
Subject: Re: Still having problems with File upload (multipart-formdata)
Matthias Wessendorf wrote:
> Hi Patrick,
>
> you want to get the path of /myapp
> like C:\Tomcat\webapps\myapp
> or?
That's exactly what i was trying to do!
> in an actionClass
> you now want to store
> in placeString\uploaddir
> isn�t it?
Right again :-)
> i wrote an Util-Class which managed the
> storage in my action.
> one parameter is the formfile the other the placeToStore.
> you can get it, if you want...
That would be wonderful! Thank you very much for your help!
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]