Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2012
    Location
    South Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getURI showing me JSP file name not URL in browser

    I am trying to pull in the URL as viewed in the browser address bar into a Google Analytics tag. I used the

    <%
    String getURI=request.getRequestURI();
    %>

    method but it's showing me the JSP file name/path rather than what is in the browser.

    Am I doing this wrong or is this the expected result since I'm working in a developer ToolKit on a VM?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    I don't do JSP at all, but according to the API, you need to fetch from the getRequestURL() not from the getRequestURI().


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •