Issue
Sorry for this dummy question, but something is going wrong with this little sample :
<div id="footer">
<form action="debut" method="GET">
<button id="btn-start" class="btn btn-success" type="submit">Commencer</button>
</form>
</div>
I'm trying to call a servlet declared like this :
@WebServlet("/debut")
public class DebutServlet {
Why the action does not work ?
Thank you
Solution
Try to call the name of the servlet :
<form action="DebutServlet " method="GET">
<button id="btn-start" class="btn btn-success" type="submit">Commencer</button>
</form>
Also better to make annotation in same name of Servlet :
@WebServlet("/DebutServlet")
public class DebutServlet {
Answered By - Karam Mohamed
Answer Checked By - Terry (JavaFixing Volunteer)