weblogic 部署 JBPM流程图展示pic图形显示不出来

happy_lin 2016-04-08 10:58:52
初学JBPM写了一个测试类,用tomcat部署都正常,当我用weblogic10部署之后,pic图显示不出来,看网上说加上out.clear();
out = pageContext.pushBody(); 可是也没有效果,如下图,什么原因请指教,急急……

原码如下:
view.jsp----------------------------------------------------
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.jbpm.api.*,java.util.*,org.jbpm.api.model.*" %>
<%@page import="org.apache.jasper.runtime.PageContextImpl;"%>
<%
String id = request.getParameter("id");
ProcessEngine processEngine = Configuration.getProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
ProcessInstance processInstance = executionService.findProcessInstanceById(id);
Set<String> activityNames = processInstance.findActiveActivityNames();
System.out.println("activityNames"+activityNames.toString());
ActivityCoordinates ac = repositoryService.getActivityCoordinates(processInstance.getProcessDefinitionId(),activityNames.iterator().next());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程监控</title>
</head>
<body>
<img src="pic.jsp?id=<%=id %>" style="position:absolute;left:0px;top:0px;">
<div style="position:absolute;border:1px solid red;left:<%=ac.getX()%>px;top:<%=ac.getY()%>px;width:<%=ac.getWidth()%>px;height:<%=ac.getHeight()%>px;"></div>
</body>
</html>

pic.jsp---------------------------------------------------
<%@page import="org.jbpm.api.*,java.io.*"%>
<%
ProcessEngine processEngine = Configuration.getProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
String id = request.getParameter("id");
ProcessInstance processInstance = executionService.findProcessInstanceById(id);
String processDefinitionId = processInstance.getProcessDefinitionId();
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).uniqueResult();
InputStream inputStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), "work_flow_03.png");
byte[] b = new byte[1024];
int len = -1;
OutputStream ops = response.getOutputStream();
while ((len = inputStream.read(b, 0, 1024)) != -1) {
ops.write(b, 0, len);
}
//out.clear();
//out = pageContext.pushBody();
System.out.println("bpm_out"+out.toString());
%>
...全文
49 点赞 收藏 回复
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
相关推荐
发帖
其他
创建于2007-09-28

1.0w+

社区成员

Web 开发 其他
申请成为版主
帖子事件
创建了帖子
2016-04-08 10:58
社区公告
暂无公告