Adamylo
asked on
code for logo placement on website
I have website that displays thousands of products.
The site is written in .jsp and I would like a code implemented so that each time a product is displayed the manufacturers logo would appear.
For expample if a Toshbia product is selected then i would like a toshiba logo to display with it.
http://www.ota.com.au/catalogue/details.jsp?productID=5606&tier4=16875&tier3=16870&tier2=16949&tier1=16944&type=vendor
Thanks
The site is written in .jsp and I would like a code implemented so that each time a product is displayed the manufacturers logo would appear.
For expample if a Toshbia product is selected then i would like a toshiba logo to display with it.
http://www.ota.com.au/catalogue/details.jsp?productID=5606&tier4=16875&tier3=16870&tier2=16949&tier1=16944&type=vendor
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think it would be better to store the image on the disk and store the path to the image in the database. By doing this you wouldn't have to store all the binary data in the database and it would be faster to read it from the disk anyway.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Although, on second though, you probvably won't need it since the browser can read the images from disk traight away.
>>Yes, the image can be stored in the DB or a link to the image can be stored in the DB (in the same table which stores master info about the product)
Please correct me if I'm wrong. I think the link to the logo image should be stored in the manufacturer table which is different from the product table. Because there is a one to many relationship between manufacturer and product, and "logo" is an attribute of manufacturer not product (as in the question of Adamylo).
Please correct me if I'm wrong. I think the link to the logo image should be stored in the manufacturer table which is different from the product table. Because there is a one to many relationship between manufacturer and product, and "logo" is an attribute of manufacturer not product (as in the question of Adamylo).
It depends upon what image has to be displayed. If its the manufacturer logo - yes it should be stored with the manufacturer master info. If its an image for the product (like a different image for Toshiba laptop version xyz and Toshiba laptop version abc) then it should be with the product.
>> I think it would be better to store the image on the disk
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
>> I think it would be better to store the image on the disk
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
>> I think it would be better to store the image on the disk
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
Not on the client side, right? Otherwise it will be expected that all clients have a copy of the images, and moreover they need not even have Java. Its easier to host the images in the web-server within the context-root of the application and just give a link to it (like we do for normal images in a JSP application), so that the browser can directly download it.
Sorry for multiple posts - I got Page cannot be displayed and had to refresh :-(
>> I think it would be better to store the image on the disk
>
>Not on the client side, right?
No, on the server, probably somewhere in the web app tree (if the images are only related to web application).
>
>Not on the client side, right?
No, on the server, probably somewhere in the web app tree (if the images are only related to web application).