• Register
0 votes
766 views

Problem :

I am trying to display Data from DB.But facing error as follows

the server encountered an unexpected condition that prevented it from fulfilling the request.
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Please note that you can not iterate over prdt object which you are using forEach tag as prdt is not a List object, so to solve your issue just remove <c:forEach var="x" items="${prdt}"> 

Your your updated JSP looks as below

<table>
<img src="resources/Images/${x.id}.png"/>
<td>
<c:out value="${prdt.product_Name}"/></td>
<td>
<c:out value="${prdt.descripction}"/></td>
<td>
<c:out value="${prdt.price}"/></td>
<td>
<c:out value="${prdt.mfg_Date}"/>
</td>
</table>
9 7 4
38,600 points

Related questions

0 votes
1 answer 139 views
139 views
Problem : I am trying to run my registration jsp page with the servlet. But it is throwing following error: The server encountered an internal error that prevented it from fulfilling this request. java.lang.NullPointerException com.java.task11.utils.ValidateUtil.EmailVal( ... .tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:62) I am unable to figure out why this is happening? Any clues?
asked Dec 2, 2019 alecxe 7.5k points
0 votes
1 answer 348 views
348 views
Problem : I have just signed up for the Google Analytics for the website recently. It was working pretty fine until today. But, after some time, it is showing up below error: Internal error. Please try again later.Analytics has encountered an unexpected condition and cannot ... am not sure what this error is and how to fix it. Can someone tell me the solution on the above mentioned error message?
asked Dec 19, 2019 alecxe 7.5k points
0 votes
2 answers 263 views
263 views
Problem : I am facing bellow error java.sql.sqlrecoverableexception no more data to read from socket
asked Nov 5, 2019 peterlaw 6.9k points
0 votes
1 answer 2.8K views
2.8K views
Problem : I am getting bellow error while using hibernate JPA with spring and mongodb and running my application on Glassfish-4.0. javax.persistence.transactionrequiredexception: executing an update/delete query
asked Oct 19, 2019 peterlaw 6.9k points
1 vote
1 answer 1.7K views
1.7K views
Problem : I am beginner to spring + hibernate. Recently I have created the application with the use of spring + hibernate but I always face below error. I am trying to work on it for the very first time. Below is the error for your ... ) at coreservlets.StudentDAOImpl.create(StudentDAOImpl.java:19) at coreservlets.MainApp.main(MainApp.java:14) Can somebody help me in overcoming above error?
asked Mar 28, 2020 morrisBson 3.2k points
0 votes
2 answers 563 views
563 views
Problem : I am new to the Spring and JPA, wasted 10 days and no result with the searching on internet. I want to save the object to SQL SERVER, my connection is correct but when I write .flush() I get below exception &ldquo;nested exception is javax.persistence.TransactionRequiredException: no transaction is in progress&rdquo;
asked Jan 21, 2020 jwilliam 3.9k points
1 vote
1 answer 2.7K views
2.7K views
Problem : When I try to compile my spring project, I always face the below error : Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed I have the ... >1.4.1.RELEASE</version> <relativePath /> <!-- lookup parent from repository --> </parent> . . .
asked Dec 12, 2019 alecxe 7.5k points
0 votes
1 answer 4.4K views
4.4K views
Problem : After executing spring boot with h2 database and JPA i am facing below error org.hibernate.tool.schema.spi.commandacceptanceexception: error executing ddl via jdbc statement
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 296 views
296 views
Problem : I am new to Spring and JPA I want to save object to SQL SERVER, connection is correct but when I write .flush() I get the exception as below javax.persistence.TransactionRequiredException: no transaction is in progress
asked Oct 22, 2019 peterlaw 6.9k points
0 votes
1 answer 227 views
227 views
Problem : I am stuck with following strange looking Hibernate error batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
asked Nov 16, 2019 peterlaw 6.9k points