Help! ! ! It was running fine at first, but after restarting eclipse, I suddenly couldn't open the html. The servlet was running normally, and the browser reported a 404 error when I put this address, and the 404- was followed by an empty space. However, I could double-click the html locally to open it.
Novice asking for guidance
Can’t find the path, the path is wrong.
It can be opened locally. You can definitely open it by double-clicking it.
But if the path is wrong, the server will not be able to find the file and it will definitely not be open.
Check the path.
There is WEB-INF in the path in your address bar. This is something that is added by the system by default. How could there be something of yours in it?
There is WEB-INF in the path in your address bar. This is something that is added by the system by default. How could there be something of yours in it?
The path is correct. . There is already web-inf
but the path cannot be found. The path is wrong.
It can be opened locally. You can definitely open it by double-clicking it directly.
But if the path is wrong, the server will not be able to find the file and it will definitely not be open.
Check the path.
The path is correct. .
If it still can’t be found, shouldn’t 404- be followed by the file name you are looking for?
It also says that the path is correct?
There is obviously one missing WebContent, before web-inf.
How did you check the path? . .
You said the path is correct?
There is obviously one missing WebContent, before web-inf.
How did you check the path? . .
You don’t need to go to the server to view it locally. . . Add webcontent to 404 - this path will be added later
How is the default path for accessing files set by your server?
Is the WebContent folder read by default?
Then your HelloWorldWeb does not need to be added.
Even if it is a server or something, it will not cut off one of the paths.
The path cannot be found. The path is wrong.
It can be opened locally. You can definitely open it by double-clicking it directly.
But if the path is wrong, the server will not be able to find the file and it will definitely not be open.
Check the path.
The path is correct. .
If it still cannot be found, shouldn’t 404- be followed by the file name you are looking for?
This must be wrong. When myeclipse builds a project, it will build WEB-INF under the root directory, which contains two files. Folder (classes, used to store the .class files compiled by servlet/javabeans in the project; lib, stores the jars used in the project) and a web.xml (used to configure servlet and related information of the entire project, such as (default homepage), there should be no code written by you. If you don’t believe me, you can open the webapps directory of tomcat and take a look.
There is WEB-INF in the path in your address bar. This is something that is added by the system by default. How could there be something of yours in it?
The path is correct. . There is already web-inf
Did you build this project yourself using myeclipse? Or did you build it yourself?
There is WEB-INF in the path in your address bar. This is something added by the system by default. How could there be something of yours in it?
The path is correct. . There is already web-inf
Did you build this project yourself using myeclipse? Or did you build it yourself?
Built by eclipse j2ee
Thank you everyone~ Lu Zui finally found the problem. . . It's indeed a path issue. . . It’s so stupid o(?□?)o
The html file should be placed directly under WebContent, not under WebContent/WEB_INF. .
Thanks again everyone. . . IQ has been out wandering recently