「Java」getRealPath()で絶対パスを取得する

サンプルコード
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException {

ServletContext context = this.getServletContext();
path=context.getRealPath(“/WEB-INF/view/user/index.jsp”);
context.setAttribute(“username”,”yamada”);
//some code

}
}