Uploading an image

Hello I would like to write a program where I can upload an image from my computer and have it displayed in the program. I understand that I need to use JFileChooser to do this but before I start writing code I want to know is it possible to achieve what I am trying? Any feedback will be appriciated thanks

smithbrian wrote:
..I got this code of the net I am trying to modify it and learn from it "so please bear with me"Put that code back in whatever deep, dark hole you found it in. It is so horrid it would take less time to write a simple example from scratch, than to detail the problems with it.
Try this code..
import java.awt.*;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.imageio.ImageIO;
import java.net.URL;
import java.io.IOException;
public class LoadImage {
  public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        JFrame f = new JFrame("Load Image");
        f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        JFileChooser fileChooser = new JFileChooser();
        FileNameExtensionFilter filter = new FileNameExtensionFilter(
          "Image Files", "jpg", "gif", "png");
        fileChooser.setFileFilter(filter);
        int result = fileChooser.showOpenDialog(null);
        if ( result==JFileChooser.APPROVE_OPTION ) {
          try {
            GUI gui = new GUI(fileChooser.
              getSelectedFile().
              toURI().
              toURL());
            f.setContentPane(gui);
          } catch(Exception e) {
            f.setContentPane( new JLabel(e.getMessage()) );
        } else {
          f.setContentPane(new JLabel("Image load cancelled"));
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
class GUI extends JPanel {
  Image image;
  public GUI(URL imageUrl) throws IOException {
    super(new BorderLayout());
    image = ImageIO.read( imageUrl );
    JLabel imageLabel = new JLabel( new ImageIcon(image) );
    add(imageLabel);
  public Dimension getPreferredSize() {
    return new Dimension( image.getWidth(this), image.getHeight(this) );
}

Similar Messages

  • Image cropping before uploading an image

    Hi all,
    I am using webcenter spaces 11.1.1.8.6. I have a requirement where i need an option to crop a image before uploading it. For example before a logged in user uploads his image he should be able to crop only a certain part of the image and upload it. How do i achieve this

    Well, I never tried it.But you can use some jquery plugin for this. There is no support out of the box,
    try using jcrop
    Jcrop: the jQuery Image Cropping Plugin
    or see in this list which can work best
    http://www.jqueryrain.com/demo/jquery-crop-image-plugin/

  • Uploading an image in interactive report APEX 4.0

    Hi,
    I hope you can help me. I am using the book "Begining ORACLE APEX", which is for APEX 3.1.2, to learn APEX. Now, I use the online APEX 4.0. In the 6th chapter one should add new columns to the PRODUCTS table: one for the PRODUCT_IMAGE, a BLOB column, and 3 more for MIMETYPE, FILENAME, and IMAGE_LAST_UPDATE. So, i need to make an interactive report, with this new table. I include it, but when I run the application it doesn't show. So i insert in the SQL for the report : "PRODUCT_IMAGE", and run the page again, and there i add the column using Actions button. When added, each row is is filled with: [unsupported data type]. When trying to upload an image it doesn't work. It doesn't show anything. I even tried putting: dbms_lob.length("PRODUCT_IMAGE") "PRODUCT_IMAGE" in the SQL of the report, but it doesn't work. It is like a problem with uploading the image. It doesn't do anything.
    I would really appreciate your help, this is really important for my job..
    Sincerely,
    Leila

    See the sample application provided in your workspace, there in page no 3 they have created a interactive report showing a image in one of the column, I think it will solve your problem.
    Tauceef

  • Uploading an image dynamically into Flash

    I'd upload an image choosen by the client, but I want to wrap it in a movieclip in order to manipulate its size and color with color transform. How can I do it? (AS3 in Flash 10)
    My code:
    import flash.display.SimpleButton;
       import flash.net.FileReference;
       import flash.net.FileFilter;
       import flash.events.IOErrorEvent;
       import flash.events.Event;
       import flash.utils.ByteArray;
       import flash.display.*;
       import flash.geom.*;
       var loadFileRef:FileReference;
       const FILE_TYPES:Array = [new FileFilter("Image Files", "*.jpg;*.jpeg;*.gif;*.png;*.JPG;*.JPEG;*.GIF;*.PNG")];
        function loadFile(event:MouseEvent):void {
        loadFileRef = new FileReference();
        loadFileRef.addEventListener(Event.SELECT, onFileSelect);
        loadFileRef.browse();
        function onFileSelect(e:Event):void {
        loadFileRef.addEventListener(Event.COMPLETE, onFileLoadComplete);
        loadFileRef.load();
        function onFileLoadComplete(e:Event):void {
           var loader:Loader = new Loader();
           loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onDataLoadComplete);
           loader.loadBytes(loadFileRef.data);
        loadFileRef = null;
        function onDataLoadComplete(e:Event):void {
        var bitmapData:BitmapData = Bitmap(e.target.content).bitmapData;
        if((bitmapData.height)<=(bitmapData.width))
                    var r:Number = bitmapData.height/bitmapData.width;
                    var ra:Number = 500*r;
                    var matrix:Matrix = new Matrix();
                    matrix.scale(500/bitmapData.width, ra/bitmapData.height);
        graphics.clear();
        graphics.lineStyle(1, 0x000000);
        graphics.beginBitmapFill(bitmapData, matrix, false);
        graphics.drawRect(0, 0, 500, ra);
        graphics.endFill();
        } else {
                    var d:Number = bitmapData.width/bitmapData.height;
                    var da:Number = 500*d;
                    var matrix2:Matrix = new Matrix();
                    matrix2.scale(500/bitmapData.width, da/bitmapData.height);
        graphics.clear();
        graphics.lineStyle(1, 0x000000);
        graphics.beginBitmapFill(bitmapData, matrix2, false);
        graphics.drawRect(0,50, 500, da);
        graphics.endFill();
      boton.addEventListener(MouseEvent.CLICK, loadFile);
    Any help will be very appreciated. Madrid.

    If you see the code, I draw a rectangle in order to enclose the bitmapData as a fill. I made it in flex adding the rectangle to a canvas with ID, and then applied the transformations and zooming to the canvas itself successfully. But my client wants some other issues that only can be made in Flash, and I have to transfer the whole code to Flash, For instance, look at both codes and you will grasp what I'm trying to say:
    1) Flex:
    imageView.graphics.clear();  // "imageView" is the canvas id.imageView.graphics.beginBitmapFill(bitmapData, matrix,false);imageView.graphics.drawRect(0, 0, 500, ra);
    imageView.graphics.endFill();
    2) Flash:
         graphics.clear();   // you see? There is NOT an instance name. How can I manipulate THIS?
        graphics.lineStyle(1, 0x000000);
        graphics.beginBitmapFill(bitmapData, matrix, false);
        graphics.drawRect(0, 0, 500, ra);
        graphics.endFill();
    Thanks a lot for your patience. Madrid.

  • Uploading an image to MIME repository using upload UI element.

    Hello All.
    I am trying to upload an image to MIME repository using the upload UI element.
    How to achieve this.
    Rite now I am able to add it to the internal table but it is getting stored using some other name.
    I want it to get stored using the same name of the image file.
    Regards,
    SampathKumar.

    HI SampathKuma,
    could you please provide the steps/coding which you used? I have the same requirement..
    Thanks

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • External hosting server has problems uploading my images

    Hi. I am experiencing difficulties getting my new hosting provider to upload my images. I use the upload to FTP on the file menu and I get a message in apop up window. "FTP - Validation, Could not validate that the specified domain is associated with the FTP server and folder. Proceed anyway? Yes / No"
    This also occurred on my previous host provider and when I clicked Yes it uploaded OK and my site has been running for several months already.
    My new host's support technician has been on the phone with me all afternoon trying to upload the files. It will upload the HTML files very quickly but then runs into problems with the images. So I have spent  a few hours renaming each file and saving them to web. I have made sure all images and assets are linked and in the same folder.  As the FTP upload struggles on it keeps stopping at various images the the computer freezes and I have to wait until it comes back to life. It doesn't crash.
    My previous host's technicians and the present one suggested that the problem is in the software - Muse.
    Has anyone else had these or similar problems?. Maybe I should rebuild in Dreamweaver?
    Oh by the way, my website www.bilyz.com uploads to Adobe Business Catalyst without a problem. Try it and see.

    Thanks for your help.  I have done as suggested and I have also tried alternative settings without successful upload. I have checked and double checked all the assets, then rechecked the sizes of each of my images before trying to upload to the FTP server.
    1.  I tried to upload with a forward slash in the folder field box - Result was a window " \public_html " does not exist. Do you want to create it?
    > OK
    New window appears: Error creating folder [failed to MKD dir: 553]
    2. Forward slash: The requested folder "/public_home " does not exist. Do you want to create it?  > Yes.
    New window: Could not validate that the specified domain is associated with the FTP server and folder. Proceed anyway? Yes
    3. New window appears: Title of window: Upload to FTP Host
                                    Overall upload progress: 65% complete
    Then uploading stalls and a message appears: Error uploading file lucy.jpg. Click to resume. If problem persists, try again later. [FTP response timeout]
    Each time I click on Resume the screen freezes for a while then returns to 'live' and it all begins again.  It is perplexing me why my site uploads to BusinessCatalyst without any problems.  It also uploaded to Namesco.co.uk without too much difficulty (my first upload)
    Yesterday prior to contacting you the hosting technician at Vidahost.com took command of my computer and tried to see what the problem was but obviously without success and suggested that the Muse software could be at fault - which I doubt.
    I have taken screen capture jpegs of the windows but don't understand how to include them.
    Kind regards
    Bill

  • Uploading an image is not working in jsff

    Hi.,
    Am using jdeveloper 11.1.1.6.,
    I have used the following link to upload the image in jsff
    http://www.baigzeeshan.com/2010/08/uplaoding-and-downloading-images-in.html
    This is workig perfectly in a jsps page but when i used jsff page am getting exception
        private BlobDomain createBlobDomain (UploadedFile file) throws IOException,
                                                                      SQLException {
            InputStream in = null;
            BlobDomain blobDomain = null;
            OutputStream out = null;
            try{
                in= file.getInputStream();    // am getting null pointer exception
                blobDomain = new BlobDomain();
                out = blobDomain.getBinaryOutputStream();
                byte[] buffer = new byte[8192];
                int bytesRead = 0;
                while ((bytesRead = in.read(buffer,0,8192))!= -1){
                    out.write(buffer,0,bytesRead);
            catch (Exception e){
                e.printStackTrace();
            return blobDomain;
        }Pls help me to resolve this.,

    Thank's for your response John.,
    This is the log which am getting
    java.lang.NullPointerException
         at view.imageServlet.doGet(imageServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)This s the doget() method which i have used
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
            response.setContentType(CONTENT_TYPE);
            String eno = request.getParameter("id");
            OutputStream os = response.getOutputStream();
            Connection con = null;
            try{
                Context ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/UIConnDS");
                con = ds.getConnection();
                PreparedStatement stmt =  con.prepareStatement("SELECT eei_emp_id,eei_emp_image " +
                                          "FROM ess_emp_image " +
                                          "WHERE eei_emp_id = ?");
                stmt.setString(1, eno);
                ResultSet rs = stmt.executeQuery();
                if (rs.next()) {
                    Blob blob = rs.getBlob("eei_emp_image");
                    BufferedInputStream in =  new BufferedInputStream(blob.getBinaryStream());    //This is the part where exception is showing now.
                    int b;
                    byte[] buffer = new byte[10240];
                    while ((b = in.read(buffer, 0, 10240)) != -1) {
                        os.write(buffer, 0, b);
                    os.close();
                    catch (Exception e){
                        e.printStackTrace();
            finally {
                        try {
                            if (con != null) {
                                con.close();
                        } catch (SQLException sqle) {
                            System.out.println("SQLException error");
            }

  • Problem in uploading an image into a CM repository!!

    Hi All,
         I am trying to use the Fileupload element in JSP dynpage.
         My screen has the Fileupload element and a button.
         <b>I want to upload an image into a CM repository.</b>
         I have put <hbj:form id="myFormId" encodingType="multipart/form-data" > in my jsp page.
         The <b>'onClick'</b> method is <b>'onLoadFile'</b>.
         <i><b>The following is my code:</b></i>
    public void onLoadFile(Event event)
                   FileUpload fu =
                        (FileUpload) this.getComponentByName("myfileupload");
                   if (fu != null) {
                        //    Get file parameters
                        IFileParam fileParam = fu.getFile();
                        //    Get the temporary file name
                        File f = fileParam.getFile();
                        String fileName = fileParam.getFileName();
                        //    Get the selected file name
                        String ivSelectedFileName = fu.getFile().getSelectedFileName();
                        try {
                             int len = (int) f.length();
                             byte a[] = new byte[len];
                             FileInputStream fin = new FileInputStream(f);
                             fin.read(a);
                             String FileContent = a.toString();
                             IPortalComponentRequest request =
                                  (IPortalComponentRequest) this.getRequest();
                             com.sapportals.portal.security.usermanagement.IUser user =
                                  (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();
                             IResourceFactory factory = ResourceFactory.getInstance();
                             IResourceContext context = new ResourceContext(user);
                             RID rid = RID.getRID("/documents/test");
                             IResource resource = factory.getResource(rid, context);
                             if (resource != null) {
                                  ICollection parent =
                                       (ICollection) ResourceFactory
                                            .getInstance()
                                            .getResource(
                                            rid,
                                            context);
                                  String out = new String(FileContent);
                                  ByteArrayInputStream data =
                                       new ByteArrayInputStream(out.getBytes());
                                  IContent content =
                                       new Content(data, "text/html", data.available());
                                  IResource fileResource =
                                       parent.createResource(fileName, null, content);
                        } catch (Exception e) {
                   <b>..... REMAINING CODE...</b>
    I uploaded <b>abc.jpg (<i>size: 2KB</i>)</b>, then, an image file with the same-name is being created in the <b>/documents/test</b> folder but the size is <b>10Bytes</b> only. <b>I am not able to see the image</b> too.
    Can any1 help me plzzzz??? Would appreciate any kind of help.
    Thanks in advance.
    <b>
    Regards,
    Sai Krishna.</b>

    I would guess that this is because of the way you try to read the file contents. Maybe you should add some debug statements to find out what you're realling setting as content. It's certainly not KM's fault.
    The following sequence of statements looks wrong:
    nt len = (int) f.length();
    byte a[] = new byte[len];
    FileInputStream fin = new FileInputStream(f);
    fin.read(a);
    String FileContent = a.toString();
    IPortalComponentRequest request =
    (IPortalComponentRequest) this.getRequest();
    com.sapportals.portal.security.usermanagement.IUser user =
    (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();
    IResourceFactory factory = ResourceFactory.getInstance();
    IResourceContext context = new ResourceContext(user);
    RID rid = RID.getRID("/documents/test");
    IResource resource = factory.getResource(rid, context);
    if (resource != null) {
    ICollection parent =
    (ICollection) ResourceFactory
    .getInstance()
    .getResource(
    rid,
    context);
    String out = new String(FileContent);
    ByteArrayInputStream data =
    new ByteArrayInputStream(out.getBytes());
    IContent content =
    new Content(data, "text/html", data.available());
    Why don't you just pass the FileInputStream into the Content object's constructor???
    Best regards, Julian

  • How can we add a control on our .jsp webpage for uploading several image fi

    How can we add a control on our .jsp webpage for uploading several image files as done in gmail attachment, Where a Remove button also appears if we wanna remove the particular attachment.

    The SCOM Management Server is in Domain A.  I've tried it already and it has failed.  
    So just to clarify the method I used was to go to Administration>Security>User Roles.  Then New User Role>Read-Only Operator.  In the Create User Role Wizard I then gave the User Role a name, Clicked "Add" under User Role Members.
     Then the Select Users or Groups window pops up and I changed the Locations from Domain A to Domain B and searched for the user, which it's able to find, then clicked "OK" to add it to the User Role members which it does just fine.  On
    the next page which is Group Scope I checked the one group I want this account to have access to and then click next.  This brings me to Dashboards and Views where I click the radio button for "Only the dashboards and views selected in each tab are
    approved" and chose the folder of dashboards I want this account to access and then click next.  This brings me to the Summary and I click "Create".  At this point it thinks for a moment then closes out the wizard but the new Read-Only
    Operator does not appear.  I then look in Event Viewer and see the Event I pasted above.
    Am I doing something wrong here?  Any guidance on how to get around this issue would be much appreciated.
    Thanks,
    Jake

  • How to upload an image in jsp page

    hi,
    I want to upload an image file with my jsp page, but i cannot do it,
    I have used Jakarta common file upload for this & i have also read following file. But my code isnot working properly? Can you give me any example how to upload an image & how to display it?
    Can u give me any source code? Please help me.
    http://jakarta.apache.org/commons/fileupload/using.htmlwith regards
    Bina

    Hi,
    But after writing the following code i have got following error? What's the problem of this code? please help me?
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <%@ page import="org.apache.commons.fileupload.*" %>
    <%@ page import ="java.util.*" %>
    <%@ page import ="java.io.*" %>
    </head>
    <body>
    <%
    boolean isMultipart = FileUpload.isMultipartContent(request);
    DiskFileUpload upload = new DiskFileUpload();
    List items = upload.parseRequest(request);
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
    FileItem item = (FileItem) iter.next();
    if (item.isFormField()) {
    String name = item.getFieldName();
    String value = item.getString();
    //ring name= request.getParameter("")
    %>
    <%= name %>:<%= value %>
    <%
    } else {
    %>
    <%
    InputStream stream = item.getInputStream();
    OutputStream bos =
         new FileOutputStream(getServletContext().getRealPath("/images"+"/"+ item.getName()));
    int bytesRead = 0;
    byte[] buffer = new byte[8192];
    while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
    bos.write(buffer, 0, bytesRead);
    bos.close();
    stream.close();
    item.delete();
    %>
    </body>
    </html>Error is:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Please help me.
    With regards
    Bina

  • HOW TO UPLOAD BACKGROUND IMAGES IN SMARTFORMS

    HI
    HOW TO UPLOAD BACKGROUND IMAGES IN SMARTFORMS

    Hi, 
       goto se78 -> in the menubar click graphic  and import to select ur images from ur system .. then click transport button .. it automatically gets into the smartform graphic image list.. then get into transaction smartform and use the image u imported into that..
    U can import anykind  of image which u have stored in ur pc through se78..
    Regards,
    Priya.

  • How do i upload an image to a server and put the name into a database table

    Ok, i found a php image upload script that im using for a cms
    image gallery on my site. But for it to work the way i need to i
    have to have certain information submited into a mysql table at the
    same time. I could just make it so the user types the name of the
    image in a second form, but i would rather not have to as it seems
    a clumsy way to do things and opens things up to typos etc.
    So, i can upload the image ok, and i can upload data to the
    table, but i dont know what I have to do so that the name of the
    uploaded file is automaticly inserted into the mysql table.
    The first bit of code below is the form I am using to upload
    the file to the server. The second bit of code is what I am using
    to tell the server what the file name is.
    How do I combine the 2 form into one? Please help. It is
    driving me to dispair.
    Attach Code
    <form enctype="multipart/form-data" action="uploader.php"
    method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="500000"
    />
    Choose a file to upload: <input name="uploadedfile"
    type="file" />
    <br />
    <input type="submit" value="Upload File" />
    </form>
    <form action="<?php echo $editFormAction; ?>"
    method="post" name="form2" id="form2">
    <table align="center">
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Image One</td>
    <td><input type="text" name="kingsImage1"
    value="<?php echo
    htmlentities($row_rskingscentre['kingsImage1'], ENT_COMPAT,
    'UTF-8'); ?>" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Image Two</td>
    <td><input type="text" name="kingsImage2"
    value="<?php echo
    htmlentities($row_rskingscentre['kingsImage2'], ENT_COMPAT,
    'UTF-8'); ?>" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Image
    Three</td>
    <td><input type="text" name="kingsImage3"
    value="<?php echo
    htmlentities($row_rskingscentre['kingsImage3'], ENT_COMPAT,
    'UTF-8'); ?>" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap"
    align="right"> </td>
    <td><input type="submit" value="Update record"
    /></td>
    </tr>
    </table>
    <p>  </p>
    <p>
    <input type="hidden" name="MM_update" value="form2" />
    <input type="hidden" name="kingsHeader" value="<?php
    echo $row_rskingscentre['kingsHeader']; ?>" />
    </p>
    </form>

    jeffoirecoupe1234 wrote:
    > Ok, i found a php image upload script that im using for
    a cms image gallery on
    > my site. But for it to work the way i need to i have to
    have certain
    > information submited into a mysql table at the same
    time. I could just make it
    > so the user types the name of the image in a second
    form, but i would rather
    > not have to as it seems a clumsy way to do things and
    opens things up to typos
    > etc.
    >
    > So, i can upload the image ok, and i can upload data to
    the table, but i dont
    > know what I have to do so that the name of the uploaded
    file is automaticly
    > inserted into the mysql table.
    >
    > The first bit of code below is the form I am using to
    upload the file to the
    > server. The second bit of code is what I am using to
    tell the server what the
    > file name is.
    >
    > How do I combine the 2 form into one? Please help. It is
    driving me to dispair.
    >
    > Attach Code
    >
    > <form enctype="multipart/form-data"
    action="uploader.php" method="POST">
    > <input type="hidden" name="MAX_FILE_SIZE"
    value="500000" />
    > Choose a file to upload: <input name="uploadedfile"
    type="file" />
    > <br />
    > <input type="submit" value="Upload File" />
    > </form>
    >
    > <form action="<?php echo $editFormAction; ?>"
    method="post" name="form2"
    > id="form2">
    > <table align="center">
    > <tr valign="baseline">
    > <td nowrap="nowrap" align="right">Image
    One</td>
    > <td><input type="text" name="kingsImage1"
    value="<?php echo
    > htmlentities($row_rskingscentre['kingsImage1'],
    ENT_COMPAT, 'UTF-8'); ?>"
    > size="32" /></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap="nowrap" align="right">Image
    Two</td>
    > <td><input type="text" name="kingsImage2"
    value="<?php echo
    > htmlentities($row_rskingscentre['kingsImage2'],
    ENT_COMPAT, 'UTF-8'); ?>"
    > size="32" /></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap="nowrap" align="right">Image
    Three</td>
    > <td><input type="text" name="kingsImage3"
    value="<?php echo
    > htmlentities($row_rskingscentre['kingsImage3'],
    ENT_COMPAT, 'UTF-8'); ?>"
    > size="32" /></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap="nowrap"
    align="right"> </td>
    > <td><input type="submit" value="Update record"
    /></td>
    > </tr>
    > </table>
    > <p>  </p>
    > <p>
    > <input type="hidden" name="MM_update" value="form2"
    />
    > <input type="hidden" name="kingsHeader"
    value="<?php echo
    > $row_rskingscentre['kingsHeader']; ?>" />
    > </p>
    > </form>
    >
    >
    >
    Hi Jeff:
    Though this does not show you how to solve this issue via a
    code
    snippett, there are a couple of extensions at WebAssist.com
    that enable
    you to do this, they are Data Assist and Digital File Pro.
    When you have
    time, take a look at these Solution Recipes (tutorials) that
    show how
    DataAssist is used and then now Digital File Pro is used in
    conjunction
    with DataAssist:
    http://www.webassist.com/professional/products/solutionrecipe/Media_139.asp
    http://www.webassist.com/professional/products/solutionrecipe/Media_112.asp
    DataAssist can be used to save time when you need to build
    database
    search and management applications quickly, and Digital File
    Pro can be
    used to include file upload functionality to your form fields
    while
    enabling you to insert your server file name into the
    database, all on
    the same page.
    enthusiastically,
    mark haynes

  • How to upload a image or flash file as blob object in a table.

    How to upload a image or flash file as blob object in a table.
    What are all the possible ways we can do it.

    Searching the forum (or google) would be my first choice, as this question pops up every now and then.
    Next without knowledge of your environment (jdev version and technology stack) it's hard to give a profound answer.
    All I can say is that it's possible.
    Timo

  • How can I increase the thumbnail size when using Safari to upload an image to a website?

    I upload many images to multiple websites and when using Safari to upload these images, the thumbnails are so small I can barely make out what the image is. I can easily figure out how to increase the thumbnail size when viewing them in Finder and set the default to my liking, but I cannot seem to find a way to do this in Safari. The last topic I saw on this was form 2013 and have not seen any update. Is there a way to do this?

    Delete all unused, invisible layers.
    Sometimes zip compression is better than jpg compression (in the pdf output settings). Zip is lossless, and works better with non gradient colour or no images.
    Flattening the image before you save it to pdf can reduce the file size if you are using jpg compression.
    Post a preview of your pdf and we can comment further on how to reduce the file size.

Maybe you are looking for

  • Error while executing ODI scenario from command prompt

    Hi all, I am trying to execute a scenario of a package( that I have created in designer) in OS command prompt in Windows in the following way- C:\ODIHOME\oracledi\bin>Startscen DIM_TECHNOLOGY_PACKAGE 001 Global LEVEL5 However I am getting the followi

  • Why do I get error : InDesign could not package the document ' name of file ' . Cannot copy necessary linked file(s).

    I am create a very basic 36 page magazine. I have never ever encounter this issue in the 10 years I have been creating these. I have been getting this issue ever since the cloud InDesign. It is making it very difficult to get my work to press. I have

  • How do I delete OS X install data

    I have installed OS X Mavericks on a external hard drive. It gives me the ability to see my macintosh hd hard drive but I can't delete anything. On another forum it said it would fix everything with the hard drive if the 'os x install data' folder wa

  • How to automatically off the push button

    how can i set the push button to be off automatically after meet certain condition. i attached simple example just to represent this problem Solved! Go to Solution. Attachments: ex.vi ‏7 KB

  • Pivot table problem

    create table mytable name varchar2(50), surname varchar2(50) insert table mytable values('mary','john') insert table mytable values('mary','baby') insert table mytable values('mary','lady') insert table mytable values('sean','kate') insert table myta