关于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"

 

posted @ 2017-03-27 23:08  L1019  阅读(1706)  评论(0)    收藏  举报