This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Display output in table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Display output in table" Watch "Display output in table" New topic

Display output in table

Nitin Belaram
Ranch Hand

Joined: Mar 24, 2009
Posts: 67
I had a servlet in which i am setting value in request.setAttribute("AttributeUser", users );

I want to display request.setAttribute(AttributeUser, users ) values in a html table .

please suggest How can i do this.

Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

Are you expecting a complete solution. I don't think you'll get that here . I can give you some idea though.

Since I don't know the structure of New_USER class, I'm assuming it would be something like this

Now in your JSP, you need to iterate over the List using the forEach tag. You can see an example here. Just iterate over the List and display the properties of New_USER class using table tags in the loop...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: Display output in table
Similar Threads
update record for selection of id
not getting value in doget method of servlet
display the log/output in JSP or HTML page
value from servlet to dropdown in jsp
Value in dropdown from servlet