File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how check javabean giving to other component correct data

 
Leonidas Savvides
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Leonidas Savvides
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in what file type, you mean?
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our JSP forum.
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import javax.naming.*;
in ClaimDAO.java needs include any in classbath ? during compile/run...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic