?? forsureuser.java
字號:
package org.yeeku.refresh;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import java.util.*;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
public class Forsureuser
{
public String execute() throws Exception
{
WebContext ctx;
ctx=WebContextFactory.get();
HttpSession session =ctx.getSession();
String UserName=(String)session.getAttribute("username");
ServletContext M_application=ctx.getServletContext();
List chatUser;
chatUser=(List)M_application.getAttribute(UserName);
String firstuser=(String)chatUser.get(1);
int i=firstuser.indexOf("說");
String toname=firstuser.substring(0,i);
String withnamechat="與"+toname+"*聊天";
chatUser.clear();
chatUser=new ArrayList();
chatUser.add(withnamechat);
chatUser.add(firstuser);
M_application.setAttribute(UserName,chatUser);
return toname;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -