Advice needed - Storing images

Hello all,
I'm developing e-commerce application, and I have dilema where to store product photographs.
When I started learning struts and servlets/jsp, I stored photographs as BLOB in MySQL database, and hadnt any problems to do it this way.
For administrator purposes, I created admin interface. Administrator was able to insert new products into database, and in that case inserting product photos was implemented using form file, uploading photos directly from his local computer as BLOB object.
On the other hand, this system will probably damage the performance of web appliacation, so the idea I like more at the moment is using hypelinks.
My problem with hypelinks is - where to store photos? Photographs probably have to be stored somewhere on server, but in that case I would have to give some privilegies to administrator of web site and to allow him to access the server, and I dont want to do that.
Am I missing something here?
Thanks in advance,
Djordje

Thanks for your response.
I don't think it has anything to do with '/' or '\' though.
My directories structure is following:
Web Pages
- META-INF
- WEB-INF
- images - this is the destination I would like to store my images
- etc, etc
In my NetBeans project I have following folders:
'build', 'conf', 'dist', 'nbproject', 'src', 'test' and 'web',
and after execution of my upload action, images are stored in 'build' folders, which has following structure:
-build
--web
---META-INF
---WEB-INF
---images
---etc, etc
Obviously I would like to store them in my 'web' folder, but just cant get there.
I hope this clears the picture about my problem bit more.

Similar Messages

  • Advice needed on website

    Hi there.
    I have been asked to produce a website and there are a few areas that I'm wondering how I can do so I just thought I would post and see if anyone on here could possibly give me some advice. 
    The website will contain a search facility that will allow the user to search on a number of different locations across the county, by the postcode. 
    I'm not sure how to do this really. 
    Basically, there needs to be an individual page for each location and on it, they will have the name of the place, the address including postcode, an image and a few paragraphs with a description. 
    Could this all be stored in a database do you think? (I’ve never stored images in a database). 
    If so... how do I store images.
    And, when the text is in paragraphs, I presume it will all be in one field in the database, so how would it be formatted properly on the website. 
    Finally, how can I do a postcode search, that will return the locations that are ‘near’ to the postcode entered. 
    If anyone has got any advice, or can point me to a good tutorial, I would really appreciate it. 
    Thanks so much, 
    Craig

    Answering in reverse order...
    You would have to look at any major retailer's site .... They all ask for a zip code and a a radius and they will show all of the stores. I am sure there are tables somewhere that relate postal codes with one another. I have never needed them, so I can offer no further guidance. Google something like zip code proximity table, any you might find something. As I said, I don't think it's a trivial operation.
    If your database record contains one entry per zip, then you use that zip as your index and you get one record returned. When you display that record you would show the text and the image, etc for that zip. If you have multiple stores per zip, then you would return multiple records and for each one you would show that info. All would be done on one page, whether one or many records.
    Look at DW Master/Destail pages.
    It would be a little more complicated to have the child page just return the list of locations and that list could have links to the individual detail pages. This would create unnecessary pages in those cases where there was only a single entry and that could be annoying to people who wanted to go straight to the results.
    To get Google to go directly to the individual pages would be difficult. You could manually create separate pages but the maintenance overhead would, I think, be astronomical. A well-designed master page with mention of states or areas could go a long way to getting attention.
    Hope this answers your questions.
    Barry

  • Lenovo Z710 - Major Performanc​e Problems - Expert Advice Needed

    Three months ago I bought Lenovo Z710 laptop.
    Here are some system properties:
    Intel Core i7 4700MQ CPU @ 2.40 GHz,
    8GB RAM
    Hybrid 1TB + SSHD(8G),
    NVIDIA GeForce GT 740M / 2 GB,
    DVD-R,
    Win 8.1
    After using the device for 3 months I can't describe with words how dissapointed I am.
    It is unbelievably slow. The device with this configuration should do very easily hard things.
    However, I have troubles doning even simple things. 
    For example, currently I am only browsing web and listening music from youtube.
    Opening a new web page in Chrome takes 30-40 seconds. Opening a new tab takes aprox. 10 seconds.
    Selecting a text and copying it, takes 15 seconds. It is even very frustrating to type even a web address because of the obvious delay in typing. Furthermore, when I listen to music there is also a delay - that makes even listening to music unbelievably frustrating. Just to mention one more time - I only have chrome running!
    I have 2 Partitions - C disk (442 GB) and disk D (488 GB).
    On disk C I installed Win 8.1. and at the moment on disk C 391 GB are free.
    I use disk D is mostly intended for storing images, movies, and music. On this disk 258 GB are free.
    Regarding the programs I installed on top of Windows, here is the list: micro Torrent, Adobe Photoshop, Android SDK Tools, Android studio, Avast Internet Security, Brackets, Corona SDK, Dropbox, Foxit Cloud, Foxit Reader, Chrome, Greenshot, MS Office, Mozilla, Skype, Notepad, VLC Player, WinRAR, XAMPP.
    When I open Task Manager I see that used CPU resources are aprox. 10%, Memory aprox 35%, Disk 2%, Network 5%.
    I am the only user of the device.
    In Task manager I read that only Chrome takes the most of the resources taking 130 MB memory.
    So why is the device with 4 physical i7 Intel processory and 8 GB SSD so slow, that I can't even type without disturbance with delays?
    I don't understand how the device with mentioned hardware can be so slow.
    And regarding the software, I don't understand whtat could slow the device - I mentiond what programs were installed and to what extent are resorurces being used.
    Please give me your advice on what else can I check and what shoudl I do.

    Can you run a system health check once and see if anything is flagged? To do so,
    1. Press the + R keys to open the Run dialog, type perfmon, and click/tap on OK.
    2. If prompted by UAC, click/tap on Yes.
    3. In the left pane of Performance Monitor, click/tap on Data Collector Sets to expand it, click/tap on System to expand it, right click on System Diagnostics, and click on Start. (see screenshot below)
    4. It will collect data for 60 seconds before the system diagnostics report will be ready to view instep 3 of OPTION TWO below.
    More information here 
    http://www.eightforums.com/tutorials/52013-system-​health-report-generate-view-windows-8-1-a.html
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo

  • Displaying server stored images in an air application

    Usually when I go about displaying server stored images in a regular flex application I go about it the following way:-
    - Create a mysql database table on a server which contains image names
    - Create a php file which generates all of the image namesfrom the table as xml and upload this file to the server
    - Create a new flex application/project
    - In the application make a http service which points to my php/xml file and turns this data into an array collection
    - Set the array collection to the dataprovider of a tilelist component so that all of the images will eventually be displayed within it when they are created
    - I set the itemrenderer of the tilelist to an image component which has it's source set to something like source="{'assets/images'+ data.imagename}" with imagename being the field containing the name of the image which is stored in the mysql database table.
    - Make a folder in the app/project called assets/images which will contain all of the images
    - Upload the app to the server and once it runs all the images will be displayed in the application
    - Then any images that are uploaded to the server can also be displayed as long as their names are added to the mysql database
    My question is though how do you get server stored images to display within an Air Application? My air app will be used on multiple machines but I want the images in it to be dynamic i.e. stored on a server and can be changed. How can this be done?

    I'm struggling to figure out how to access the image files when the assets/images folder will be on a server and the app itself will be on the user's desktop whereas usually in the case of a regular flex app this wouldn't mater as both the app and the image files would be on the server together. Is what I'm trying to do possible i.e. displaying images on a desktop air app straight from a server?

  • How to read the stored images

    hi
    i have images in my table img,
    i want to know how toretreive that stored image

    i have images in my table img
    > i want to know how toretreive that stored image
    How to retrieve it depends on how it is stored? What is the data type? Is it perhaps a blob (large object in binary format)? If so check out the package dbms_lob and read Application Developer's Guide - Large Objects. If not connect to your database using sql plus to publish the data type for the image column from the command "describe img".

  • HT201269 ibook stopped transferring images via image capture. last month it worked. i hav an old ibook and i cannot update to newest itunes. which is fine. however, i need the image capture to take photos off my iphone 5. no, i dont want to use i cloud.

    ibook stopped transferring images via image capture. last month it worked. i hav an old ibook and i cannot update to newest itunes. which is fine. however, i need the image capture to take photos off my iphone 5. no, i dont want to use i cloud. i would actually like to just plug it in to the usb drive the old fashioned way

    I don't believe the iOS7 update was the cause for your issue. I have three devices all updated and they all show the Import To drop menu in Image Capture as shown below.

  • Blob Problem (storing Images)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    I think that both your SQL is wrong and your intended use is wrong. According to the SQL reference, the following seems to be a simplified definition that seems to match what you're trying to do. UPDATE <table> SET <column> = <expr>. So PROPERTIES should be a <table> of some kind and X should be a <column> of that table. This changes your PreparedStatement to *"UPDATE PROPERTIES SET X = ? WHERE NAME = ?"* Then you can do ps.setBlob(1, b) and ps.setString(2, ...). Because your statement is DML you must do ps.executeUpdate(). So your code might look something like this.
    Blob b = ...;
    String x = ...;
    ps = c.prepareStatement("UPDATE PROPERTIES SET X = ? WHERE NAME = ?");
    ps.setBlob(1, b);
    ps.setString(2, x);
    int i = ps.executeUpdate();
    The executeUpdate() returns the row count (i.e. number of rows) of your DML statement. Try that and see if it helps.

  • I have an image of 12" width X 18" length, But i need a image size of 12 X 15 inches , how should i

    I have an image of 12" width X 18" length, But i need a image size of 12 X 15 inches , how should i resize with image elongating.?? Please help.

    What version of Acrobat are you using?
    While you can do some limited editing in Acrobat, PDF is considered a final format, and is not designed for general editing. It is best to do the editing in the application which created the PDF file.

  • Advice needed on buying iphone as gift

    I went to apple store, they do not want to sell iphone to me unless I sign AT&T 2 years plan. I thought AT&T has locked the phone and users must subscribe in order to use it. Why Apple store still not allow me to buy?
    Please advice, if I want to buy online iphone for my brother, do I or my brother have obligation to sign out AT&T plan?
    One more advice needed, I found the shipment takes weeks, do I have option to arrange for self-collection?
    My brother birthday is coming soon, I need above advice urgently.
    Thank you very much

    Tamara wrote:
    I'm guessing English is not your first language. It's possible that you misunderstood them. Apple Store employees won't refuse to sell you an iPhone and you don't have to sign up for service in the store.
    Well that's not entirely true.
    Apple Stores have been instructed not to sell you an iPhone if any of the following is true:
    • You state that you will not be signing up with AT&T.
    • You do not have an ID from a US state, also indicating you will not be activating with AT&T
    • You do not have a credit card
    For example, I've seen US Apple Store managers refuse to sell iPhones to European residents because of the AT&T lock-in.

  • Which is better datatype for storing Images in 11gr2 Database ?

    Can anyone tell me which datatype should be maintained for storing images in database in terms of
    1. Space
    2. Speed.
    And, Is there another way for storing images instead of database ?
    Thanks/Regards in advacne.

    982164 wrote:
    Which one have better speed, database system or file system ?Database is better all around. It is not just a question of speed. It is a question of storage, security, flexibility, scalability, robustness and so on.
    If you use ASM and raw devices from a storage array or SAN, how do you get o/s files onto that? (requires a file system on the SAN/array LUNs)
    If it is inside the database, database security, concurrency and consistency apply to the image. Outside the database? How do you control who has access? Prevent someone with slippery fingers from accidentally deleting/renaming/moving images files? How do you backup up the image data with the image attribute data in the database?
    Having all this inside the database, part of the database, managed by the database, provides you with more flexibility, robustness, and security. After all a RDBMS is a data management system - it is designed for managing data. And that includes managing binary data.
    As for speed. Reading a 24MB image is reading 24MB worth of data. Whether that data is read by process A from disk1, or process B from disk2 - the amount of data is the same. So if you want faster I/O, then use faster disks. If disk1 is faster, process A will perform better reading the image than process B. If disk2 is faster, the roles are reversed.
    So I/O speed is not a direct function of process A or process B. It is a direct function of the I/O storage and fabric layer. Yes, a process's method of I/O can make a difference (e.g. using block reads not aligned with the physical blocks on disk). But this is more a configuration issue than process doing badly designed I/O calls.
    So the speed question is a bit loaded as it has more to do with the architecture and design of the I/O system - and less to do with the process doing that I/O. You can have a highly optimised I/O process doing poorly using an old and slow I/O layer, and poorly written I/O process doing pretty well on a SSD I/O layer.
    Databases like Oracle is designed for dealing with data - and thus effectively dealing with I/O. Lots of it. For lots of data. So I/O process design is not a consideration. The database processes will use the I/O layer as optimally as possible and as configured.

  • Storing image to rms as bytes

    hi, here imtrying to save image into rms and load the same from rms but i couldnt able to display the code
    size of byte im getting is 1
    import javax.microedition.rms.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.lcdui.*;
    import java.io.*;
    public class RMSImage extends MIDlet
    {Form frm=null;
      private Display display;
    RecordStore rs;
    public RMSImage(){
                        rs=null;
                        //      InputStream is=null;
                        display = Display.getDisplay(this);
    frm = new Form("Imageshow");
    public void startApp(){
    try{
              rs=RecordStore.openRecordStore("imagefile",true);
              System.out.println("record store created");
         catch(RecordStoreException r){r.printStackTrace();}
    save();
         display.setCurrent(frm);
    public void save(){
    // System.out.println(imgdata);
    try{
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    byte data[]= null;
              try{
                        System.out.println("hi");
                   DataInputStream dis = new DataInputStream(this.getClass().getResourceAsStream("/Duke.png"));
         System.out.println("check for image length");
         /* for(int j=0;j<3524;j++){ System.out.println("loop entering");data[j] = dis.readByte();System.out.println(data.length);
              System.out.println("datalength"+data.length);
              for (int i = 0; i < data.length; i++)
              dos.writeByte(dis.readByte());
              catch(Exception e){System.out.println(e);}
    //System.out.println(imgdata);
    int x=baos.toByteArray().length;
    int r=rs.addRecord(baos.toByteArray(),0,baos.toByteArray().length);
    System.out.println("length is"+x);
    load(r);
    catch(RecordStoreNotFoundException rsnfe){}
    catch(RecordStoreException rse){}
    catch(Exception ioe){}
    System.out.println("sucess");
    public void load(int i){
    try{
    byte data[]=rs.getRecord(i);
    System.out.println(data.length);
    Image.createImage(data,0,data.length);
    }catch(RecordStoreException e){}
    public void pauseApp(){}
    public void destroyApp(boolean flag){
    //System.out.println(save());
    }

    i kept that in for loop
    even then i cudnt get the image n length same as i mentioned in the loop
    response------>
    Project "saveimage" loaded
    Project settings saved
    Building "saveimage"
    Build complete
    Running with storage root DefaultColorPhone
    record store created
    hi
    check for image length
    java.io.EOFException
    length is2869
    2869
    sucess
    Execution completed.
    955248 bytecodes executed
    28 thread switches
    742 classes in the system (including system classes)
    3980 dynamic objects allocated (134324 bytes)
    2 garbage collections (90936 bytes collected)
    But actual length is 3524 but length displayed is another
    more over if i need multiple images to store what shal i do then
    Edited by: lakshmi on Oct 25, 2007 2:43 AM

  • Video intensive work on Mac Pro? Advice Needed

    Hi everyone,
    I've been originally saving up for a while now for an iMac 24" as it offers the best specification price wise. But now I leaning on the Mac Pro and therefore need some advice.
    I know that there are alot of posts on advice - need to buy mac etc. so therfore I would really appreciate if I am afforded some help.
    I am mostly going to do ALOT of video encoding (via handbrake) and I am looking for the best configuration available to achieve lowest waiting time.

    I think you should go back and look at the other threads with advice, your budget. There is "ideal" and "affordable."
    Will it pay for itself in 24 months so you can afford the next revision at that time?
    Start with an 8-Core 3GHz.
    Add a Port Multiplier controller and two drive cases, 5 drives each, nearly 400MB/sec RAID.
    Throw in 8GB RAM.
    Add in costs for software upgrades, two sets of backups, four internal 500GB drives.
    Seagate has 750GB, as does WD. Hitachi has their $450 1000GB monster.
    Give yourself time to build, test, and optimize your setup, and expect to change it over time as you learn more.
    Can't afford that? then trim the 8-core. But Apple has shown how efficient next generation applications already are for video when it comes to 3GHz 8-core Mac Pro.

  • Need Random Image Script with Links

    I am needing a script for random images on my homepage. I
    need the image to have its own link depending on what image is
    displayed. I would like a php script (non database) if
    possible

    See comments on DW forum about random includes and this
    particular markup
    shown below.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "newhorizonhosting.com" <[email protected]>
    wrote in message
    news:e29on1$buf$[email protected]..
    >I figured it out by doing a random include
    >
    > <?
    > srand(time());
    > $random = (rand()%3);
    > print("$random");
    > require_once("./$random.php");
    > ?>

  • Need Random Image Script with Link

    I am needing a script for random images on my homepage. I
    need the image to have its own link depending on what image is
    displayed. I would like a php script (non database) if
    possible

    Not sure about the PHP but there are some good scrips on
    www.kaosweaver.com
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "newhorizonhosting.com" <[email protected]>
    wrote in message
    news:e28rpm$8is$[email protected]..
    >I am needing a script for random images on my homepage. I
    need the image to
    >have its own link depending on what image is displayed. I
    would like a php
    >script (non database) if possible

  • Had to have a rebuild of my laptop....advice needed!

    Had to have a rebuild of my laptop....have now lost all my music from my itunes, but I can't transfer back on from my ipod. Also had to register my laptop (same) as another computers, so now no music showing as purchased, though I have. Also have hours of uploaded music from my own purchased, legitimate CDs, but won't transfer from ipod...it says it will erase. So very frustrated....thanks mr technician!    PLEASE  ....help, advice needed!

    I believe that if you do a clean reinstall from your HD's recovery sector (D) or Recovery disks, the hard drive sector C is wiped clean. Everything goes, apps, data, address books, music, pix, viruses
    Is that what you did?

Maybe you are looking for

  • Windows 8.1 Will Not Load

    Hello, I've been using Windows Vista on my older laptop for about 7 years now and recently switched to 8.1 with my newer laptop described here. (it came with 8 installed) A few days I ago I tried to boot up in SAFE MODE and also I clicked "'networkin

  • Out of order chapters in RH

    when i upload a word doc into RH, all the chapters are out of sequence. how does that happend and how do i fix that? thanks

  • Any standard reports specific to Limit POs

    Hi MM gurus, Can any body give the list of Standard reports available in MM specific to Limit POs I have know some reports "ME2N, ME2L, ME2M, ME2C and ME2K" apart from this reports are there any reports Specific to Limit POs? So that we can get the d

  • Crystal Reports 9 and Windows Server 2003 sp1/sp2

    Post Author: jnribeyrol CA Forum: General Hello, due to security updates in my company, we have to upgrade from Windows Server 2003 to sp1 or sp2. I haven't been able in the support to find out if there was any problem with Report Access Server on th

  • Arch boot stops on systemd-fsck

    Today I upgraded my packages then I replaced catalyst package with catalyst-total after reboot the booting process stops on this line Systemd-fsck[362]: /dev/sda5: clean etc The sda5 is my home drive the boot stops after this line I pressed alt+f2 to