关于form的action路径填写

一:可以是相对路径:

    1、action="<%=request.getContextPath() %>/html/index.html"  <%=request.getContextPath() %>表示回到应用的根目录下,再加上相对路径

    2、action="/html/index.html"   表示在服务器的根目录下搜索html/index.html  /表示根目录

    3、action="index.html"   表示在当前目录下搜索

二:可以是绝对路径:

    action="http://localhost:8080/PracticeLogin/html/index.html"

原文地址:https://www.cnblogs.com/l1019/p/6629400.html