Spring 3 portlet file upload example


















Like this: Like Loading Thanks Shantan. Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:. Email required Address never made public.

Name required. Follow Following. Portal HUB. Sign me up. Already have a WordPress. Iam using jquery All url mapping are done in dispatcher servlet and configuraion for multi part resolver for uploading the file in spring mvc. Following are the code in upload. Please note that i hard coded the url for upload script if your server name or port are different change your upload script path.

Finally UploadController post functions will uploading the file into server. You will get commonsmultipartfile to upload into server or database.

If everything works fine you able to upload multiple files as follows. Thanks for your comments. Normally i used sitemesh. Hi, shall I use liferay plugin properties file instead of maven? About Privacy Policy Contact. In this the file upload example project following jar files are needed: Jar Files : All the above jar files are available in the example code zip file.

This tutorial applied following steps : Step 1 : First we create Dynamic web project "Spring3Example". Code of "UploadItem. Map; import org. Controller; import org. BindingResult; import org. RequestMapping; import org. RequestMethod; import org. Model; import org. ObjectError; import javax. In this article will be show how to develop a file upload and download portlet using Spring MVC Portlet. If you looking for creating a simple hello world article please check this article.

For setting up your development environment Eclipse with Liferay please check this article. Create a xml with name samplefileuploader-portlet. It should be portlet name defined in the portlet. Create a package com. Add a Controller class as follows. Create a domain package com. The action url defined above will map with formAction with fileUpload defined in the action method annotation. The form commandName with the model mapping in the controller class. In springfilecontroller class the file upload method, we can access the file data springFileVO.

You can convert into your desirable format. Hello, coluld u tell me is it possible to upload multiple files to portlet.



0コメント

  • 1000 / 1000