Adding a Servlet to my app.
ArbolOne Enterprise <[email protected]> Mon, 30 Jun 2025 18:48:24 -0400
| Newsgroups | gmane.comp.java.ide.netbeans.user |
|---|---|
| Message-ID | <BYAPR12MB2808382D6A97B648F54BB737BA46A@BYAPR12MB2808.namprd12.prod.outlook.com> |
*Product Version:* Apache NetBeans IDE 25 *Java:* 24.0.1; Java HotSpot(TM) 64-Bit Server VM 24.0.1+9-jvmci-b01 *Runtime:* Java(TM) SE Runtime Environment 24.0.1+9-jvmci-b01 *System:* Windows 11 version 10.0 running on amd64; UTF-8; en_US (nb) Using Netbeans with the above specs I created Java Ant Project for a Jakarta EE App [MyJakartaEE_App]. Then, I added a servlet to the app : "Right click on the project > New > Servlet ", I created a servlet and called it *PhoneBookSaveServlet* . In a *html *file I added the following code <snip> <form action="PhoneBookSaveServlet" method="post" name="edit"> ... bla, bla, bla <button type="submit" formaction="PhoneBookSaveServlet" name="submit_type" value="Save"> Save </button> </snip> Compiled the Jakarta EE app and ran it, but I get a message that says : * The requested resource [/MyJakartaEE_App/phone_book/PhoneBookSaveServlet] is not available* I then Right click on the project > properties > Run and the Context path is "/*MyJakartaEE_App*", so, that is not the problem. Where did I go wrong? What else do I need to do? Anybody?