最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
jsp request.getParameter()接受表单和url数据代码
时间:2022-06-29 02:39:38 编辑:袖梨 来源:一聚教程网
request.getParameter()方法传递的数据,会从Web客户端传到Web服务器端,代表HTTP请求数据。request.getParameter()方法返回String类型的数据。
String title = "HttpServletRequest Method Values";
Map entries = new TreeMap();
entries.put("getCharacterEncoding", request.getCharacterEncoding());
entries.put("getContentLength", "" + request.getContentLength());
entries.put("getContentType", request.getContentType());
entries.put("getLocale", request.getLocale());
entries.put("getProtocol", request.getProtocol());
entries.put("getRemoteAddr", request.getRemoteAddr());
entries.put("getRemoteHost", request.getRemoteHost());
entries.put("getScheme", request.getScheme());
entries.put("getServerName", request.getServerName());
entries.put("getServerPort", "" + request.getServerPort());
entries.put("isSecure", "" + request.isSecure());
request.setAttribute("_table_title", title);
request.setAttribute("_table_entries", entries);
out.println(request.getCharacterEncoding());
%>
request.getParameter()取得是通过容器的实现来取得通过类似post,get等方式传入的数据
Request Information
JSP request method:
URL for the request:
Protocol of the request:
Server name:
Path:
Server port:
Remote address:
Remote host:
Locale:
User agent:
来自get 数据
Retrieving the Original URI
In ShowPath1.jsp教程:request.getRequestURI() =
request.getServletPath() =
jsp:include page="ShowPath2.jsp" flush="true"/>
相关文章
- 开放空间宁蒙有什么技能 09-15
- 小鸡舰队出击天空首领活动怎么玩 09-15
- 魔法工艺套装如何解锁使用 09-15
- 三国群英传策定九州资源地有什么打法技巧 09-15
- 下一站江湖2马夫人任务怎么完成 09-15
- 小鸡舰队出击终焉灵王队伍如何搭配 09-15