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?
ringa_lee
2017-05-17 10:09:08
Why do we need to write the project name in
action? day08-request is the project name
Sometimes just write eservlet
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
改成get
You can changepost
toget
, then use different addresses and submit to see what the difference is in the addresses.Reference
If the action is not filled in, it will be submitted back to the current page by default
Need to distinguish between root path and current path
It is related to the access path and depends on your website deployment address.