• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing DB values inside table tag in JSP

 
ashwin bala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • 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.
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • 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.
 
Dave Tolls
Ranch Hand
Posts: 2284
25
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!