• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how check javabean giving to other component correct data

 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in what file type, you mean?
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to our JSP forum.
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
import javax.naming.*;
in ClaimDAO.java needs include any in classbath ? during compile/run...
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic