search

Home  >  Q&A  >  body text

java - When submitting a form, why does the action sometimes need to write the project name, and sometimes it only needs to write the servlet?

Why do we need to write the project name in

action? day08-request is the project name
Sometimes just write eservlet

ringa_leeringa_lee2755 days ago817

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-05-17 10:11:08

    This has nothing to do with the project name.
    What comes before / is the web root directory. Fill in the server address after it. /前的是web根目录,服务器地址是什么后面就填什么。
    你可以把post改成getYou can change post to get, then use different addresses and submit to see what the difference is in the addresses.

    Reference

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-17 10:11:08

    If the action is not filled in, it will be submitted back to the current page by default

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-17 10:11:08

    Need to distinguish between root path and current path

    reply
    0
  • 某草草

    某草草2017-05-17 10:11:08

    It is related to the access path and depends on your website deployment address.

    reply
    0
  • Cancelreply