When I click on a link in jspA, it will redirect to jspB with query string src. The message for src will be displayed in jspB without problem. However, why I tried to click on the submit, I am unable to retrieve the value of src in my servlet page. Is there a way for me to retrieve the value of src in servlet? Thanks.
Inside my jspB page:
<img src="<%= request.getParameter("src") %>" />
<table>
<form name="frmTest" action="test" method="post">
<input type="submit" value="sub" name="sub" />
</form>
</table>
Inside my Servlet test:
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException{
String imgUrl = req.getParameter("src");
I am retrieving null value from the imrUrl.