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

  • Home
  • SEARCH
  • 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 8248657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:15:51+00:00 2026-06-07T23:15:51+00:00

Reading the article on http://www.jamesward.com/2011/08/23/war-less-java-web-apps on how to embed an app server with your

  • 0

Reading the article on http://www.jamesward.com/2011/08/23/war-less-java-web-apps on how to embed an app server with your application, i noticed this bit of code.

package foo;

import java.io.File;
import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.JarFile;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.*;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.webapp.WebAppContext;

public class Main
{

  public static 9900;">);
    out.close();
  }
}

What is the Main class doing as i dont understand that syntax.

  • 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-06-07T23:15:53+00:00Added an answer on June 7, 2026 at 11:15 pm

    I see this, so it has to be a problem with your browser.

    package foo;
    
    import java.io.File;
    import java.net.URL;
    import java.util.jar.Attributes;
    import java.util.jar.JarFile;
    
    import org.eclipse.jetty.server.Server;
    import org.eclipse.jetty.server.handler.*;
    import org.eclipse.jetty.util.StringUtil;
    import org.eclipse.jetty.webapp.WebAppContext;
    
    public class Main
    {
    
      public static void main(String[] args) throws Exception
      {
        String webappDirLocation = "src/main/webapp/";
    
        Server server = new Server(8080);
        WebAppContext root = new WebAppContext();
    
        root.setContextPath("/");
        root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
        root.setResourceBase(webappDirLocation);
    
        root.setParentLoaderPriority(true);
    
        server.setHandler(root);
    
        server.start();
        server.join();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented single sign on by reading this article: http://www.codeproject.com/KB/web-security/aspnetsinglesignon.aspx However, I have a
I was looking at using Amazon's EC2 service after reading this article: http://www.ibm.com/developerworks/java/library/j-javadev2-4/index.html But
Right now I'm reading this article regarding Java Garbage Collection: http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html ? Here is
I’ve recently started learning IOCP on Windows and been reading the following article: http://www.codeproject.com/Tips/95363/Another-TCP-echo-server-using-IOCP
I was reading this article on Coding Horror: http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I went to the downloads
I was reading http://www.netrino.com/Embedded-Systems/How-To/State-Machines-Event-Driven-Systems later in the article they provide implementation of the small
I was reading this: http://www.openfeint.com/ofdeveloper/index.php/kb/article/000089 , and it seemed to make out that the
I am reading a post about mobile web development and ASP.NET MVC here: http://www.hanselman.com/blog/ABetterASPNETMVCMobileDeviceCapabilitiesViewEngine.aspx
I was reading this article: http://www.devarticles.com/c/a/PHP/Creating-a-Membership-System/2/ I am not sure if I understand sessions
Is there any difference between the two. I was reading an article ( http://www.javalobby.org/java/forums/t17933

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.