| Author |
how check javabean giving to other component correct data
|
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
textbook example 12-3(david pasons java/xml) - DAO / DB-POOL / TOMCAT
At localhost
http://localhost:8080/jspadv/webhomecover/listclaims.jsp
I do NOT know, how debug? In debug a javabean, how check it is giving to other component CORRECT data?
The below means not find data ...? in db? may where clause faults?
|
 |
Nicola Garofalo
Ranch Hand
Joined: Apr 10, 2010
Posts: 308
|
|
What is claimCollection.claims?
Is claims a list inside claimCollection?
Is it possible to have a look at how com.webhomecover.beans.ClaimCollection is made?
Last thing: you don't need to write line 26 if you use jstl.
|
Bye,
Nicola
|
 |
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
claims is a list of claim.
String x=new String(); provides empty string or needed inside parenthesis "" (doublequotes)?
is it faults where clause?
|
 |
Nicola Garofalo
Ranch Hand
Joined: Apr 10, 2010
Posts: 308
|
|
The constructor String() is ok.
Well, did you set in your servlet/action a request or session attribute with name claimCollection and with value a ClaimCollection object ?
|
 |
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
|
in what file type, you mean?
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
|
Moving to our JSP forum.
|
OCUP UML fundamental
ITIL foundation
|
 |
Nicola Garofalo
Ranch Hand
Joined: Apr 10, 2010
Posts: 308
|
|
Try this:
in your servlet set your collection as attribute to your request, with the following line.
and in your jsp you change the items on your forEach loop in this way:
Remember to delete line 26 in the jsp you posted.
|
 |
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
|
I will test code tomorrow, but since, this is a textbook example inside the text, must be correct, any tip about this for the code(additional)?
|
 |
Nicola Garofalo
Ranch Hand
Joined: Apr 10, 2010
Posts: 308
|
|
It seems it's not, Leonidas, or you wouldn't have posted a question...
Check the solution i proposed to you, if you want, and see what happens.
If it won't work the problem is elsewhere, but we made a step further
|
 |
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
you may find the complete app I refer at
http://www.cengage.co.uk/parsons/students/examples_exer.htm
Examples:Chapter 12: 12-3 folder [database in 12-1]
I am currently debugging...
|
 |
Leonidas Savvides
Ranch Hand
Joined: Jan 31, 2010
Posts: 397
|
|
import javax.naming.*;
in ClaimDAO.java needs include any in classbath ? during compile/run...
|
 |
 |
|
|
subject: how check javabean giving to other component correct data
|
|
|