0

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

jozinho22
  • 459
  • 2
  • 7
  • 24

1 Answers1

1

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 {
Karam Mohamed
  • 843
  • 1
  • 7
  • 15