0

I'm new on JSP and I have a basic question. For the moment, i only know two ways to call a Servlet from HTML code.

Call doPost or doGet :

<form action"servletName" method="POST">
<button type="submit"></button>
</form>

or

<form action"servletName" method="GET">
<button type="submit"></button>
</form>

Call doGet :

<a href="servletName"></a>

Is there some others ?

jozinho22
  • 459
  • 2
  • 7
  • 24
  • Change `servletName` to `jspName.jsp` - every JSP **is-a** servlet (a JSP file is compiled into a servlet to be executed). And the generic method of servlet is `doRequest`. There are other verbs beside get and post, what problem are you actually trying to solve? – Elliott Frisch May 14 '20 at 09:00
  • using [ajax](https://stackoverflow.com/questions/4112686/how-to-use-servlets-and-ajax) ? – Swati May 14 '20 at 09:02

0 Answers0