NEW CONF: i made some change to match with what you are saying. now i deleted hibernate-cfg.xml and did all conf in spring-servlet.xml :
<jee:jndi-lookup id="ReferentielWebDevDataSource"
jndi-name="ReferentielWebDevDataSource" />
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="ReferentielWebDevDataSource" />
<property name="transaction.factory_class">
<value>org.hibernate.transaction.JDBCTransactionFactory</value>
</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">
<value>org.hibernate.cache.NoCacheProvider</value>
</property>
<property name="hibernate.show_sql">
<value>true</value>
</property>
<property name="dialect">
<value>${jdbc.dialect}</value>
</property>
<property name="connection.driver_class">
<value>${jdbc.driverClassName}</value>
</property>
<property name="connection.url">
<value>${jdbc.databaseurl}</value>
</property>
<property name="connection.username">
<value>${jdbc.username}</value>
</property>
<property name="connection.password">
<value>${jdbc.password}</value>
</property>
<property name="current_session_context_class">
<value>thread</value>
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager" …Run Code Online (Sandbox Code Playgroud) 我尝试做一些简单的事情,但它没有用.我会错过一些明显的东西吗
我的jsp:
<c:if test="${not empty listeApp}">
<table border = "1">
<c:forEach var="apps" items="${listeApp}" >
<tr>
<td>${apps.ID_APPLICATION}</td>
<td>${apps.ID_APPLICATION}</td>
</tr>
</c:forEach>
</table>
Run Code Online (Sandbox Code Playgroud)
我的控制器:
public ModelAndView portail() {
applicationDao appDAO = new applicationJPADaoImpl();
return new ModelAndView("portail", "listeApp", appDAO.listeAll());
}
Run Code Online (Sandbox Code Playgroud)
没有显示任何内容.
${listeApp[0].ID_APPLICATION} 作品.
我的清单很好,我在没有任何问题的情况下将它打印在sysout中.我可以获得长度,${fn:length(listeApp)}但我想使用Foreach功能:)
有什么建议?谢谢