站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题如何判断浏览jsp页面的操作系统是英文版还是中文版

如何判断浏览jsp页面的操作系统是英文版还是中文版

摘要: 如何判断浏览jsp页面的操作系统是英文版还是中文版


如题


浏览器的 请求信息全在Request 中你在那个里面找。


<%@ page contentType="text/html; charset=gb2312" language="Java" import="java.sql.*"%>
HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<head>

test
</head>

<body>
request method:<%=request.getMethod()%>


URI:<%=request.getRequestURI()%>


PROTOCOL:<%=request.getProtocol()%>


Servlet PATH:<%=request.getServletPath()%>


path info:<%=request.getPathInfo()%>


path translated:<%=request.getPathTranslated()%>


query string:<%=request.getQueryString()%>


content length:<%=request.getContentLength()%>


content type:<%=request.getContentType()%>


server name:<%=request.getServerName()%>


server port:<%=request.getServerPort()%>


romote user:<%=request.getRemoteUser()%>


remote address:<%=request.getRemoteAddr()%>


remote host:<%=request.getRemoteHost()%>


authorization scheme:<%=request.getAuthType()%>


brower you are using:<%=request.getHeader("User-Agent")%>
</body>




request method:GET
URI:/kang/test.jsp
PROTOCOL:HTTP/1.1
Servlet PATH:/test.jsp
path info:null
path translated:null
query string:null
content length:-1
content type:null
server name:localhost
server port:8080
romote user:null
remote address:127.0.0.1
remote host:127.0.0.1
authorization scheme:null
brower you are using:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)


上面好象没有操作系统语言版本的信息,我想要操作系统的语言版本的信息
request还有什么方法吗?


找到了
request.getLocale


↑返回目录
前一篇: Java项目中的页面,如何使页面的iframe的高度自动变化
后一篇: TOMCAT问题,在线等,谁解决了立马100分