aspose file tools*
The moose likes Cattle Drive and the fly likes Okay, but...... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Okay, but......" Watch "Okay, but......" New topic
Author

Okay, but......

Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Even if I put the individual data from videos into an ArrayList and pass it to the jsp as an attribute, printing it out to the table cells in the jsp would still require iterating through the ArrayList using scriplets and expressions, would it not? Except it seems that the data is now just a long list of Strings instead of members of VideoData, which might be less clear. Is there a way to put all of the logic for populating the cells of the table in the servlet class and call this method from the jsp?
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Okay, I've had a few beers. Here's a thought, powered by Coors; what if I created the entire table in the servlet class, and passed that as an attribute to the jsp? But then I remember reading somewhere that a bunch of html in java code was coyote ugly..........or was it the other way round?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
It seems to me that a few <tr>'s and <td>'s in the servlet are better than scriplets in the jsp.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Should the solution involve use of EL? I am struggling with trying to put all of the logic involved with iterating through the ArrayList and printing the data in the appropriate cell of the table into the servlet class. If I write a method that has out.print() stuff in it for printing the table data, I don't know how to call the method from the JSP, and if I don't write a method that prints out the data to the table in the servlet class, I can't see how to avoid doing a for loop in the jsp to iterate through the table data. Obviously, there's something I'm not seeing here.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Originally posted by Carol Murphy:
Should the solution involve use of EL?


No.

What if you iterate through the loop in the servlet and create a String which you then forward to the jsp.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[MdQ]: No.

No of course not Carol - don't be silly. That would be too modern. Think 20th century technology. What year do you think this is, 2006? :roll: After all, the system must be maintainable if you're caught in a time vortex and thrown back to 1996.
[ May 24, 2006: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Originally posted by Marilyn de Queiroz:


What if you iterate through the loop in the servlet and create a String which you then forward to the jsp.


That String would be obscenely long, wouldn't it?
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Originally posted by Jim Yingst:
[MdQ]: No.

No of course not Carol - don't be silly. That would be too modern. Think 20th century technology. What year do you think this is, 2006? :roll: After all, the system must be maintainable if you're caught in a time vortex and thrown back to 1996.

[ May 24, 2006: Message edited by: Jim Yingst ]


Wait, it's not 1996? Then I'm sure I'm late for something!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Okay, but......