Assume URL : http: / localhost: 9090 / project1 / url.jsp? id1 = one & id2 = two & id3 = three
<% String str=request.getRequestURL()+"?"+request.getQueryString(); System.out.println(str); %>
with this i get the output http: / local: 9090 / project1 / url.jsp id1 = one
but with this I can only get the 1st parameter (i.e. id1 = one) and not the other parameters
but if i use javascript i can get all parameters
function a() { $('.result').html('current url is : '+window.location.href ); }
HTML:
<div class="result"></div>
I want to get the current URL value that will be used on my next page, but I do not want to use sessions
using either of the two methods above, how to get all parameters in jsp?
early
source share