Home  >  Q&A  >  body text

java - When the action in the form fills in the relative address, why do these two methods have the same effect?

What does this/stand for? It can't be the root directory, right? The name of the project is test

过去多啦不再A梦过去多啦不再A梦2712 days ago513

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-05-17 10:11:12

    Both methods you use are to submit data to the CServlet address. The first method is just the abbreviation. It will find the sub-files under the root directory.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-17 10:11:12

    It should be that the <url-pattern> specified when configuring <servlet-mapping> in web. The web.xml configuration is clear

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-17 10:11:12

    / 本来就表示根嘛,不过在这里不是表示的服务器文件系统的根,而是 Web 应用虚拟目录结构的根,也就是 http://somedomain.com/ This "root" position.

    reply
    0
  • Cancelreply