You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by ejc <er...@gmail.com> on 2011/01/25 22:55:29 UTC
URL path problems.
I have noticed this several places, but this is a concrete example.
webapp/scripts/display_messages_top.js:198, sets a link to message
author like so:
newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
this causes problems when running with a non / context on tomcat
For example, if esme in running here:
http://foo.bar.com/esme/
the above will create this link:
http://foo.bar.com/user/user1
It appears that tomcat(? or lift?) does the right thing,
snippet/UserSnip.scala:121 does this
<a href={"/user/"+urlEncode(u.nickname.is)}>
which gives the correct location:
http://foo.bar.com/esme/user/user1
My javascript foo isn't strong enough to know if there's a way to
solve this in js. Perhaps the best way is putting it in the template
and just having the js fill in the username?
Thanks,
Eric
Re: URL path problems.
Posted by Richard Hirsch <hi...@gmail.com>.
Just fixed the error in the trunk:
https://issues.apache.org/jira/browse/ESME-327
D.
On Tue, Jan 25, 2011 at 10:55 PM, ejc <er...@gmail.com> wrote:
> I have noticed this several places, but this is a concrete example.
>
>
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
>
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
>
> this causes problems when running with a non / context on tomcat
>
> For example, if esme in running here:
>
> http://foo.bar.com/esme/
>
> the above will create this link:
>
> http://foo.bar.com/user/user1
>
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
>
> <a href={"/user/"+urlEncode(u.nickname.is)}>
>
> which gives the correct location:
>
> http://foo.bar.com/esme/user/user1
>
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js. Perhaps the best way is putting it in the template
> and just having the js fill in the username?
>
>
> Thanks,
> Eric
>