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
ringa_lee 2017-05-17 10:09:08
0
4
828

Why do we need to write the project name in

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

ringa_lee
ringa_lee

ringa_lee

reply all(4)
洪涛

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

巴扎黑

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template