I have a backend system which need to send a file to my application.
I have to write a servlet deployed in my application. The Backend system will post the file ( .doc or .xml or .xls ) to the servlet running on my app.
This is what I need to develop.
Can anyone help me out.
I need to know how the Backend system will post the file to my servlet?
And how my servlet's doPost method will handle that and get the file...?
Any help is highly appreciated.
Thanks
Mani
-
Posting file to servlet (5 messages)
- Posted by: As Usual
- Posted on: June 13 2005 11:08 EDT
Threaded Messages (5)
- parse your inputstream with multipart header by Biswa Das on June 13 2005 14:33 EDT
- posting a file to servlet by As Usual on June 13 2005 15:53 EDT
- If you are not using struts by Biswa Das on June 13 2005 04:10 EDT
- posting a file to servlet by Ezra Jennings on June 13 2005 05:46 EDT
- Use URL Connections & write FileData To Servlet by Shekhar Naidu on June 21 2005 04:03 EDT
- posting a file to servlet by As Usual on June 13 2005 15:53 EDT
-
parse your inputstream with multipart header[ Go to top ]
- Posted by: Biswa Das
- Posted on: June 13 2005 14:33 EDT
- in response to As Usual
parse your inputstream with multipart header.
do some google u will get cooked food. -
posting a file to servlet[ Go to top ]
- Posted by: As Usual
- Posted on: June 13 2005 15:53 EDT
- in response to Biswa Das
Thanks Biswa
I did some google.. but everywhere I am getting link to this package only...
com.oreilly.servlet.multipart;
I dunno if I can download and use this package in my project...I use weblogic workshop platform...is there any similar thing that comes with Weblogic platform...
or any way to do it other than using this oreilly package classes... I am a bit confused about this as I dont basically understand what needs to be done
can somebody help me out. -
If you are not using struts[ Go to top ]
- Posted by: Biswa Das
- Posted on: June 13 2005 16:10 EDT
- in response to As Usual
com.oreilly.servlet.multipart is free to use and I assume after struts it is the highest used library for attachment processing.
Any way this is not rocket science if you understand how to process multipart messages. -
posting a file to servlet[ Go to top ]
- Posted by: Ezra Jennings
- Posted on: June 13 2005 17:46 EDT
- in response to As Usual
I haven't used it myself, but Apache Jakarta Commons FileUpload should work. -
Use URL Connections & write FileData To Servlet[ Go to top ]
- Posted by: Shekhar Naidu
- Posted on: June 21 2005 04:03 EDT
- in response to Biswa Das
Use getOutputStraem() method of URL Connection ,
, store filedata to a string & write String toServlet using ObjectOutputStream