I got a requirement to send one parameter through url pattern of servlet (like we send through <a href="example.jsp?id=1">send</a>
) in the same way I need it through url pattern.
I do this with other possibilities like
these methods are working fine no problem
but through url it's not taking? I want to know whether it is possible or not?
the code I have tried
jsp page
<a href="download?filename=<%=filename%>" target="_blank"> <font color="black"><%=filename%> </font></a>
servlet code
String filename=request.getParameter("filename");
and i need one answer can we pass parameter through url pattern if yes how? i.e like same as through <a href="example?id=1">send</a>
or differently?
Yes you can send as like trough jsp.
i just tested now it's working fine the blank page is coming because of other statements written in your servlet code so make sure servlet code is correct.