如何去除jsp页面报错 Syntax error, insert to complete MethodBody
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何去除jsp页面报错 Syntax error, insert to complete MethodBody相关的知识,希望对你有一定的参考价值。
代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%-- 分页信息 --%>
<div id=PageSelectorBar>
<div id=PageSelectorMemo>
Page: $currentPage/$pageCount
Per page: $pageSize posts
Total records: $recordCount
</div>
<div id=PageSelectorSelectorArea>
<a href="javascript: gotoPage(1)" title="Front" style="cursor: hand;">
<img src="$pageContext.request.contextPath/style/blue/images/pageSelector/firstPage.png"/>
</a>
<%-- 页码列表 --%>
<s:iterator begin="%beginPageIndex" end="%endPageIndex" var="num">
<s:if test=" #num != currentPage "><%-- 非当前页,有链接 --%>
<span class="PageSelectorNum" style="cursor: hand;" onClick="gotoPage($num);">$num </span>
</s:if>
<s:else><%-- 当前页,没有链接 --%>
<span class="PageSelectorNum PageSelectorSelected">$num</span>
</s:else>
</s:iterator>
<a href="javascript: gotoPage($pageCount)" title="End" style="cursor: hand;">
<img src="$pageContext.request.contextPath/style/blue/images/pageSelector/lastPage.png"/>
</a>
Turn to page:
<select id="pn" onchange="gotoPage( this.value )">
<s:iterator begin="1" end="%pageCount" var="num">
<option value="$num">$num</option>
</s:iterator>
</select>
<%-- 让select默认选中当前页 --%>
<script type="text/javascript">
$("#pn").val( "$currentPage" );
</script>
</div>
</div>
<script type="text/javascript">
/**
* 转到指定的页码
* @param Object pageNum
*/
function gotoPage(pageNum)
window.location.href = "forum_show.do?id=$id&pageNum=" + pageNum ;
</script>
PS:页面能正常运行,当把递归代码段去掉错误消息就去除了。。
以上是关于如何去除jsp页面报错 Syntax error, insert to complete MethodBody的主要内容,如果未能解决你的问题,请参考以下文章
jsp页面第一句话报这个错Syntax error, insert "}" to complete
MySQL sql 报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQ
laravel --报错:Parse error: syntax error, unexpected '}', expecting ';'
Keil C51编译报错error C141: syntax error
执行shell脚本报错:syntax error near unexpected token `或syntax error: unexpected end of file