RadiusClient rc = new RadiusClient("xx.xx.xx.xx","0000");
AccountingRequest acc = new AccountingRequest("michael",AccountingRequest.ACCT_STATUS_TYPE_START);
acc.addAttribute("Framed-IP-Address", "1.1.1.1");
acc.addAttribute("Class","Key CL: PT=C");
rc.account(acc);
rc.close();
我尝试通过以上创建JSP页面向我的会计服务器发送会计请求。
但是,只有
acc.addattribute(" fraded-ip-address"," 1.1.1.1"(可以被添加,在发送属性类型第25个类" by时,发生了错误使用
acc.addattribute(" class","键cl:pt = c"(在哪里出错?!
最后,我找到了答案,属性" class",需要通过方法添加:
acc.addAttribute(new StringAttribute(25,"Key CL: PT=C"));