Search code examples
scalalift

Need help getting through the LiftWeb Getting Started tutorial


I'm trying to get through the LiftWeb Getting Started Tutorial.

This is what I've done:

  1. Downloaded and unpacked the tar-file.

  2. (Here I tried to do sbt update as stated in the instructions, but it failed.)

  3. Copied lift_blank/* to project root.

  4. Then sbt update (successfully this time)

  5. Copied the source code for Chat.scala and inserted the tag in webapp/index.html as instructed.

  6. Executed sbt ~jetty-run

  7. Opened a http://localhost:8080 in a browser.

But all I see is this:

enter image description here

which doesn't look like a chat-application to me.

What am I doing wrong?


Solution

  • I tried it my self and I must say that the tutorial isn't very clear about where to paste the div block.

    Here's what I did in addition to the instructions on the tutorial page:

    I pasted the given div snippet into the existing main div block of the index.html.

    <div id="main" class="lift:surround?with=default;at=content">
    
    <div class="lift:comet?type=Chat">
      <ul>
        <li>line</li>
      </ul>
    </div>
    
    </div>
    

    This should do it.

    After running jetty, I could use the simple chat app.

    Here's a screen shot of what I am seeing after running sbt ~jetty-run lift_basic

    Hope that helps
    Thomas

    Btw, it even works with lift_blank:
    lift_blank