request.getServletContext()只能在jdk6以上

要在Java 6.0 以上纔可以使用request.getServletContexthtml     ServletRequest的getServletContext方法是Servlet3.0添加的,這個能夠看一下官方文檔java http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getServletCon
相關文章
相關標籤/搜索