I am working with Servlets and I am trying to retrieve Session Context using the JSFUtils.resolveExpression("#{sessioncontext}") method in ADF but it is giving me a Null Pointer Exception. What is wrong with the above used method and Is there another way to retrieve sessioncontext in my Servlet?
Thanks,
Edit: Please find the Code below,
public class MyServlet extends HttpServlet {
public final void init(final ServletConfig config) throws ServletException {
super.init(config);
}
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
SessionContext session = (SessionContext) JSFUtils.resolveExpression("#{sessioncontext}");
//more code below
}
}