1) YES, you will have access to the POST and GET variables, since your request will contain both. Thus, you can use $ _GET ["param_name"] and $ _POST ["param_name"] respectively.
2) Using JSP, you can use the following code for both:
<%= request.getParameter("param_name") %>
If you use EL (JSP expression language), you can also get them as follows:
${param.param_name}
EDIT : if param_name present in both QueryString queries and POST data, both will be returned as an array of values, the first of which is QueryString.
In such scenarios, getParameter("param_name) will return the first of them (as described here ), however both of them can be read using the getParameterValues("param_name") method as follows:
String[] values = request.getParameterValues("param_name");
For more information, read here .
Darkseal
source share