public void pic() throws IOException
{
init();
ProcessInstance processInstance = executionService.findProcessInstanceById(id);
String processDefinitionId = processInstance.getProcessDefinitionId();
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).uniqueResult();
String path=ServletActionContext.getRequest().getRealPath("");
// String filePath=path+"\\WEB-INF\\classes\\leave2.png";
String filePath="leave2.png";
System.out.println("filePath: "+filePath);
File file=new File(filePath);
System.out.println("存在么: "+file.exists());
//此处不知道为什么还要特别的通过repositoryService和processDefinition.getDeploymentId()来显示此图片
InputStream inputStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(),filePath);
System.out.println("inputStream2: "+inputStream);
//InputStream inputStream =new FileInputStream(new File("D:/program/java/servers/apache-tomcat-5.5.23/webapps/jbpm2/WEB-INF/classes/leave.png"));
byte[] b = new byte[1024];
int len = -1;