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 8305453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:07:10+00:00 2026-06-08T18:07:10+00:00

I have a REST web service which I created previously and deployed in Tomcat7.

  • 0

I have a REST web service which I created previously and deployed in Tomcat7. I wanted to deploy it on Jetty, as advised in a previous question, I made a Maven project and copied my files there and configured the dependencies and I can run Maven install from eclipse successfully.

This is my build part in POM.xml:

 <build>
    <plugins>
        <plugin>
             <groupId>org.mortbay.jetty</groupId>
             <artifactId>maven-jetty-plugin</artifactId>
        </plugin>

        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <dependentWarExcludes></dependentWarExcludes>
                <webappDirectory>
                    WebContent
                </webappDirectory>

            </configuration>
        </plugin>
    </plugins>
</build> 

I followed instructions here to use maven jetty plug-in (I am not sure if this is required). The question here is how can I deploy my maven project in jetty from eclipse so that i can go to http:localhost:8080/myproject for example and see my project working?

EDIT:

The way I used to run the service on Tomcat was by right click on the project and click on Run As -> Run on server (which is configured in eclipse servers)

I am using eclipse Indigo, Maven 3 and jetty 8. Also I used jersey for the web service.

  • 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-08T18:07:11+00:00Added an answer on June 8, 2026 at 6:07 pm

    Here, you are mixing two different things:

    1. Run your Web application using a Eclipse server plugin as Tomcat plugin for Eclipse.
    2. Run your Web application using a Maven plugin as Jetty Maven plugin. There are also Maven plugins for Tomcat.

    Having said that, take a look to this answer where it is described how to configure Eclipse to run Maven plugins (it could change depending on Eclipse version but idea would be similar)

    Edited:

    If you just want to run jetty from Maven, just use the following command line:

    mvn jetty:run
    

    But, in any case, I recommend that you indicate the Maven jetty plugin version in the pom file (Maven will warn you if you don’t).

    Edited 2

    First, update your jetty maven plugin version:

    <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.0.0.M2</version>
    </plugin>
    

    Second. You are working with two plugins, one for building the war file (maven-war-plugin) and another one for running your application on jetty (jetty-maven-plugin). Take in mind that jetty thinks your project has a standard maven project structure, it means, it will look for your web app content in /src/main/webapp but it looks like is not here. In your war plugin configuration, you specify that your web content is in WebContent, so tell jetty plugin that directory is there, as well as you are telling it to war plugin:

    <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.0.0.M2</version>
        <configuration>
            <webAppSourceDirectory>/WebContent</webAppSourceDirectory>             
            <webXml>/over/here/web.xml</webXml>
            <jettyEnvXml>/src/over/here/jetty-env.xml</jettyEnvXml>
            <classesDirectory>/somewhere/else</classesDirectory>
        <configuration>
    </plugin>
    

    See documentation. Of course, it is better to work with a standard maven project structure so you do not need to tell jetty where things are.

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

Sidebar

Related Questions

I have created a rest architecture based web service in C# which will return
I have created a REST web service and successfully used it with a client.
I have a REST web service which exposes 2 methods- [POST method] Client will
I ve created a sample REST web service which writes some data in a
I have a REST web-service interface that calls-down to a service layer which orchestrates
I am new to web services. I have written a rest web service which
I have created a simple Northwind's Product REST Web Service in WCF at /Northwind/Product
I have developed REST web service which is able to accept some data, load
I want to build a REST web service on app engine. Currently i have
I have an ASP.NET Web API (version 4) REST service where I need to

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.