title: Ninja framework not getting POST data or seeing NinjaProperties
body: <p>Two things are going wrong here, which might be two problems or might have the same root: they both feel like a config error somewhere, hence putting them together. Apologies is advance if this is confusing the issue...</p>
  
  <p>I'm using Ninja Framework, still learning my way around starting from the Hello World example. I can serve pages with GET and POST using Routes, a Controller and html OK.</p>
  
  <p>In case it is relevant, I'm running on a fresh CentOS VM, using NetBeans to write, Firefox to test. I have restarted Ninja (many times).</p>
  
  <p>Problem 1: NinjaProperties isn't visible in code. I had understood that I can put, for example</p>
  
  <pre><code>import com.google.inject.Inject;
  public abstract class PersistDB {
      @Inject
      NinjaProperties ninjaProperties;
      ...
      protected void loadProps() {
          dbReadServer = ninjaProperties.getWithDefault(DB_READ_SERVER_PROP, DBSERVER_DEFAULT);
          ...
      }
  }
  
  public class UsersDB {
      public UsersDB() {
         loadProps();
      }
  }
  </code></pre>
  
  <p>and have my model code access the application.conf file to extract properties. However ninjaProperties is coming back null.</p>
  
  <p>Problem 2: The JSON parsing described at <a href="http://www.ninjaframework.org/documentation/working_with_json_jsonp.html" rel="nofollow">Ninja docs</a> where adding a simple class with the right field names to the controller signature caused JSON to be translated behind the scenes isn't working. I can add the class, with the right fields, to the Controller method signature but it is always null. Using GSON I can extract the object for myself so I have a work-around but that also confirms that it is something in Ninja that isn't working.</p>
  
  <p>The code follows the example pretty closely:</p>
  
  <pre><code>package controllers;
  
  public class UserRegisterReq {
    String email;
    String identName;
    String password;
  </code></pre>
  
  <p>}</p>
  
  <p>and</p>
  
  <pre><code>package controllers;
  
  import com.google.inject.Singleton;
  import models.user.User;
  import models.user.UserResult;
  import ninja.Context;
  import ninja.Result;
  import ninja.Results;
  import ninja.session.Session;
  
  @Singleton
  public class UserController {
  
  ...
  
  public Result doRegisterPost(UserRegisterReq req, Context context)  {
      Session session = context.getSession();
      UserResult ur;
  
      ur = User.registerUser(req.email, req.password, req.identName);
      ...
  }
  </code></pre>
  
  <p>Any ideas?
  Thanks in advance...  </p>