Thanks. I've fixed this problem and have committed everything to SVN. Deployed everything to stax.
I discovered a new bug during testing (unable to post from streams / public page) so we aren't finished with the release yet. D. On Fri, Feb 25, 2011 at 6:28 AM, Vassil Dichev <[email protected]> wrote: > OK, I've committed a fix, and it works with Jetty. I think you've also > forgotten to mention that shortened URLs must also have the prepended > context root. > > Now it's time to go to the kindergarten with my son, feel free to test. > > Vassil > > > On Fri, Feb 25, 2011 at 6:56 AM, Vassil Dichev <[email protected]> wrote: >> Since the context root doesn't change for the lifetime of the >> application, I would define a val somewhere in object Message: >> >> val root = LiftRules.context.path >> >> and then prepend root to these URLs. Give me half an hour and I'll do >> it and test that at least it works on Jetty (should be empty context >> root). >> >> >> On Fri, Feb 25, 2011 at 6:46 AM, Richard Hirsch <[email protected]> >> wrote: >>> If you just change the two lines of codes accordingly, I can test it >>> on Tomcat. I kept getting Scala errors while compiling >>> >>> map(nickname => >>> <xml:group> @<a >>> href={"/user/"+urlEncode(nickname.text)}>{nickname}</a> </xml:group>). >>> getOrElse(Text("")) >>> >>> case e: Elem if e.label == "tag" => >>> e.attribute("name").map(tag => >>> <xml:group> #<a >>> href={"/tag/"+urlEncode(tag.text)}>{tag}</a> </xml:group>). >>> getOrElse(Text("")) >>> >>> >>> D. >>> On Fri, Feb 25, 2011 at 5:43 AM, Vassil Dichev <[email protected]> wrote: >>>> A quick look at the Scaladocs >>>> (http://scala-tools.org/mvnsites/liftweb-2.2/framework/scaladocs/index.html) >>>> shows it should be easy: >>>> >>>> LiftRules.context.path >>>> >>>> Unfortunately I won't have the time to test it with Tomcat now, could >>>> you give this a try? Otherwise I'll check it tonight. >>>> >>>> Vassil >>>> >>>> >>>> On Fri, Feb 25, 2011 at 6:33 AM, Richard Hirsch <[email protected]> >>>> wrote: >>>>> @Vassil - that would be great >>>>> >>>>> Thanks. >>>>> >>>>> D. >>>>> >>>>> On Fri, Feb 25, 2011 at 5:31 AM, Vassil Dichev <[email protected]> wrote: >>>>>> Dick, >>>>>> >>>>>> This could be done with Javascript, but now that I look at the problem >>>>>> more closely I think it should be done in Scala. We need to get the >>>>>> servlet context name and prepend it to the URL via the Servlet API. >>>>>> Let me check how to do that. >>>>>> >>>>>> Vassil >>>>>> >>>>>> On Thu, Feb 24, 2011 at 7:22 PM, Richard Hirsch <[email protected]> >>>>>> wrote: >>>>>>> Moving ahead with the last item for the 1.2 release. >>>>>>> >>>>>>> I'm getting there - I've cleared up most of the issues via various >>>>>>> JavaScript changes. I'll check in the code tomorrow. >>>>>>> >>>>>>> Now I'm trying to figure out how to make the message contents deal >>>>>>> with the relative paths as well. The problem occurs when tags or @user >>>>>>> URLs are included in messages. >>>>>>> >>>>>>> The code is in model/Message.scala >>>>>>> >>>>>>> map(nickname => >>>>>>> <xml:group> @<a >>>>>>> href={"/user/"+urlEncode(nickname.text)}>{nickname}</a> </xml:group>). >>>>>>> getOrElse(Text("")) >>>>>>> >>>>>>> case e: Elem if e.label == "tag" => >>>>>>> e.attribute("name").map(tag => >>>>>>> <xml:group> #<a >>>>>>> href={"/tag/"+urlEncode(tag.text)}>{tag}</a> </xml:group>). >>>>>>> getOrElse(Text("")) >>>>>>> >>>>>>> We have the same problem here that the href is not correct when using >>>>>>> Tomcat. >>>>>>> >>>>>>> I have a javascript method which I call to adjust the path but I >>>>>>> haven't been able to get the Scala syntax right. For example, >>>>>>> >>>>>>> <xml:group> @<a >>>>>>> href={"javascript:pathAdjust('/user/'+urlEncode(nickname.text))"}>{nickname}</a> >>>>>>> </xml:group>). >>>>>>> >>>>>>> Maybe, someone with more Scala experience can show me how this work. >>>>>>> If you want just use the javascript alert method. >>>>>>> >>>>>>> D. >>>>>>> >>>>>>> On Tue, Feb 22, 2011 at 9:33 AM, Richard Hirsch <[email protected]> >>>>>>> wrote: >>>>>>>> Yep - try it with IE and create a message with a tag - the tag no >>>>>>>> longer appears 2x :-> >>>>>>>> >>>>>>>> D. >>>>>>>> >>>>>>>> On Tue, Feb 22, 2011 at 9:21 AM, Ethan Jewett <[email protected]> >>>>>>>> wrote: >>>>>>>>> This is great Dick. Thanks! Is the new version now deployed at >>>>>>>>> http://esmecloudserverapache.dickhirsch.staxapps.net/ ? It looks like >>>>>>>>> there is a new deploy up there. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> Ethan >>>>>>>>> >>>>>>>>> On Mon, Feb 21, 2011 at 9:42 AM, Richard Hirsch >>>>>>>>> <[email protected]> wrote: >>>>>>>>>> 295 is finished and the JIRA issue is closed. >>>>>>>>>> >>>>>>>>>> One more JIRA issue to go.... >>>>>>>>>> >>>>>>>>>> On Sun, Feb 20, 2011 at 11:21 AM, Richard Hirsch >>>>>>>>>> <[email protected]> wrote: >>>>>>>>>>> just FYI >>>>>>>>>>> >>>>>>>>>>> I'm currently working on the last two issues for the 1.2 release. >>>>>>>>>>> I've >>>>>>>>>>> already solved https://issues.apache.org/jira/browse/ESME-295 and am >>>>>>>>>>> now working on https://issues.apache.org/jira/browse/ESME-327. >>>>>>>>>>> >>>>>>>>>>> D. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >
