public class DLogin extends com.justep.ui.impl.JProcessor{
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String iv_user = request.getHeader("iv-user");
String url_suffix = request.getParameter("url");
System.out.println("url_suffix="+url_suffix);
if(url_suffix!=null && !"".equals(url_suffix)){
url = request.getContextPath() + url_suffix.replace("??", "&");
// url = "http://192.168.0.12:8080/x5" + url_suffix;
ActionEngine.init("http://192.168.0.12:8080/BusinessServer");
String localIP = java.net.InetAddress.getLocalHost().getHostAddress();
String bSessionID = ActionEngine.login(iv_user, ActionUtils.md5("123456"), localIP, null);
url = url + "&bsessionid" + bSessionID ;
response.sendRedirect(url);
password = getPassword(iv_user);
url = request.getContextPath()+"/portal/directLogin.w?username="+iv_user+"&password="+password+"";
response.sendRedirect(url);
// url = "http://192.168.0.12:8080/x5"+"/portal/directLogin.w?username="+iv_user+"&password="+password+"";
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
private String getPassword(String iv_user){
/*Connection conn = ModelUtils.getConnection("/system/data");
ContextHelper.getTransaction().begin(conn);
StringBuffer sql = new StringBuffer("");
stmt = conn.createStatement();
sql.append("select scode from SA_OPOrg where sid='").append(receiver).append("' or sfid='")
.append(receiver).append("'");
rs = stmt.executeQuery(sql.toString());
receiver = rs.getString("scode");
return "E10ADC3949BA59ABBE56E057F20F883E";
2.到目前为止差不多要奔溃了,究竟有没有一种比较好的解决方案满足以上我的集成应用需求