You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@raibledesigns.com> on 2002/10/02 15:11:05 UTC

Getting a parameter with a jsessionid in it

I have the following javascript function in my page that contains an
iframe:

function viewSearch() {
    toggleBox("scrollers", 0);
    document.getElementById("pageViewer").src =
        '<html:rewrite page="/scrollingFrame.jsp"/>?h='
        + document.getElementById("pageHeight").innerHTML
        + '&url=' + '<html:rewrite forward="search"/>';
}

When a user first logs into my application, this function turns into:

function viewSearch() {
    toggleBox("scrollers", 0);
    document.getElementById("pageViewer").src = 
 
'/onpoint/scrollingFrame.jsp;jsessionid=BD97183A089EF9B6F574DEE030575E9F
.tomcat0?h='
        + document.getElementById("pageHeight").innerHTML
        + '&url=' +
'/onpoint/do/search;jsessionid=BD97183A089EF9B6F574DEE030575E9F.tomcat0'
;
}

In scrollingFrame.jsp, I have:

requestURL: <%=request.getRequestURL()%>
<br />
queryString: <%=request.getQueryString()%
<br />
url: <%=request.getParameter("url")%>
<br />
h: <%=request.getParameter("h")%>

Which renders:

requestURL: http://onpoint.tv/onpoint/scrollingFrame.jsp
queryString:
h=386&url=/onpoint/do/chat;jsessionid=BD97183A089EF9B6F574DEE030575E9F
url: null
h: 386

Any idea how to get the URL even when the jsessionid is on there?  I
guess I could parse the queryString eh?

Matt



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>