aspose file tools
The moose likes JSP and the fly likes Showing products in grid Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Showing products in grid" Watch "Showing products in grid" New topic
Author

Showing products in grid

nilu chan
Greenhorn

Joined: Aug 31, 2010
Posts: 15
I have a JSP page where I am showing all the products that fall under a specific category. The problem is that all of them either end up showing either vertically or horizontally based on whether I loop my "td" or "tr". I want to show them in grid where 3 products are in row 1, another 3 in row 2 and so on. Any idea on how this can be achieved?


ProductController.java


products.jsp
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

First, decide what the HTML needs to look like before writing the JSP. The purpose of the JSP is to create the HTML that will be sent to the page. So get your target HTML figured out, and then write the JSP to create it.

Second, stop using Java scriptlets in a JSP. Scriptlets are obsolete and discredited. Using them makes you look like a slacker. Please read this JspFaq entry.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Showing products in grid
 
Similar Threads
Unable to find specific product
HTML does not print properly - table width exceeding 100%?
Problems when viewing specific description when search
resultset is not working properly
Number Format Exception