Announcement Announcement Module
Collapse
No announcement yet.
Capturing URL Parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Capturing URL Parameters

    This is more a general HTTP response question than something directly related to the Spring Framework.

    I'm trying to capture url prameters:

    http://server/formProject.htm?id=3

    But all I've been able to get is:

    http://server/formProject.htm

    Modifying the code below, does anybody know how I can construct a full url, which includes parameters?

    Thanks!

    Code:
        if (!request.isSecure()) {
          String svr = request.getServerName();
          String url = StarUtils.getStarURL(request.getRequestURI());
          String param = (String) session.getAttribute("param");
          url = param != null ? url + param : url;
          response.sendRedirect("https://" + svr + url);

  • #2
    HttpServletRequest has a getQueryString() method - does that help?

    Comment

    Working...
    X