on 11-04-2015 12:55 AM
这种方法提取的提示对象该如何存储SESSION呢?
代码是:
request.setCharacterEncoding("UTF-8");
String boUsername = (String)request.getSession().getAttribute("username");
String boPassword = (String)request.getSession().getAttribute("password");
String[] a = request.getParameter("url").split(" ");
String title = (new String(a[1].getBytes("ISO_8859_1"),"GBK"));
String boAuthType = "secEnterprise";
String reportID = "";
if(a==null){
reportID = "303826";
}else{
reportID = a[0];
}
final String baseURL = http://server:6405/biprws;
final String logonURL = baseURL + "/logon/long";
final String logoffURL = baseURL + "/logoff";
final String baseWebiURL = baseURL + "/raylight/v1/documents";
String Parameter = "";
try{
String xmlString = "";
String documentID = "";
String logonToken = "";
xmlString = "<attrs><attr name=\"userName\" type=\"string\" >"
+boUsername
+"</attr><attr name=\"password\" type=\"string\">"
+boPassword
+"</attr><attr name=\"auth\" type=\"string\" possibilities=\"secEnterprise,secLDAP,secWinAD,secSAPR3\">"
+boAuthType + "</attr></attrs>";
String logonXML = restPost(logonURL,xmlString,"","","","");
logonToken = "\"" + getLogonTokenFromXML(logonXML) + "\"";
目前是登陆用的TOKEN并保存了SESSION,用户输入账号密码登陆后,整个界面时他权限能看到的所有报表,然后用户点击其中一张报表,就用到上面的代码获得这张报表的提示对象,和我在WEBI创建了代替从BEX继承过来的对象,经过JAVA加工只会显示出我在WEBI创建的对象,输入相关值后,最后获得的是用Opendocument拼接出来的报表。而现在问题是出在每点击一张报表都会新增加2个SESSION,提取提示对象一次,最终的拼接Opendocument又一次,加上最开始的登陆一共3次。
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
不明白你的意思,用getLogonTokenFromXML是从web service的Xml里面提取出logonToken。
你想要提取什么value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
是想把logonToken的值放到session里到其他页面使用吗?直接用jsp内置的session对象存可以吗?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.