• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Printing DB values inside table tag in JSP

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

In the below JSP code, on the dropdown value change event, I am fetching values from the database and displaying inside table tag.I am doing it scriplets code.
I request you to check the code once as it is not printing the database values.


In the above code, the second table was displaying values.I have issue only with the first table tag code.Request your help in this.
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. What is printed in console in first for loop?
2. What is printed in console in second for loop?
3. Request.getAttribute(String val) should not be used in case of Ajax call.


Scriplets are discredited since some 15 years. Avoid them.
Use JQuery and JSON for ajax calls, it will make your life way too simple.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Along with the points raised by Tapas, what is the HTML returned by the Ajax call?
What resource on the server is that call going to?
What is the code for that?

Also, what is the HTML produced on the browser by that JSP, specifically for that table that is having a problem?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic