jsp静态区块中不能用jsp内置对象 小弟初次用JSP做个东西,我在JSP页面静态区块中用到内置对象application,网页显示该对象不能解析,这是什么问题呢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 估计不得行lz需要做什么东西 不可以在jsp中的jspInit方法中写? 后台是干嘛用的,怎么什么都在jsp上写,蛋疼的厉害 重写jsp的jspInit方法,在里面初始化资源就可以了 自己看下jsp生成的servlet吧 public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null;}内置对象全是在_jspService中初始化的,而你在静态块中能有application这个对象吗?跟导没导相关类没关系 图片 位置 java序列化问题 关于struts2的困惑 fckeditor+struts2 上传图片问题 JSP连接Mysql遇到一些问题 关于JAVABEAN的几点疑问 求助各位,帮我指条明路 为什么我做的弹出页面没有显示在最上面? jquery中判断为空问题 给分啦! struts2 ognl 前台取复合对象值的小问题,求助 如何用flex画流程图,
重写jsp的jspInit方法,在里面初始化资源就可以了
自己看下jsp生成的servlet吧 public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException { PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
}内置对象全是在_jspService中初始化的,而你在静态块中能有application这个对象吗?跟导没导相关类没关系