title: Jersey - get parameter always null
body: <p>I changed my code according to R4J answer. 
  I think there's something more to correct since I can't display anything now... </p>
  
  <p><a href="http://i.stack.imgur.com/CqvyU.png" rel="nofollow">result I get</a> - console is clear (no errors)</p>
  
  <p>Could anyone be so kind and help me find the issue? </p>
  
  <p>Below I describe my project:</p>
  
  <p><strong>DB</strong>:</p>
  
  <p><a href="http://i.stack.imgur.com/YWVlS.png" rel="nofollow">database table "users"</a></p>
  
  <p><strong>TestUser.java</strong></p>
  
  <pre><code>import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Entity
  @Table(name = "USERS")
  public class TestUser {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Integer id;
      @Column(name = "email", nullable = false)
      private String email;
      @Column(name = "password", nullable = false)
      private String password;
  
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
  }
  </code></pre>
  
  <p><strong>TestService.class</strong></p>
  
  <pre><code>import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  import com.test.testapp.dao.UserDao;
  import com.test.testapp.model.TestUser;
  
  @Component
      public class TestService {
          @Autowired
          UserDao userDao;
  
          public List&lt;TestUser&gt; getUsers() {
              return userDao.findAll();
          }
      }
  </code></pre>
  
  <p><strong>UserDao.class</strong></p>
  
  <pre><code>import java.util.List;
  
  import javax.persistence.PersistenceException;
  
  import com.test.testapp.model.TestUser;
  
  public interface UserDao /* extends CrudRepository&lt;TestUser, Integer&gt;*/{
      public List&lt;TestUser&gt; findAll() throws PersistenceException;
  }
  </code></pre>
  
  <p><strong>UserDaoImpl.java</strong></p>
  
  <pre><code>    import java.util.List;
  
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      import javax.transaction.Transactional;
  
      import org.jvnet.hk2.annotations.Service;
      import org.springframework.beans.factory.annotation.Autowired;
      import org.springframework.stereotype.Repository;
  
      import com.test.testapp.dao.UserDao;
      import com.test.testapp.model.TestUser;
  
      @Repository("userDao")
      @Service
      public class UserDaoImpl implements UserDao {
  
          @Autowired
          private EntityManager entityManager;
  
          @PersistenceContext
          public void setEntityManager(EntityManager entityManager) {
              this.entityManager = entityManager;
          }
  
          public TestUser findPersonById(Integer id) {
              return entityManager.find(TestUser.class, id);
          }
  
          @Override
          @Transactional
          public List&lt;TestUser&gt; findAll() {
              try {
                  return entityManager.createQuery("SELECT u FROM Users u ORDER BY p.id", TestUser.class).getResultList();
              } finally {
                  entityManager.close();
              }
          }
      }
  </code></pre>
  
  <p><strong>TestWebApi.java</strong></p>
  
  <pre><code>import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.core.Response;
  
  @Controller
  @Path("test")
  public interface TestWebApi {
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("/")
      public Response getUsers();
  }
  </code></pre>
  
  <p><strong>TestWebApiImpl.java</strong></p>
  
  <pre><code>import java.util.List;
  
  import javax.inject.Inject;
  import javax.ws.rs.core.Response;
  
  import com.test.testapp.model.TestUser;
  import com.test.testapp.service.TestService;
  import com.test.testapp.web.TestWebApi;
  
  public class TestWebApiImpl implements TestWebApi {
  
      @Inject
      TestService testService;
  
      @Override
      public Response getUsers() {
          List&lt;TestUser&gt; test = testService.getUsers();
          return Response.ok().entity(test).build();
      }
  }
  </code></pre>