打开jsp页面报错
<jsp:includepage="/customer/EditCustCorporationInclude.jsp"flush="true"><jsp:paramnam...
<jsp:include page="/customer/EditCustCorporationInclude.jsp" flush="true">
<jsp:param name="custfromdetail" value=""/>
<jsp:param name="corporation" value=""/>
</jsp:include>
使用jsp:include来调用页面时,传了两个空字符串的参数,打开jsp页面报空指针错误,为什么?
java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:350)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1385)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:562)
at org.apache.jasper.compiler.Node$ParamAction.accept(Node.java:989)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2429)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:583)
at org.apache.jasper.compiler.Node$IncludeAction.accept(Node.java:1063)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2429)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2435)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1841)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) 展开
<jsp:param name="custfromdetail" value=""/>
<jsp:param name="corporation" value=""/>
</jsp:include>
使用jsp:include来调用页面时,传了两个空字符串的参数,打开jsp页面报空指针错误,为什么?
java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:350)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1385)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:562)
at org.apache.jasper.compiler.Node$ParamAction.accept(Node.java:989)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2429)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:583)
at org.apache.jasper.compiler.Node$IncludeAction.accept(Node.java:1063)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2429)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2435)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1841)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) 展开
3个回答
2015-12-12 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
因为jsp动态包含的页面中有空指针异常,检查包含页面的对象是否已经初始化了。
java.util.NoSuchElementException解决办法
猜测是某个interator出现了越界:
while (iter.hasNext()) {
JIRAFeature jirafeaturetemp = iter.next();
ArrayList<SprintUserStory> undoneUserStoriesList = SprintUtil.getUndoneUserStoriesList(jirafeaturetemp.getID(),jirafeaturetemp.getPkey());
if(undoneUserStoriesList.size() >0){
willdonefeautre--;
}
java.util.NoSuchElementException解决办法
猜测是某个interator出现了越界:
while (iter.hasNext()) {
JIRAFeature jirafeaturetemp = iter.next();
ArrayList<SprintUserStory> undoneUserStoriesList = SprintUtil.getUndoneUserStoriesList(jirafeaturetemp.getID(),jirafeaturetemp.getPkey());
if(undoneUserStoriesList.size() >0){
willdonefeautre--;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
迭代器错误
应该是你多用了一次 next() 方法造成的
应该是你多用了一次 next() 方法造成的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询