username=qqqq

password=wwww

//----------------------POST------------------->

request.getContextPath() =/demo

request.getMethod() =POST

request.getRequestURI() =/demo/reg

request.getRequestURL() =http://192.168.1.211:8080/demo/reg

request.getServletPath() =/reg

//-----------------------GET------------------->

http://192.168.1.211:8080/demo/index.jsp?username=1&password=1&email=1

request.getContextPath() =/demo

request.getMethod() =GET

request.getQueryString() =username=1&password=1&email=1

request.getRequestURI() =/demo/index.jsp

request.getRequestURL() =http://192.168.1.211:8080/demo/index.jsp

request.getServletPath() =/index.jsp

【Web】HttpServletRequest request 相关方法 得到路径的更多相关文章

  1. day10(java web之request&respone&访问路径&编码问题)

    day10 请求响应流程图 response response概述 response是Servlet.service方法的一个参数,类型为javax.servlet.http.HttpServletR ...

  2. [原创]java WEB学习笔记47:Servlet 监听器简介, ServletContext(Application 对象), HttpSession (Session 对象), HttpServletRequest (request 对象) 监听器,利用listener理解 三个对象的生命周期

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  3. java web HttpServletRequest

    一.HttpServletRequest介绍 HttpServletRequest 对象代表客户端的请求,当客户端通过HTTP协议访问服务器时,通过这个对象提供的方法,可以获得客户端请求的所有信息. ...

  4. java web项目中 获取resource路径下的文件路径

    public GetResource{ String path = GetResource.class.getClassLoader().getResource("xx/xx.txt&quo ...

  5. web与request

          request --> 封装了客户端所有的请求数据!       请求行       请求头       空行       请求体(GET没体) 回忆一下http协议!请求协议中的数 ...

  6. java web(四):request、response一些用法和文件的上传和下载

    上一篇讲了ServletContent.ServletCOnfig.HTTPSession.request.response几个对象的生命周期.作用范围和一些用法.今天通过一个小项目运用这些知识.简单 ...

  7. Eclipse中修改Web项目的URL访问路径

    背景 访问路径,也就是指在浏览器中访问该web系统时的根路径,比如http://localhost:8080/xxxx/index.jsp  这里的xxxx,也就是request.getContext ...

  8. request 获取各种路径

    从request获取各种路径总结 request.getRealPath("url"); // 虚拟目录映射为实际目录 request.getRealPath("./&q ...

  9. request获取各种路径

    equest.getRealPath() 这个方法已经不推荐使用了,代替方法是: request.getSession().getServletContext().getRealPath() 在ser ...

随机推荐

  1. Android 使用 intent 实现简单登陆页面

    前言 第一个 Android 程序,应该有些纪念的意义吧~ 主页面布局 给 Button 添加响应函数:android:onClick="login" public void lo ...

  2. (转)C++中extern “C”含义深层探索

    (转)C++中extern “C”含义深层探索 转自: http://www.cppblog.com/Macaulish/archive/2008/06/17/53689.html 1.引言 C++语 ...

  3. [LeetCode]题解(python):095-Unique Binary Search Trees II

    题目来源: https://leetcode.com/problems/unique-binary-search-trees-ii/ 题意分析: 给一个整数,返回所有中序遍历是1到n的树. 题目思路: ...

  4. IOS 表视图(UITableVIew)的使用方法(5)表视图的编辑功能(删除)

    默认的,如果表视图支持编辑,那用户可以通过两种方式来删除某些行,其一为单击左侧的红色按钮后行右侧显示“Delete”按钮,其二为在单元行上的手指向左滑动,“Delete”按钮也会出现供用户单击.无论哪 ...

  5. linux服务器安全小知识

    使用单用户模式进入系统 Linux启动后出现boot:提示时,使用一个特殊的命令,如linuxsingle或linux 1,就能进入单用户模式(Single-User mode).这个命令非常有 ...

  6. discuz_style_default.xml修改

    首先我们需要在template/文件夹下新建一个yourstyle文件夹放置模板文件,然后复制default下的discuz_style_default.xml,重命名为discuz_style_你的 ...

  7. nodejs的npm安装模块时候报错:npm ERR! Error: CERT_NOT_YET_VALID的解决方法 - 包子博客 _ 关注互联网前端、开发、SEO、移动互联网应用技术

    转载:包子博客: http://www.haodewap.net/visit.do?wapurl=http%3A%2F%2Fwww.jincon.com%2Farchives%2F141%2F

  8. 提高IOS开发效率的常用网站、开源类库及工具

    时间过得很快,学习iOS也已经2年左右了.在这里整理一下,在平台平常开发过程中使用比较多的开源类库.网站与工具吧! 一.网站: UI网站: 1.https://www.cocoacontrols.co ...

  9. echarts 应用数个样例

    应用一:环形图和饼图嵌套 先说明一下内部文件分布: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdGV4dGJveQ==/font/5a6L5L2T/fo ...

  10. [译]Stairway to Integration Services Level 9 - Control Flow Task Errors

    介绍 在本文中,我们会实验 MaximumErrorCount和ForceExecutioResult 故障容差属性,并且还要学习Control Flow task errors, event han ...