String path = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();

    @SuppressWarnings("unchecked")

Enumeration<String> param = request.getParameterNames();

    String strParam = "";

    while(param.hasMoreElements()) {

    String name = (String)param.nextElement();

    String value = request.getParameter(name);

    strParam += name + "=" + value + "&";

    }

    String URL = request.getRequestURI() + "?" + strParam.substring(0, strParam.length() - 1);

   



Posted by linuxism
,