How to see the image from server

hi,
I have uploaded an image to server using following code. I want to see the image from server now. When i open this page then it show image. But when i want to see this image from server then it shows blank. Whats the problem of my code? Give me solution.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import ="org.apache.commons.fileupload.servlet.*" %>
<%@ page import ="java.util.*" %>
<%@ page import ="java.io.*" %>
</head>
<title>User Registration page</title>
<body>
<%
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
FileItemFactory factory=new org.apache.commons.fileupload.disk.DiskFileItemFactory();
ServletFileUpload upload =new ServletFileUpload(factory);
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
     while (iter.hasNext()) {
     FileItem item = (FileItem) iter.next();
     if (!item.isFormField()) {
     String path=application.getRealPath("/");
     File tempfile=new File(item.getName());
     File uploadfile=new File(path,tempfile.getName());
     item.write(uploadfile);
     %>
     <br>
<img src="<%=uploadfile%>" height="100" width="100">
<br>
<%=uploadfile%>
<%
item.delete();
%>
</body>
</html>Is there anybody can help me.
With regards
Bina

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import ="org.apache.commons.fileupload.servlet.*" %>
<%@ page import ="java.util.*" %>
<%@ page import ="java.io.*" %>
</head>
<title>User Registration page</title>
<body>
<%
String filename = "";
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
FileItemFactory factory=new org.apache.commons.fileupload.disk.DiskFileItemFactory();
ServletFileUpload upload =new ServletFileUpload(factory);
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
     while (iter.hasNext()) {
     FileItem item = (FileItem) iter.next();
     if (!item.isFormField()) {
     String path=application.getRealPath("/");
     filename = item.getName();
                     File tempfile=new File(filename);
     File uploadfile=new File(path,tempfile.getName());
     item.write(uploadfile);
     %>
     <br>
<img src="<%=path+filename%>" height="100" width="100">
<br>
<%=uploadfile%>
<%
item.delete();
%>
</body>
</html>

Similar Messages

  • HT3228 I don't see the "Delete from server" option under Incoming Settings on my IPhone4, is there a way to keep it from the server so that I can check emails from multiple devices?.

    I'm using IPhone 4 to check emails.  Is there a way on the IPhone to setup that the messages would still be on the server so that when I check on my laptops the messages are still there.  I can do this setup for multiple laptops but don't know how I can do it for the IPhone.
    I got help and setup all the things they told me but the problem is that I did not see the "Delete from server" option under Incoming Settings on my IPhone 4 to select.  Is there anything else that I am missing?  Thanks

    TamIPhone4 wrote:
    I am using cox email, Outlook on the laptop, and IMAP on the IPhone, the problem is that I did not see the Delete from Server option like many of you suggested.
    The default for IMAP is that it does NOT delete the email from the server when it pushes the email to a device.  Only if you tell a device to tell the server to delete the email, will it actually delete from the server.

  • Can´t see the images from my contacts

    Since yesterday i can´t see the images from my contacts when receiving a call on my iphone 4S. Please help me.

    Yes they are.
    Enviado do meu iPhone
    No dia 26/06/2014, às 20:15, Apple Support Communities Updates <[email protected]> escreveu:
    You received a reply
    James Ward4 has replied to your question. You can view the full discussion in Apple Support Communities.
    can´t see the images from my contacts                                                                            
    Are those images still in your Photos app?
    Correct Answer  Helpful Answer
    Use the buttons above to tell James Ward4 and the rest of the community if this reply solved your question or helped you get closer to finding a solution.
    To reply to James Ward4, go to the discussion in Apple Support Communities.
    You are receiving this email from Apple Support Communities. You can change your email preferences in your Apple Support Communities Profile.
    TM and copyright © 2014 Apple Inc. 1 Infinite Loop, MS 96-DM. Cupertino, CA 95014.
    All Rights Reserved | Privacy Policy | Terms of Use | Apple Support

  • How to list the umages from server system

    Hi,
    I am using tomcat. while clicking on a link in my application it will invoke the swing file. in that file i have to list out the images from my server.
    While accessing our application it retrives from the local system images not from server...
    What is the code for retrieving images from system?

    Just try this out
    i dont' know if u asked for this
    import the necessary classes
    client:
    public class Client
    public static void main(String args[]) throws Exception
    Socket s = new Socket("197.0.0.1", 1000);
    PrintStream ps = new PrintStream(s.getOutputStream());
    ps.println("hello.txt");
    ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
    byte[] buffer = new byte[ois.available()];
    buffer = (byte[])ois.readObject();
    FileOutputStream fos = new FileOutputStream("hello.txt");
    fos.write(buffer);
    Server
    public class Server
    public static void main(String args[])
    ServerSocket ss = new ServerSockt(1000);
    Socket s = ss.accept();
    BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStreamReader()));
    String fname = br.readLine();
    FileInputStream fis = new FileInputStream(fname);
    byte[] buffer = new byte[fis.available()];
    fis.read(buffer);
    ObjectOutputStream oos = new ObjectOutputStream(s.getOuputStream());
    oos.writeObject(buffer);
    }

  • How to run the client from server

    HI FRIENDS,
    I HAVE A SMALL PROBLEM WITH MY PROGRAM.I WANTED TO START THE CLIENT FROM SERVER I.E THE CLIENT SHOULD BE EXECUTED AS SOON AS THE SERVER STARTS EXECUTION.SOME OF THEM SAID THAT THIS CAN BE DONE BY USING 'EXEC' COMMAND.BUT I COULDNT.SO PLEASE ANYONE HELP ME IN DOING THIS.
    BYE
    KP

    HI FRIENDS,
    I HAVE A SMALL PROBLEM WITH MY
    MALL PROBLEM WITH MY PROGRAM.I WANTED TO START THE
    CLIENT FROM SERVER I.E THE CLIENT SHOULD BE EXECUTEDCan't be done, unless the server and the client are on the same machine, or you have some other COM object or service set up to allow someone to do this remotely

  • How to get the image from web site

    Hi,
    Anybody know the coding that use to get or download the image from the web site when the image's url is given.
    Thanks

    http://www.exampledepot.com/egs/java.net/GetImage.html

  • How to delete the files from server through OAF page

    Hi All,
    I have a requirement in which i am creating files on server through my CO code.
    Now once the page is rendered, i want to delete the files from the server.
    Just wondering how can we achieve this.
    Kindly advice!
    Thanks,
    Sachin

    Hi Sachin
    all the methods in the processRequest() are called during loading of the page.
    all the methods in the processFormRequest() are called during any action events on the page.
    So Use the method in processFormRequest() : write a method in
    that on which action you want to delete the file.
    regards
    sridhar

  • How to see the changes from format dropdown in RTE itself?

    Hi
       I have a RTE . I have enabled paraformat and is trying to add tags. But i am not able to see the changes in my RTE. How can i achieve this
    even if we select heading1 , the selected text should appear in H1 tag. But it is not happening. Can i know why it is so???
    Thanks
    Veena

    Hi Veena,
    Looking at snapshot I see paragraph is missing might be some customization done.
    As a sanity check download Enable-all-RTE-features-*.zip from package manager & verify.
    Thanks,
    Sham

  • How to migrate the portal from server A to Server B

    Dear Expert,
    I have existing R3 name A and portal connecting. I have setup a new R3 name B on different server. Could you please provide me the steps on how can I migrate the portal connection from Server A to Server B. What are the steps involve .e.g. ITS and etc.
    Thank you
    KS

    Hi,
       The communication between portal server and R3 server happens via system only. If you don't want to use R3 system A hereafter, then look for R3 system alias created for 'A' in portal. You can delete that. Now for using new R3 system B in portal, create a new system for B in portal using System Administration. Decide which SSO you are going to use. If user is same in portal and r3, then logon tickets. Else user mapping method.
    Check these documents on how these can be done.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/howtoConnecttoSAPR3SystemthroughEnterprisePortal7.0Usingan+iView.
    Connecting To R/3 From Portal
    Configuring EP for connecting to SAP R/3
    Regards,
    Harini S
    Consider rewarding points for helpful answers

  • How to see the printpreview from MRKO

    Hi all,
    I want to see the printpreview of the form from transaction MRKO.
    Kindly help.
    Thanks & regrads
    sachin

    Hi Abhilash,
    I solved it by creating a variable in the query with an offset -1 and in the report I created a formula with the difference, so as to get the value change of the data records.
    It's a good work around for now but it is something I will post to the Ideas Place.
    Thank you

  • How to extract the image from pdf file

         Hai friends........
             Is it possible to extract the images in a page from pdf file.
             If so. please share with me.......
        Thanks in advance,
        abu

    In later versions of Acrobat you can select an Image with the Select tool, then right-hand click for Save options.
    ------------->
    It helps if you quote your exact version of Adobe Acrobat/Reader - choose [Help, About...] to find this.
    Also useful: Version numbers of other software (e.g. Word) if relevant. Age of computer and amount of memory (RAM) available (r/h cllcking on 'My Computer' and choosing Properties gives you this, plus processor speed).

  • How to see the data from the execute immediate o/p

    Hello
    i tried the following code
    SQL> declare
      2  vSql varchar2(3000);
      3  begin
      4  vSql:='SELECT';
      5   for i in (select column_name from user_tab_columns where table_name='EMP' order by column_name
      6   loop
      7     vSql:=vSql||i.column_name||',';
      8   end loop;
      9   execute immediate rtrim(vSql)||' '||'from emp';
    10  end;
    11  /
    declare
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 9Please guide me to solve this error
    Edited by: josh1612 on Jun 22, 2010 3:58 AM

    josh1612 wrote:
    I need to execute that printed statment select ... from emp
    You are already executing it by using:
    execute immediate rtrim(vSql,',')||' from emp';What you probably want is to display results, right? Then you can either use bulk collect into clause in execute immediate or use cursor variable. Bulk collect example:
    set serveroutput on
    declare
      vSql varchar2(3000);
      type emp_rec_tbl_type is table of emp%rowtype;
      emp_rec_tbl emp_rec_tbl_type;
    begin
      vSql:='SELECT ';
       for i in (select column_name from user_tab_columns where table_name='EMP' order by column_id)
       loop
         vSql:=vSql||i.column_name||',';
       end loop;
       dbms_output.put_line(rtrim(vSql,',')||' from emp');
       execute immediate rtrim(vSql,',')||' from emp' bulk collect into emp_rec_tbl;
       for i in 1..emp_rec_tbl.count loop
         dbms_output.put_line(rpad(emp_rec_tbl(i).ename,10) || emp_rec_tbl(i).sal);
       end loop;
    end;
    SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO from emp
    SMITH     800
    ALLEN     1600
    WARD      1250
    JONES     2975
    MARTIN    1250
    BLAKE     2850
    CLARK     2450
    SCOTT     3000
    KING      5000
    TURNER    1500
    ADAMS     1100
    JAMES     950
    FORD      3000
    MILLER    1300
    PL/SQL procedure successfully completed.
    SQL> Cursor variable example:
    set serveroutput on
    declare
      vSql varchar2(3000);
      emp_rec emp%rowtype;
      cv sys_refcursor;
    begin
      vSql:='SELECT ';
       for i in (select column_name from user_tab_columns where table_name='EMP' order by column_id)
       loop
         vSql:=vSql||i.column_name||',';
       end loop;
       dbms_output.put_line(rtrim(vSql,',')||' from emp');
       open cv for rtrim(vSql,',')||' from emp';
       loop
         fetch cv into emp_rec;
         exit when cv%notfound;
         dbms_output.put_line(rpad(emp_rec.ename,10) || emp_rec.sal);
       end loop;
       close cv;
    end;
    SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO from emp
    SMITH     800
    ALLEN     1600
    WARD      1250
    JONES     2975
    MARTIN    1250
    BLAKE     2850
    CLARK     2450
    SCOTT     3000
    KING      5000
    TURNER    1500
    ADAMS     1100
    JAMES     950
    FORD      3000
    MILLER    1300
    PL/SQL procedure successfully completed.
    SQL> SY.

  • To load the image from appl. server to FORM

    Hi all,
    i have to fetch the image from Application server and Print in a form. i don't know how to load the image from appl. server to FORM.Through SE78 i guess we can load the image only from presentation server,,,,can anyone help on this????

    Hi Bhuvaneshwari ,
    Through <b>SE78</b> you can fetch the image from application server.
    Goto><b>Graphics</b>><b>BMAP(Bit map images)</b>>In <b>Name</b> parameter click <b>F4</b> for input help.>click on <b>execute</b> button.
    These images are stored on document server.
    There you can find images of application server.
    Those images you can import.
    Reward if helpful.
    Regards,
    Sandhya.

  • Can't access the "delete from server" option in AOL mail setting.

    iPhone 4s, ios 5.1, Verizon customer. I have never had an issue until this phone. Any ideas why I can see the "delete from server" option, but I can't check it? It's really annoying to delete emails from my phone and then have to go back and delete from my computer.
    Thank you in advance.

    Is the email account that has this problem a POP account or IMAP.  If POP, there should be a setting in the account's setting that determines whether an email is deleted from the server when downloaded.  If IMAP than deleting on the device should delete on the server and other devices/computers.  A problem can occur if the other devices have already downloaded the same email that you are trying to delete.  It may take some time for it to delete from other devices.  And some providers have bugs in this process.  My carrier is Verizon, but I never use their email service.

  • Strange. After importing a series of images from a Sony camcorder, I see the images but there's no sound, although there is sound on the camera.

    strange. After importing a series of images from a Sony camcorder, I see the images but there's no sound, although there is sound on the camera.

    Hi Jan,
    Looks like a common problem, see if this is of any help...
    http://www.bigasoft.com/articles/how-to-import-sony-handycam-avchd-mts-mpeg2-to- imovie.html

Maybe you are looking for

  • Error codes on install...what does it mean?

    HI all -- I had to uninstall and install premiere pro cs4 on vista and when it was done I received the following message: Media Encoder CS4 Dolby Error Error Code 2 Adobe Premiere Pro CS4 Error Error Code 2 Adobe Premiere Pro CS4 Language Pack Error

  • Use custom field for work phone number in CUCiLync

    Hi, I have searched and tried out all sorts of different settings for enabling/changing the way CUCiLync searches the Active Directory (AD) for contact phone numbers. But no matter what setting I use in the HKEY_CURRENT_USER\Software\Cisco Systems, i

  • Apple TV 2 Stops Playing after 2 Songs

    My apple TV 2 plays 2 songs and stops since I downloaded the iTunes and Apple TV updates. Is Apple jamming our home libraries so that we pay $24.99 per year for iTunes Match? I'm ready to drop Apple products.

  • Initial setup without a mouse?

    Got my iMac back from repair.  I have a wired keyboard and a wireless magic mouse. I'm stuck during initial setup because the mouse isn't recognized and the keyboard can't finish the setup.  For example, it won't let me use the Return key to select m

  • Read cursor position in document

    I've already asked this question in the PS-SCRIPTS forum and gotten 2 answers.  I wonder if anyone else has some other ideas on how to do this. Is there a way I can have the user click inside the opened document and have the X,Y coordinates, where th