在servlet中,可以通过request对象获取客户端的哪些信息?

这题是有选项的(多选)A、客户端IP地址B、客户端网卡MAC地址C、客户端浏览器表单form中填写的数据D、客户端cookies信息... 这题是有选项的(多选)

A、客户端IP地址
B、客户端网卡MAC地址
C、客户端浏览器表单form 中填写的数据
D、客户端cookies信息
展开
 我来答
叶秋雨
2012-07-19 · TA获得超过2077个赞
知道大有可为答主
回答量:2035
采纳率:0%
帮助的人:648万
展开全部
可以通过request.getParameter()
获取表单的所有信息,如:文丛此本握汪框段郑仔,单选框,复选框,下拉框等等。。。
百度网友1730a27fc
2012-07-21
知道答主
回答量:1
采纳率:0%
帮助的人:1601
展开全部
Method Summary java.lang.StringgetAuthType()
Returns the name of the authentication scheme used to protect the servlet. java.lang.StringgetContextPath()
Returns the portion of the request URI that indicates the context of the request. Cookie[]getCookies()
Returns an array containing all of the Cookie objects the client sent with this request. longgetDateHeader(java.lang.String name)
Returns the value of the specified request header as a long value that represents a Date object. java.lang.StringgetHeader(java.lang.String name)
Returns the value of the specified request header as a String. java.util.EnumerationgetHeaderNames()
Returns an enumeration of all the header names this request contains. java.util.EnumerationgetHeaders(java.lang.String name)
Returns all the values of the specified request header as an Enumeration of String objects. intgetIntHeader(java.lang.String name)
Returns the value of the specified request header as an int. java.lang.StringgetMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. java.lang.StringgetPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request. java.lang.StringgetPathTranslated()
Returns any extra path information after the servlet name but before the query string, and translates it to a real path. java.lang.StringgetQueryString()
Returns the query string that is contained in the request URL after the path. java.lang.StringgetRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. java.lang.StringgetRequestedSessionId()
Returns the session ID specified by the client. java.lang.StringgetRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. java.lang.StringBuffergetRequestURL()
Reconstructs the URL the client used to make the request. java.lang.StringgetServletPath()
Returns the part of this request's URL that calls the servlet. HttpSessiongetSession()
Returns the current session associated with this request, or if the request does not have a session, creates one. HttpSessiongetSession(boolean create)
Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session. java.security.PrincipalgetUserPrincipal()
Returns a java.security.Principal object containing the name of the current authenticated user. booleanisRequestedSessionIdFromCookie()
Checks whether the requested session ID came in as a cookie. booleanisRequestedSessionIdFromUrl()
Deprecated. As of Version 2.1 of the Java Servlet API, use isRequestedSessionIdFromURL() instead. booleanisRequestedSessionIdFromURL()
Checks whether the requested session ID came in as part of the request URL. booleanisRequestedSessionIdValid()
Checks whether the requested session ID is still valid. booleanisUserInRole(java.lang.String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
peipeiyou2011
2012-07-19
知道答主
回答量:1
采纳率:0%
帮助的人:1602
展开全部
获取客户端的请求信息,闭袜枣例好大如Form表单中的数据,轿拆可以通过request.getParameter()方法。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
ge上善若水
2012-07-20 · 超过11用户采纳过TA的回答
知道答主
回答量:241
采纳率:0%
帮助的人:89.9万
展开全部
request.getParameter()
(C)升冲念获取表单的所有信判羡息。。
还可以吵困获取(A)客户端IP地址。(D)客户端cookies信息
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
huang554455
2012-07-25
知道答主
回答量:37
采纳率:0%
帮助的人:15.9万
展开全部
a c
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 3条折叠回答
收起 更多回答(5)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式