How to capture path and file info in a JSP?

Hi, I am developing an JSP in which I am trying to capture the path and file name that I can then write into a database entry.
For example in MS word when you do file > open a box pops up that you can navigate to the required folder and then click on the file you wish to open.
I would like to do something like that usign JSP.
Is this possible?
If so is there a particular java package I need to import in my JSP and what class would I use to add the file box.
I am thinking that I would put a button in the JSP which the user clicks on to open the box. When they select the required file and click OK somehow my JSP then captures that path/file name and I can use it in an SQL statement to write to the database.
Any suggestion would be great thanks.
Jason.

All you want is to upload a file from the client to the server, right?
Google around using keywords jsp+file+upload and you'll get lot of results [1]. The Apache Commons FileUpload [2] is a commonly used one.
[1] http://www.google.com/search?q=jsp+file+upload
[2] http://commons.apache.org/fileupload/

Similar Messages

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Unable to see the logical path and file created in FILE tcode from AL11 and unable to upload the file to this path from front end

    Hi Experts,
    I have created the logical path and filename in FILE tcode.I am trying to upload the pdf file to application server by using this path.But
    I am getting message like "Unable to open the file".Even I cannot find the this path in AL11 tcode.Kindly anyone advise how to upload pdf file using
    custom path and file created from FILE tcode.
    Thanks & Regards,
    Anusha.

    Hi Anusha,
    Please give as below.
    I forget to say you cannot open the PDF in AL11 and for that you need some configuration, i think it can be done using content server,not sure completely please wait for some more suggestions.
    Regards,
    Pavan

  • Path and File name of the attachment

    Hello Srm Guys,
    Where should be the Path and File name of the attachment are stored for a shopping card Item.
    Thanks
    Ram

    Hello Ram,
    Execute the function module BBP_PROCDOC_ITEM_GETDETAIL by providing the item guid,object type . Now it will populate the  et_attach importing parameter with the attatchement details.
    In the ET_ATTATCH internal table , the field PHIO_FNAME/PHIO_PATH_FILE provides the physical storage location of the document.
    Hope this info will be helpful.
    Regards,
    Mani

  • Need script to add path and file name to fillable  form

    I have a fillable pdf form that I would like to have a script that adds the path and file name to the form. This script would be in a field at the end of the document.
    I am a newbie to javascript and formcalc. The script will be the only one in the form.
    Thanks for any assistance.
    Lisa

    Hi,
    I have a sample that attach a file to the PDF and write in a text field the file name. I don´t know how to get the full path and it only works in Acrobat. To work in Adobe Reader is necessary the LC Reader Extensions to give some special permissions to the document. But, regard this, you still want the sample send me a email to [email protected]
    Best Regards,

  • How do I auto fill "file info" in photoshop cc ?

    How do I auto fill "file info" in photoshop cc ?

    If it's repeating information such as your contact and copyright information, you may wish to create a Template.
    Auto-complete is available in Photoshop CC, which is a time saver. This feature has been left out of CC 2014.
    How can I set in ps the "file info" autofill option?
    Creating Metadata Templates | Photometadata.org

  • The email address assoc. with my iTunes account is no longer valid. can't access it. need to change it in  iTunes but can't access account. even my birthdate is incorrect in iTunes...so can't log in. any suggestions on how to log in and edit info???

    the email address assoc. with my iTunes account is no longer valid. can't access it. need to change it in  iTunes but can't access account. even my birthdate is incorrect in iTunes...so can't log in. any suggestions on how to log in and edit info???

    There is nothing that you can do to get rid of the balance on your own. Contact iTunes Store Support and seek their assistance. I believe that they can reset your balance for you.
    https://expresslane.apple.com/Issues.action

  • Path and file name problem when I want to download files from html

    Hi all,
    I want to write a small program to allow users download files from jsp file
    but the following files don't work .
    <%@ page language="java" import="java.net.*,java.io.*"%>
    <%@ page import ="java.util.*"%>
    <%
    try
    String SContent = request.getParameter("click");
    String SDocName = "temp.doc"; //  out put file File Name
    ServletOutputStream stream= response.getOutputStream(); // Getting ServletOutputStream
    response.setContentType("application/msword"); // Setting content type
    response.setHeader("Content-disposition","attachment;filename=\"" +SDocName+"\""); // To pop dialog box
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(SContent));
    int c;
    while ((c = in.read()) != -1){
               stream.write(c);
    in.close();
    stream.flush();
    catch(final IOException e)
    System.out.println ( "IOException." );
    catch(Exception e1)
    System.out.println ( "Exception." );
    %>I am so confuse, what is the path and file name I sould give ? for example my click should equal to http://******/Test/display.jsp?click=00-1

    Hi all,
    I got error at
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:599)
    if I want ot download file from html file.
    String SContent = request.getParameter("click");
    if I hard code like follow it work fine.
    String SContent ="C:/Project Coding.doc";
    what mistake I make.
    Thank you!

  • LSMW - source file from Logical Path and Files?

    Hi,
    When specifing the source file (legacy data) you want to use to load from - you can choose a file from the application server.
    For the application server file does anyone know is there anyway that you can use a logical path and file to represent this source file?
    I do not see this option in LSMW and am surprised at this as it necessitates changing the LSMW in each target system.
    Thanks in advance.
    Kind regards,
    Mark

    Hi,
    When specifing the source file (legacy data) you want to use to load from - you can choose a file from the application server.
    For the application server file does anyone know is there anyway that you can use a logical path and file to represent this source file?
    I do not see this option in LSMW and am surprised at this as it necessitates changing the LSMW in each target system.
    Thanks in advance.
    Kind regards,
    Mark

  • Get path and file name from Bfile

    Hi,
    I'm using Bfile to store images in a database. Is there a way to get the path and file name of the image from Bfile, because I need to pass that information into an image processing function.
    Many thanks.
    Sheldon

    Can you use FILEISOPEN in the DBMS_LOB package?
    See http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl03prg.htm#281893
    -- CJ

  • Definnig logical path and file names

    hallow experts,
    i wont to now about definnig logical path and file names,
    did some one have something that can help me in that
    regards

    Hi Rodrigo,
    Have a look at this link... i guess it explains what you are looking for...
    http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
    regards,
    Naveen

  • Path and file name

    I am running Illustrator CS4 on Windows XP.
    I have obtained a script that inserts the file name in the bottom left of the page
    // CODE BEGIN
    var pointTextRef = app.activeDocument.textFrames.add();
    pointTextRef.contents = app.activeDocument.name;
    pointTextRef.top = 20;
    pointTextRef.left = 10;
    // CODE END
    What I would like is that it inserts the path name as well ie
    "c:\temp\file.ai"
    rather than just the file name "file.ai"
    Is there anyone out there who can help me.
    Thank You

    Hi Mark,
    Thank you for this script.
    It works fine, just as I wanted.
    Much appreciated.
    Cheers
    Eddie Frankel
    Technical Officer
    Department of Primary Industries
    55 Collins Street
    Melbourne
    GPO Box 4440
    Melbourne
    Vic. 3001
    Phone: 03 9 658 4539
    Fax: 03 9 658 4555
    Email: [email protected]
    This e-mail and any attachments may contain information that is
    confidential, legally
    privileged and/or copyright. If you are not the intended recipient, any
    use, disclosure
    distribution or reliance on the information contained in this e-mail is
    unauthorised.
    You should only re-transmit or distribute the information if you are
    authorised to do so.
    If you have received this e-mail in error please notify the Department of
    Primary Industries
    by return e-mail and destroy all copies printed or held on any computer.
    DPI does not warranty that this e-mail and any attachments are free of
    viruses.
    Muppet Mark <[email protected]>
    02/10/2009 09:25 PM
    Please respond to
    [email protected]
    To
    eddie frankel <[email protected]>
    cc
    Subject
    path and file name
    I think you want is 'fullName'
    var docRef = app.activeDocument
    var pointTextRef = docRef.textFrames.add();
    pointTextRef.contents = docRef.name + '  ' + docRef.fullName;
    pointTextRef.top = 20;
    pointTextRef.left = 10;

  • Proper way to make bulk changes the Owner ID, Path and file share credentials for my existing subscriptions, ExtensionSettings

    We are going through with an upgrade/migration to SSRS 2012 and moving everything to a different domain. We have about 200 active subscriptions running, the reports are being delivered to a file share.  What is the correct way, in bulk, to change
    the OwnerId, the Path and the FileShare Username password credentials for these subscriptions?  I see these values are being stored in Subscriptions > ExtensionSettings.  I see that the file share path and Owner wouldn't be a problem to change,
    but since I see the file share credentials are encrypted I would not be able change them directly in ExtensionSettings.  Anyone know the proper way to change the Owner ID, Path and file share credentials for my existing subscriptions without having to
    change each one of them manually in the report manager?
    Note: Reporting Services Native upgrade from SSRS 2005 to SSRS 2012.
    Thanks in advance.

    Hi Cygnus46,
    Based on my understanding, you want to change the Owner ID, Path and file share credentials for all existing subscriptions.
    In Reporting Services, the subscription information are stored in the Report Server database. In your scenario, you can go to report server database and run the query to list all the subscriptions, then modify the owner and fileshare paths in the subscriptions
    table. For more information, please refer to this article: Tip: Change the Owner of SQL Reporting Services Subscription. If you want to change
    the file share credentials for subscriptions, you can run the query provided by
    wiperzeus from this similar thread:
    Windows File Share Delivery/ SSRS 2008 R2.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Max length of VI file paths and file names

    Hi,
    Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.
    Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
    LV on?
    Sincerely,
    Mattias Ericsson

    "Mattias Ericsson" wrote in message
    news:[email protected]..
    > Hi,
    >
    > Is there a maximum allowed length of VI file paths and file names in
    > LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
    > a LLB and LabVIEW crashes each time. I have also tried to copy the VI
    > from the LLB to a temp folder with the Librarian VI, but LabVIEW
    > crashes as well. The total length of the file path is around 260
    > characters and I strongly suspect the file path length in combination
    > with LLB because when I use a shorter path the problem disappear. If I
    > use a long path without LLB (just regular VIs) a warning appear
    > "Invalid file name" instead of LabVIEW crashing.
    >
    > Does anybody know the solution to
    this problem or must I use shorter
    > filepaths? Perhaps it depends on which platform I am running LV on?
    I believe windows has a 255 character pathname (file+path) limit. We once
    had that problem because we had a long filename and a longer pathname.
    Moved the directory up a couple levels and problem solved.

  • Bought 10 gb Uploaded Iphone and IPad2, left with 2gb space.  How to view pictures and other info in ICloud?

    Bought 10 gb Uploaded Iphone and IPad2, left with 2gb space.  How to view pictures and other info in ICloud?  Can I upload documents from my desktop (Windows os)?
    Thanks.

    If you backed up your iphone to icloud, then there's a chance that doing a restore might bring back your photos.  I say "chance" because many users have tried that (assuming they had photos turned in for backups in settings), but ended up not getting back any photos.  If that happens, then they are gone. 
    Remember, you should have been syncing photos all along to a computer for archiving.  Don't trust the pictures to an icloud backup.

Maybe you are looking for

  • Problem with NVIDIA card

    Hello, I'm using a Sony VAIO-VGNFE41Z notebook with the NVIDIA GeForce Go 7600 graphics card. Approximately four days ago the card started to display artifacts on the screen even before the appearance of the VAIO logo during the BIOS initialization p

  • Calculate percentage based on checkbox results in Numbers iOS

    Using Numbers iOS, I've created a gradebook to keep track of my students' progress. I have used the Checkbox format for my results, and I would like to create a formula that will calculate a percentage based off of the checked results. What formula c

  • I need to know how to  "enable editing" a document.

    If I have a template where all I need to do is fill-up the areas like Date,vendor, product or service, or in other words a Purchase Order Form, what application do i need to do that? Sincerely. Benjamin Monge

  • R12.1 jsp error on Tax Manager

    Hi all, When accessing Tax Manager Responsibility, Tax Manager -> Tax Regime am getting this error given below. The Same Error message even occurs when Viewing Purchasing -> Supply Base -> Suppliers -> Tax Details Pls help me to sort out this issue E

  • Why can't I view the source code?

    I found a website that I would like to use as an example for my next site (except for the fonts), but when I right click the 'view source' button, nothing comes up.  I also tried it from the toolbar and nothing again.  Just curious  as to why I can't