string agent = request.getheader("user-agent"); 
  stringtokenizer st = new stringtokenizer(agent,";"); 
  st.nexttoken(); 
  //得到用户的浏览器名 
  string userbrowser = st.nexttoken(); 
  //得到用户的操作系统名 
  string useros = st.nexttoken(); 
取得本机的信息也可以这样:
  操作系统信息 
  system.getproperty("os.name"); //win2003竟然是win xp? 
  system.getproperty("os.version"); 
  system.getproperty("os.arch"); 
  瀏覽器: 
  request.getheader("user-agent") 
  再送个红包 
  request.getheader(“user-agent”)返回客户端浏览器的版本号、类型 
...[ 查看全文 ]