This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!

alex.j romano

Greenhorn
+ Follow
since Oct 19, 2011
alex.j likes ...
Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by alex.j romano

Did some reading. Nice articles.

Java code in JSPs has been discredited since the introduction of JSP 2 in 2002


Oh well. Better late then never, right?

In this same page? You realize that the Java code in the page is executed before the page is displayed, right?


I did realize. Planned to solve it by checking if it's null or not.

Found some promising jstl examples (Which means this post should be moved to JSP forum... )
But in case I want to leave the sql select in a servlet and not in the jsp: (see example)


How should I retrieve the info and use it as part of the tag?


Best Regards,

Alex
6 years ago
JSP
Thank's Bear.

As for your questions:
1. I started using servlets and jsp on my own, not a while ago. Must admit that I'm not familiar with JSTL and EL. I'll look it up.

2. Alright. Although my problem is more with the javascript involved...

3. My design for the page, is to allow the manager to enter a user name into the input field, search for all possible matches in the database and then, add rows to the table according to the number of matches found, each with his own details.
Are you suggesting to create the whole table in the servlet ?

Alex
6 years ago
JSP
Hi All,

First time on the forum, nice to meet ya.

I've encountered a problem when trying to dynamically add rows to a table and populating them with data taken from a database. I retrieved a list of objects from the database where each object represents a row, a row that I try to add into the table. Now, I know how to add a row using jquery $('#usersTable').append('<tr>..</tr>') and that works fine.

My question is how I can insert the data from the value-object into the script?
I added in the example what I tried to do, but the browser simple becomes unresponsive and tells me I need to shut down the script. It happened (browser freezing) when I tried it on firefox, explorer and chrome.

Any ideas?

Thanks in advance,

Alex.

I shrunk down the example to include only one field.
6 years ago
JSP