Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:45:20+00:00 2026-05-27T16:45:20+00:00

I have a server, which shall serve some web content as a part of

  • 0

I have a server, which shall serve some web content as a part of it’s duties. It was working using embedded Jetty, and I want to add some Lift’s beauty to it (templates, actors, etc).

The problem is all lift examples use Jetty as a container. Is there a way to start Lift in my embedded Jetty? And if yes, how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:45:21+00:00Added an answer on May 27, 2026 at 4:45 pm

    Found the answer: RunWebApp.scala

    import _root_.org.mortbay.jetty.Connector
    import _root_.org.mortbay.jetty.Server
    import _root_.org.mortbay.jetty.webapp.WebAppContext
    import org.mortbay.jetty.nio._
    
    object RunWebApp extends Application {
      val server = new Server
      val scc = new SelectChannelConnector
      scc.setPort(8080)
      server.setConnectors(Array(scc))
    
      val context = new WebAppContext()
      context.setServer(server)
      context.setContextPath("/")
      context.setWar("src/main/webapp")
    
      server.addHandler(context)
    
      try {
        println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP")
        server.start()
        while (System.in.available() == 0) {
          Thread.sleep(5000)
        }
        server.stop()
        server.join()
      } catch {
        case exc : Exception => {
          exc.printStackTrace()
          System.exit(100)
        }
      }
    }
    

    My only problem now is to build this with Lift 2.4, Scala 2.9.1 and Eclipse Jetty – currently I can find only artifacts for Lift 2.3, Scala 2.8.1 and Mortbay Jetty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Python web application in which I have some small modules
I have a web server which saves cache files and keeps them for 7
We have a reporting server which has a bunch of reports and some ad
I have a web server which is protected behind http-basic-auth. I've read through the
I have a slapd LDAP server which is critical to my application. I want
I have a web application written using CherryPy, which is run locally on 127.0.0.1:4321
I'm working on the design of a web app which will be using AJAX
I have an asp.net web page which interacts with a SQL Server database, grabs
I have an HTTP server which is in our internal network and accessible only
I have an x64 server which, since my libraries are compiled to AnyCPU, run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.