Q: Tomcat : 404 The requested resource is not available I am using hibernate framework. Here is the hibernate.cfg.xml file code.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory name="">
  <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  <property name="hibernate.connection.password">702711</property>
  <property name="hibernate.connection.url">jdbc:oracle:thin:@10.69.18.24:1521:xe</property>
  <property name="hibernate.connection.username">system</property>
  <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>

  <mapping class="com.eccSports.entity.UserEntity"/>
 </session-factory>
</hibernate-configuration>

And the web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  <display-name>ECCSports</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>Jersey REST Service</servlet-name>
    <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>jersey.config.server.provider.packages</param-name>
      <param-value>com.eccSports.api</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Jersey REST Service</servlet-name>
    <url-pattern>/api/*</url-pattern>
  </servlet-mapping>
</web-app>

This is the directory structure.
All the files are there but I am still getting 404. I restarted server several times, but still its not working.

A: As I can see you are useing jersey and hibernate .... make sure you are following the below given steps ...


*

*Whatever url you are sending it must contain your given url pattern : <url-pattern>/api/*</url-pattern>
eg:
     http://localhost:8080/yourpath/api/classlevelurl/

*Make sure that service you are writing is inside com.eccSports.api package. as you have mentioned in web.xml
