show-product.jsp?id=HC
what will show-product.jsp get? And how can I reach those values in jsp file? How to get parameters from the URL with JSP
show-product.jsp?id=HC
what will show-product.jsp get? And how can I reach those values in jsp file? How to get parameters from the URL with JSP
That is what is called a query
string, and you can retrieve the value from the query string by calling the getParameter
function.
<%= request.getParameter("id") %>
In the example you provided, it will return "HC".