Problem in servlet url-pattern JAVA
Closed
ahmedep
Posts
8
Registration date
Saturday November 27, 2021
Status
Member
Last seen
November 19, 2022
-
Updated on Nov 19, 2022 at 08:51 AM
eden60_3473 Posts 6 Registration date Tuesday July 11, 2023 Status Member Last seen July 27, 2023 - Jul 27, 2023 at 08:53 AM
eden60_3473 Posts 6 Registration date Tuesday July 11, 2023 Status Member Last seen July 27, 2023 - Jul 27, 2023 at 08:53 AM
Related:
- Http servlet java
- Minecraft java edition free download - Download - Sandbox
- Java servlet development kit - Guide
- Java free download - Download - Other
- Cavaj java decompiler - Download - Source code editing
- Java update tab missing - Guide
2 responses
gorgeousgorilla
Posts
1
Registration date
Friday November 25, 2022
Status
Member
Last seen
November 25, 2022
Updated on Nov 25, 2022 at 04:16 AM
Updated on Nov 25, 2022 at 04:16 AM
Hi,
There seem to be least three issues
Classes are searched in WEB-INF/classes
rather than in WEB-INF
Use the HttpServlet
instead of the generic Servlet
Overwrite the doXXX
methods of the HttpServlet
and not the generic service
method. The service
method dispatches to the corresponding doXXX
method.
eden60_3473
Posts
6
Registration date
Tuesday July 11, 2023
Status
Member
Last seen
July 27, 2023
1
Updated on Jul 27, 2023 at 02:42 PM
Updated on Jul 27, 2023 at 02:42 PM
It seems you are trying to access the "showNewForm()" method through the URL "http://localhost:8081/Atelier1/listarticleclient/new", but the servlet mapping is set to "/client" in the web.xml file.
To call the method correctly, change the URL to "http://localhost:8081/Atelier1/client/new".
This should resolve the error.