Hi Stanislav, Use these lines to avoid the NullPointerException import javax.servlet.ServletContext; import javax.servlet.http.HttpSession;
HttpSession ses = request.getSession(); ServletContext cfg = ses.getServletContext(); Hope this piece of code helps you, Thanks & Bye, Ganesh.K