请问为什么编译不通过
package com.nong;import javax.servlet.*;import javax.servlet.http.*;import java.io.*;public class ServletContext extends HttpServlet {public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{ try{ res.setContentType("text/html;charset=gbk"); PrintWriter pw=res.getWriter(); ServletContext sc=this.getServletContext();//为什么这里编译不通过 } catch(Exception e) {e.printStackTrace();}}public void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{ this.doGet(req,res);} }