以下例外即将到来
异常:java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl消息: java.lang.RuntimeException:java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl
代码
package com.hoja;
import java.io.File;
import java.io.FilePermission;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder;
public class BhaiHoja {
@Produces("application/pdf")
public Response getFile(String policyNo, String docId){
String constFilePath = "C:/Users/Anushree/Desktop/Webservice/";
String flow = (constFilePath + "/" + policyNo + "/" + docId +".pdf");
File fileNew = new File(constFilePath + "/" + policyNo + "/" + docId +".pdf");
File FilePath = new File("C:/Users/Anushree/Desktop/Webservice/"); FilePermission permission = new FilePermission(flow, "read"); ResponseBuilder
res = Response.ok((Object)fileNew );
res.header("content-disposition","attachment;filename=fileNew");
return res.build();
}
}