W
W
WildCherryCandy2015-01-11 07:41:03
Java
WildCherryCandy, 2015-01-11 07:41:03

How to correctly call DIFFERENT controller methods from JSP?

Hello.
The situation is this. There is a JSP page. It has two forms:

<form method="post">
     <input type="text" name="addName">
     <button type="SUBMIT">Add</button>
</form>
<form method="post">
     <input type="text" name="deleteName">
     <button type="SUBMIT">Delete</button>
</form>


The essence of the question is as follows: I would like to somehow directly use my methods from the controller, for example, the names of the methods:
public void add(HttpServletRequest req, HttpServletResponse resp);
public void delete(HttpServletRequest req, HttpServletResponse resp);

In Liferay, for example, for aui:form , the name parameter is set to the name of the controller method that will be executed by Submit form . What is the correct way to call the controller methods in my case?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question