ERROR 21 六月 2010 11:00:50 [org.apache.catalina.core.ApplicationDispatcher] [invoke] - Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;

解决方案 »

  1.   

    我加了个分页工具条就报此错误
    分页工具条代码如下:<%--
    通用分页工具条
    重要参数:
    pageToolMap 是经过action的查询后,保存在request中的.
    它包含
    intRowCount 总行数
    intPage 当前页
    intPageSize 页大小
    intPageCount 总页数
    actionURL 查询用的action的提交地址
    actionFormName 查询用的form的名称。 通常使用0,即页面中第一个form来提交查询和分页
    --%>
    <%@ page pageEncoding="UTF-8" %>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><script language='javascript'>
    /**
    *格式化当前页码
    *@param  intPageCount  总页数
    */
    function formatIntPage(intPage, intPageCount){
    //处理页码非数字
    intPage = isNaN(intPage) ? 0 : intPage;

    //处理页面超出范围
    intPage = parseInt(intPage) < 1 ? 1 : intPage;
    intPage = parseInt(intPage) > parseInt(intPageCount) ? intPageCount : intPage;
    return intPage;
    }
    /**
    *将分页表单的参数转给searchForm
    *
    *@param _form   表单对象
    *@param _intPage 当前页
    *@param _intPageCount  总页数
    */
    function gotoPage(_form, _intPage, _intPageCount){
    //格式化[当前页]
    _form.all.intPage.value = formatIntPage(_intPage, _intPageCount); var intPage = _form.all.intPage.value;
    var intPageSize = _form.all.intPageSize.value;
    var actionURL = _form.all.actionURL.value;
    var actionFormName = _form.all.actionFormName.value;

    //将分页表单的参数转给searchForm
    actionURL = (actionURL.indexOf("intPage=")==-1) ?  actionURL+"&intPage="+intPage : actionURL.replace(/intPage=\d+/, "intPage="+intPage);
    actionURL = (actionURL.indexOf("intPageSize=")==-1) ?  actionURL+"&intPageSize="+intPageSize : actionURL.replace(/intPageSize=\d+/, "intPageSize="+intPageSize);
    actionURL = (actionURL.indexOf("actionFormName=")==-1) ?  actionURL+"&actionFormName="+actionFormName : actionURL.replace(/actionFormName=\w+/, "actionFormName="+actionFormName);

    var searchForm = document.forms[actionFormName];//分页的表单
    searchForm.action = actionURL;
    //alert(searchForm.action);//试试这个网址
    searchForm.submit();
    }
    </script><!-- 水平线 -->
    <hr width="80%" align="left"/><%-- pageToolMap是request中保存的分页对象信息,
    换成map,这样变量名就变短了
    --%>
    <c:set var="map" value="${pageToolMap }"></c:set>
    共${map.intRowCount }条记录,当前${map.intPage }页 /${map.intPageCount }页 <%-- 
    分页表单.有以下四个关键参数可以提交
    intPage 当前页
    intPageSize 页大小
    actionURL 查询用的action的提交地址
    actionFormName 查询用的form的名称。 通常使用0,即页面中第一个form来提交查询和分页

    使用html:select或者html:text,可以重现上一次的参数
    以下脚本事件将此form的参数传递给actionFormName这个form,通常是页面上的document.forms[0]
    --%>
    <html:form action="${map.actionURL }" method="post" style="display:inline; margin-left:20px;">
    <!-- 分页表单提交地址 --><html:hidden property="actionURL" value="${map.actionURL}"/>
    <!-- 分页表单名称 --><html:hidden property="actionFormName" /> <br/>
    <a href="#" onclick="gotoPage(this.parentNode, 1, ${map.intPageCount })">首页</a>
    <a href="#" onclick="gotoPage(this.parentNode, ${map.intPage-1 }, ${map.intPageCount })">上一页</a>
    <a href="#" onclick="gotoPage(this.parentNode, ${map.intPage+1 }, ${map.intPageCount })">下一页</a>
    <a href="#" onclick="gotoPage(this.parentNode, ${map.intPageCount }, ${map.intPageCount })">末页</a> <%--不足500页,则显示下拉框--%>
    <c:if test="${map.intPageCount le 500}">
    跳到
    <html:select property="intPage" onchange="gotoPage(this.parentNode, this.options[this.selectedIndex].value, ${map.intPageCount })">
    <c:forEach begin="1" end="${map.intPageCount }" var="i">
    <html:option value="${i }">${i }</html:option>
    </c:forEach>
    </html:select>

    </c:if> <%--超过500页,则显示为输入框--%>
    <c:if test="${map.intPageCount gt 500}">
    跳到<html:text property="intPage" maxlength="4" size="1" style="text-align:right"/> 
    <input type="button" value="Go" onclick="gotoPage(this.parentNode, this.parentNode.all.intPage.value, ${map.intPageCount })" />
    </c:if>

    <%--自定义分页大小 --%>
    设置每页大小<html:text property="intPageSize" maxlength="4" size="1" style="text-align:right"/>
    <input type="button" value="Go" onclick="gotoPage(this.parentNode, this.parentNode.all.intPage.value, ${map.intPageCount })" />
    </html:form>
      

  2.   

    包使用的是standard.jar和jstl1.1.jar的
      

  3.   

    找不到xxx方法.?  - -!  大概看还没看出来.! 占个地方等下再看
      

  4.   

    <%@ page isELIgnored ="false"%> 
      

  5.   

    引入jstl的dtd不全,还有看是否相应的jar包