I am trying to develop a Jersey server application for a booking system in Eclipse using Payara server. When I run the project I get "HTTP Status 404 - Not Found". I have checked several tutorials and StackOverflow posts but cannot find the error. Can anybody help me with this? 

BookingService interface:

```
public interface BookingService {

    public Response addBooking(Room room);

    public Response cancelBooking(Room room);

    public Room getRoom(int roomNumber);

    public Room[] getAllAvailableRooms();
}

```

BookingService implementation:

```
@Path("/booking")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class BookingServiceImpl implements BookingService{

private static Map<Integer,Room> rooms = new HashMap<Integer,Room>();

@POST
@Path("/add")
public Response addBooking(Room room) {
    Response response = new Response();

    if(rooms.get(room.getNumber()).isBooked()) {
        response.setMessage("This room is not available");
        return response;
    }
    room.bookRoom();
    response.setMessage("Room successfully booked");

    return response;
}

@GET
@Path("/delete")
public Response cancelBooking(Room room) {
    Response response = new Response();
    if(!rooms.get(room.getNumber()).isBooked()) {
        response.setMessage("This room is not booked so booking cannot be cancelled");
        return response;
    }

    room.cancelBooking();
    response.setMessage("The booking for room " + room.getNumber() + "has been successfully cancelled");
    return null;
}

@GET
@Path("/getAll")
public Room[] getAllAvailableRooms() {
    Set<Integer> keys = rooms.keySet();
    Room[] roomArray = new Room[keys.size()];
    int i=0;
    for(Integer key : keys){
        if (!rooms.get(key).isBooked()) {
            roomArray[i] = rooms.get(key);
            i++;
        }
    }
    return roomArray;
}

```

pom.xml:

```
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>se.kth.id1212</groupId>
<artifactId>ID1212BookingSystem</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>ID1212BookingSystem Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>2.20</version>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet</artifactId>
        <version>2.20</version>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-json-jackson</artifactId>
        <version>2.13</version>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>2.22.2</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <finalName>ID1212BookingSystem</finalName>
    <plugins>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <warSourceDirectory>WebContent</warSourceDirectory>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>

```

Edit: When I researched the problem I read that the web.xml file did not have to specify anything other than display name when using jersey 2. I don't know if that's true, but below is the web.xml file I used before reading that, but it does not work either. 

```
<web-app>
    <display-name>Archetype Created Web Application</display-name>
    <!-- Jersey Servlet configurations -->
    <servlet>
        <servlet-name>Jersey REST Service</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>se.kth.id1212.ID1212BookingSystem</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey REST Service</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <!-- Jersey Servlet configurations -->
</web-app>

```

Edit 2, added the following images:

![Project package structure](https://i.stack.imgur.com/0qARz.png)

![Postman 404 error](https://i.stack.imgur.com/qwZyB.png)