473,383 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to display a list of images according to rows and columns

Hi all,
Eg: I have a list which contains 4 images (this list is got from database), I want to display them in 2 columns (1 image/col and only 2 columns/row):
Img1 | Img2
Img3 | Img4

And if I have more 4 images they are displayed follow:
Img1 | Img2
Img3 | Img4
img5 ...
Pls help me.
Thanks in advance,

Ha
Sep 8 '09 #1
6 3164
r035198x
13,262 8TB
What have you done so far?
Sep 8 '09 #2
Sorry r035198x,
I dont get you. What do you mean?
That is a requirement i received. they require me create a page that displays a list of images on only 2 columns and unlimited rows.
We use <data:iterator ...> and <data:data ...> tags to list data from component java file to jsp file.
Now I have got data from database already but i dont know how to list the images as newspaper columns.
Pls help me.
Sep 8 '09 #3
r035198x
13,262 8TB
What attempts have you already made at displaying the images and at what specific point are you stuck?
Also state the technologies you are using in your application.
Sep 8 '09 #4
@r035198x
Now I got the data (images name) from database and set them to a dataContext. we saved images in a folder inside of the project.
The problem is how to display that images on the .jsp page according to rows with 2 or 3 columns/row.
Eg: display 3 images / row.
I tryed in alot of ways but not correctly.we use the servlet technology for the project.(if did i understand your mean?)
Pls help me.

Ha
Sep 9 '09 #5
r035198x
13,262 8TB
One approach is to use tables in your JSP with the appropriate number of rows and columns. In each <td> you'd then put and <img> tag whose src attribute points to an image serving servlet passing the row/column numbers to let it know which image to display.
Something like
Expand|Select|Wrap|Line Numbers
  1. <img src="/ImageServlet?location=1:3" />
Sep 9 '09 #6
Thanks so much r035198x, I will try now.

Ha
Sep 10 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
13
by: moondaddy | last post by:
Happy Holidays All! I want to load a datagrid with images and text (Image, text, image, text, etc...). The data for this datagrid will be coming from sql server and the images are stored as files...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
1
by: Justin | last post by:
Hi all, I have a bunch of drop-down lists that should each display an item (from a SQL Server lookup table) based on another piece of data from a separate table. For example; If Not...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
2
by: Randy | last post by:
Hi, I have a small table - 2 columns, 5 rows. Col 1 is the key column and has integer values of 1 through 5. Column 2 is a varbinary(MAX) column and has jpg images loaded in it. What I want...
0
parshupooja
by: parshupooja | last post by:
Contact Reply 1 point Member propoo Joined on 08-31-2007, 10:32 PM Posts 3 Hey all ,
14
anfetienne
by: anfetienne | last post by:
Hi, i went through a tutorial on how to display images stored with a directory and it came out good but i have a problem.....when i upload less than 5 files it displays the 1 image and then shows...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.