Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-02-2012, 06:21 PM   PM User | #1
surfbird0713
New Coder

 
Join Date: Jun 2012
Location: South Carolina
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
surfbird0713 is an unknown quantity at this point
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?
surfbird0713 is offline   Reply With Quote
Old 10-02-2012, 06:46 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
I don't do JSP at all, but according to the API, you need to fetch from the getRequestURL() not from the getRequestURI().
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:35 AM.


Advertisement
Log in to turn off these ads.