Struts(1.3) action code for file upload

Ads
 

Struts(1.3) action code for file upload

Hi All,

I want to upload file using struts framework. the request should be came from standalone application using HttpUrlConnection.

How can i write my struts(1.3) action code to handled Multipart form data. I used FormFile and is working fine with struts jsp (property file of FormFile). But not working with HttpUrlConnection.

However if i writter a Servlet and take input stream from request (request.getInputStream()) it works fine.

Is any one has solution please provide me.

Thanks Paresh

View Answers

January 31, 2011 at 3:10 PM

Hi Friend,

Please visit the following link:

http://www.roseindia.net/struts/strutsfileupload.shtml

Thanks


January 31, 2011 at 3:58 PM

Hi,

thanks for a quick reply....

but my major problem is with client request...how can i write a client code which is standalone application..

I have written code using java.net.URL and java.net.URLConnection .

In this case FormFile was not get set. so it send null pointer exception while formfile.getFile(); and also if i used request.getInputstream() is return 0 bytes.

what is another way to handled request stream in struts action or let me how the upload request is post to struts action.

Thanks

Ads









Related Tutorials/Questions & Answers:
Struts(1.3) action code for file upload
Struts(1.3) action code for file upload  Hi All, I want to upload... application using HttpUrlConnection. How can i write my struts(1.3) action code... action or let me how the upload request is post to struts action. Thanks  
struts 1.3
struts 1.3  After entering wrong password more than three times,the popup msg display on the screen or the username blocked .please provide its code in struts jsp
Advertisements
struts 1.3
struts 1.3  After entering wrong password more than three times,the popup msg display on the screen or the username blocked .please provide its code in struts jsp
struts 1.3
struts 1.3  please provide me a login application using struts1.3 hibernate and mysql thanks
struts 1.3
struts 1.3  my requirement is i have two drop downs.second drop down menu is connected to first drop down.when i click an item from first drop down... using struts 1.3 but without using ajax
PHP code for csv file upload into mysql
PHP code for csv file upload into mysql  I want to upload a file from my pc to mysql server using upload option. while i m selecting the csv file...="file" id="userfile"> </td> <td width="80"><input name="upload
Excel File data upload into postgresql database in struts 1.x
Excel File data upload into postgresql database in struts 1.x  Dear members please explain how Excel Files data upload into postgresql database in struts 1.x
linking tree heading in javasript into a Jsp file and then jsp to struts action form
linking tree heading in javasript into a Jsp file and then jsp to struts action form  i have a tree that consists of 3 options say for example 1... javascript tree link to struts action class
How to use session in struts 1.3
How to use session in struts 1.3  i want to know how to use session in Struts specially in logIn authentication
Struts Action Class
Struts Action Class  What happens if we do not write execute() in Action class
file upload plugin in jquery
file upload plugin in jquery  file upload plugin in jquery   You can use the following code to use the JQuery plugin. $(document).ready(function() { $("#uploadbutton").jsupload({ action: "addFile.do
File Upload
File Upload  when i execute the image upload to mysql database it shows an exception that file path cannot be found
Action classes in struts
Action classes in struts  how many type action classes are there in struts   Hi Friend, There are 8 types of Action classes: 1.ForwardAction class 2.DispatchAction class 3.IncludeAction class 4.LookUpDispatchAction
java programming code to upload a dataset(text file) and show the values in graphically view
java programming code to upload a dataset(text file) and show the values in graphically view  how can be done upload a dataset(text file) and show the values in graphically view,,related to slam benchmarking java code
Struts 2 action-validation.xml not loading
Struts 2 action-validation.xml not loading  Hi All, I am getting... error SERVER : Caught exception while loading file package/action-validation.xml Connection refused: Connect - (unknown location) The path of my action
FTP File Upload in Java
easy to write code for FTP File Upload in Java. I am assuming that you have FTP... is client.login(userName, password); Code to upload the file...FTP File Upload in Java This tutorial shows you how you can write Java program
servlet file upload
servlet file upload  please tell me the complete code to upload a file on localhost using servlet
AJAX file upload
AJAX file upload If you want to upload file asynchronously means without... files. URL for Code http://www.webtoolkit.info/ajax-file-upload.html Demo URL http://www.webtoolkit.info/demo/ajax-file-upload Description
code - Struts
code  How to write the code for multiple actions for many submit buttons.  use dispatch action
Struts2.2.1 file upload Interceptor example.
Struts2.2.1 file upload Interceptor example. In this example, we will disscuss about the file Upload Interceptor. Here, we are using a struts2.2.1 file tag  for uploading a file. Struts2.2.1 utilizes the services of File Upload
File Upload
File Upload  Hi I need script / string in PHP where I uploaded the file in html frontend and it should sent the uploaded file as attachment to my email address
file upload
file upload  how to recieve the uploaded file on the next jsp page for modification if its uploaded to the previous page using a from
file upload using JSP
file upload using JSP  I have created a form to upload a file in a html page, now i want to get the path of the file in a jsp page so what code...="java" %> <HTML> <HEAD><TITLE>Display file upload form
jsp upload file to server
jsp upload file to server  How to create and upload file to server in JSP?   Find the given example that explains how to upload single and multiple file on server using JSP
upload and save the file
upload and save the file  upload and save a file from a computer to specific location of remote computer using jsp
Export data to Excel Sheet in STRUTS 1.3
Export data to Excel Sheet in STRUTS 1.3  hi. how can i export content present on the jsp to excel sheet on button click..... and challenging part is i have to merge few rows and columns for a particular field(Value
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp code college.jsp page <HTML> <head> </head> <body>... to upload the multiple images in struts Total images storing folder in project
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp code college.jsp page <HTML> <head> </head> <body>... to upload the multiple images in struts Total images storing folder in project
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp code college.jsp page <HTML> <head> </head> <body>... to upload the multiple images in struts Total images storing folder in project
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp code college.jsp page <HTML> <head> </head> <body>... to upload the multiple images in struts Total images storing folder in project
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp code college.jsp page <HTML> <head> </head> <body>... to upload the multiple images in struts Total images storing folder in project

Ads