Is there a way in this case to pass the parameters to the POST form without using input?

Everything is simple - the link in my situation serves as a button, after pressing it you need to read certain parameters in Java.

<form method="POST" id="my_form"> <table> <tr> <td><a href="javascript:{}" onclick="document.getElementById('my_form').submit();" class="editmentordiv" name="ws">Name Surname</a></td> </tr> </table> </form> 

Reading parameters in Java:

 if (method.equals("POST")) { InputStreamReader isr = new InputStreamReader(httpExchange.getRequestBody(), "utf-8"); BufferedReader br = new BufferedReader(isr); String formData = br.readLine(); Map inputs = parseFormData(formData); String first_parametr = inputs.get("parametr_name").toString(); 
  • 2
    What are the specific parameters? So far, nothing is clear, and it is also not clear that for your "certain parameters" it prevents you from adding inputs - andreymal
  • If you do not answer the questions, you are unlikely to be able to help. If the question is resolved, write the answer to yourself with a description of the solution. - Bharata

0