|

楼主 |
发表于 2019-9-19 17:50:03
|
显示全部楼层
我模拟平台UploadDoc.java/UploadDoc.j写了类似下面的类:
public class MyuploadDoc extends JProcessorImpl{
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException {
doPost(request, response);
}
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException{
String x5SessionID = (String)request.getSession().getAttribute("bsessionid");
if (x5SessionID == null) {//request.getScheme()+request.getServerName()
String basePath = "http://127.0.0.1:"+request.getServerPort()+"/BusinessServer";
String fileuser="fileuser",pass="123456";fileuser="system";
System.out.println("basePath="+basePath+";fileuser="+fileuser);
ActionEngine.init(basePath);//"http://127.0.0.1:8080/BusinessServer"
String clientIP = request.getRemoteAddr();
x5SessionID = ActionEngine.login(fileuser, ActionUtils.md5(pass), clientIP, null);
request.getSession().setAttribute("bsessionid", x5SessionID);
System.out.println(basePath+";logined!"+(String)request.getSession().getAttribute("bsessionid"));
// com.justep.doc.httpconnector.HttpConnector service;
}
DocUtils.service(request,response);
//service(request,response);
} |
|