"Elspeth Thorne" <> skrev i en meddelelse
news:ca0u4h$2co$...
> Sudsy wrote:
> > Elspeth Thorne wrote:
> >
> >> Hello,
> >>
> >> I'm trying to code a sever-side application that recieves file uploads
> >> from a remote client over http.
> >
> >
> > Okay...
> >
> >> The recieving environment is using Apache/Tomcat, and I'll be using
> >> struts and java servlets to handle incoming requests.
> >
> >
> > Easy enough...
> >
> >> The remote client is not a web browser, and will probably not be using
> >> any sort of web form for the upload.
> >
> >
> > I though you said you were working on the server side! Why should you
> > concern yourself with how the client is going to behave. It will just
> > have to act just like a browser insofar as using HTTP to communicate
> > with your server-side application. Probably use a POST equivalent...
> >
> > So what's the problem?
> >
> I don't know what said POST equivalent is.
>
> As I said, it's a trivial problem, but I just don't get it today.
Just as the reply you got said: your server-side application doesn't care
who sends the request, just as long as the request is the right format. And
that would most likely be a HTTP POST.
Your original message said you were using HTTP, and you were using
Struts/servlets to handle the upload, so a "multipart" POST seems a
reasonable way to go.
You just need to code your application as you normally would as if the
client were a browser with a form. I am not sure if Struts itself offers
upload handler classes, but if not there are for example:
jakarta file upload:
http://jakarta.apache.org/commons/fileupload/
jason hunter
http://www.servlets.com/cos/javadoc/...rtRequest.html
Peter