This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

logic:iterate double spacing??  RSS feed

 
Jon Ream
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks. Having a problem with the struts logic:iterate tag that's really stumping me. I'm not sure if it's the struts tag, or just an oddity of HTML, but here goes. I have an array of strings (type ArrayList) that I would like to display with whitespace preserved. When looping through the array, the following code:

generates html like the following:

which ends up showing as double spaced in the browser.
Removing the <pre> tags results in single spacing, but then i lose all the whitespace.
Anyone have any ideas??
Thanks in advance.
 
Jon Ream
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm... lost my "double spacing" in the post.... anyhow, the second code sample should have looked like (without the dots)....

thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!