I faced with the following problem:
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title>Lab2</title>
</head>
<body>
<p>
<form>
Period: <input type="number" name="period" size="50"> <br>
Faculty: <input type="text" name="faculty" size="50"> <br>
<a href="${pageContext.request.contextPath}/calculatePaymentForSeveralSemesters?value=<%=request.getParameter("period")%>&faculty=<%=request.getParameter("faculty")%>">Calculate payment for several semesters</a>
<a href="${pageContext.request.contextPath}/showTwoSmallestFaculties">Show two smallest faculties</a>
<input type="submit">
</form>
</p>
</body>
</html>
Now I have to enter data to the inputs, then click on Submit and only then I can click on the link. But is there any way to navigate to another pages by clicking on the button and passing parameters to other pages? I will appreciate any help, thanks in advance!