English 中文(简体)
A. 通过J.R. 显示一名ArrayList在J.P.上通过J.R.R.
原标题:Displaying an ArrayList on a JSP Page via JSTL
  • 时间:2011-03-22 21:36:08
  •  标签:
  • java
  • jsp
  • jstl

谁能帮助我看一看我谁错了? 我有一个交还一名阿雷拉派教徒的方法的班子,我无法在我的联合新闻方案网页上展示。 我的守则如下:

//java class
public class Confirmation {
ArrayList<Criterion> criterion = null;
ArrayList<String> criterionTitles = null;
EvaluationDefinition eval = null;

public ArrayList<String> getCriterionTitles() {
    criterion = new ArrayList<Criterion>();
    criterionTitles = new ArrayList<String>();

    for(int i = 0; i < eval.getGroups().get(0).getCriterionCount(); i++ )
    {
       criterion.add(eval.getGroups().get(0).getCriterion().get(i));
       criterionTitles.add(i, criterion.get(i).getTitle());
    }
    return criterionTitles;
}  
}
//jsp page code...
<jsp:useBean id="criterionTitles" scope="page" class="Confirmation" />
// ERROR MSG HERE: Error reading  criterionTitles  on type Confirmation
<c:forEach var="title" items="${criterionTitles.criterionTitles}">
 <c:out value="${title}" />
</c:forEach>

如果我用手提并略出印本,就把标题印成一册。 就在我跑的时候,我就错了。 谢谢。

最佳回答

过读标准 类型确认的标题

Calling getCriterionTitles() has thrown an exception. My bet on an NullPointerException because eval is null. Read the server logs for the full stacktrace, trackback the root cause in the code and fix it accordingly.


与具体问题无关,将课堂列入违约一揽子计划是坏的。 它只会在专门的服务器/卫星定位仪组合方面开展工作,但并非全部。 在包件中的普通 Java类中,不可能<编码> 进口。 从缺省一揽子计划入课。 一些维护者为此建立了工作圈,以便成为“无害的”。 但是,你不能依靠这一点。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签