I want my Domino Servlet to get an authenticated user session

后端 未结 5 1261
情歌与酒
情歌与酒 2021-01-15 02:43

It seems a like a pretty fundamental question, in a running Servlet hosted on Domino I want to access Domino resources that I have wisely protected using the the very fine s

5条回答
  •  广开言路
    2021-01-15 03:12

    FacesContext is JSF stuff and can be used from XAgent (=XPage).

    In a servlet you can do this:

    Session session = NotesFactory.createSession(null, "user", "password");
    

    Server ID usually has no password and doing this will use the server ID:

    Session session = NotesFactory.createSession();
    

提交回复
热议问题