-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All,
On 4/6/2010 10:49 AM, Christopher Schultz wrote:
> 98.218.200.175 - - [06/Apr/2010:14:46:52 +0000] "GET
> /context/;jsessionid=FA8E3DA6A38E3CF07370658FA759A454/images/help_widget.gif
> HTTP/1.1"
So, I was trying to generate some content using Javascript yet pass-in
all the elements of the URL to the javascript so I wouldn't have to
either hard-code context paths into the Javascript or use a dynamic
javascript source.
Anyhow, I had done something like this:
function foo(..., contextPath, ...) {
}
foo(..., '<%= response.encodeURL(request.getContextPath()) %>', ...)
That, of course, gives me a contextPath that looks like
"/context/;jsessionid=...." and then appending paths onto it breaks
everything.
So, I now have split things up like this:
function foo(..., contextPath, pathSuffix, ...) {
...
// build a URL
var url = contextPath + '/images/help_widget.gif' + pathSuffix;
...
}
... and passing request.getContextPath() as the first argument and then
passing response.encodeURL(".").substring(1) as the second argument. A
bit of a hack, but it'll work.
Thanks for not making fun of me too much.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAku7TQ8ACgkQ9CaO5/Lv0PC1vQCgjQ1RwPlbDQhKDCvyVtDp07ZR
5mkAnj8QN1P/vlYlqnCPGkOavsS5DkZQ
=P7De
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]