How to retrieve parameters from POST in XPages (java)
<p>I want to use Domino as a backend, and html/jquery as a frontend for my web application. So I have:</p>

<pre><code>$.ajax({
    type: 'POST',
    url: 'mydb.nsf/xpage.xsp',
    contentType: 'application/json; charset=utf-8',
    data: { 
        f1: "hello", 
        f2: "hello again"
    },
    success: function (response) {
        console.log("SUCCESS");
    },
    error: function (error) {
        console.log(error);
    }
});
</code></pre>

<p>In Domino:</p>

<pre><code>public static String doGet(HttpServletRequest req, HttpServletResponse res) throws JsonException, IOException, NotesException {
    return doPost(req, res);
}    

public static String doPost(HttpServletRequest req, HttpServletResponse res) throws JsonException, IOException, NotesException {
    System.out.println("1) "+req.getAttribute("f1"));
    System.out.println("2) "+req.getParameter("f1"));
    System.out.println("3) "+req.getContentLength());

    return "AllOK";
}
</code></pre>

<p>In firebug and domino log I see that POST goes trough ok, gets the response. But I can't figure out how to get params f1 and f2 in domino.
In domino log:
1) is null, 
2) is null, 
3) is 23.</p>

<p>Idea for later is to POST JSON, but for now it would be great to have this code working.</p>

<p>How to get POST parameters in domino via java?</p>

<p>(I see stackoverflow has a lot of similar questions answered, but couldn't find anything specific to my problem)</p>

<p>Thank you!</p>