简体   繁体   中英

file upload with jersey framework in Glassfish server

I try to learning file uploading in jersey. I wrote simple code to make sure it is work .when I run project in Glassfish server it give me this error . How could I solve it ?

GlassFish Server 4.1, deploy, null, false C:\\Users\\Documents\\NetBeansProjects\\MyProject\\nbproject\\build-impl.xml:1057: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 1 second)

my code is

 @POST
 @Path("/upload")
 @Consumes(MediaType.MULTIPART_FORM_DATA)
 public String uploadFile(
 @FormDataParam("file") InputStream uploadedInputStream,
 @FormDataParam("file") FormDataContentDisposition fileDetail) {
 return "";
 }

I think this error not belongs to glassfish server. Restart netbeans and clean and build your project because netbeans also write self generated code corresponding to webservices. I recommended to use eclipse j2ee IDE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM