File Name after donwload from BLOB

dear experts,
i'm a newbie in programming, just started this month.. i got problem where after i download from blob (oracle) the file name will be the same as the java class that i use to download it. How can i make the file name as it real file name rather than the java class name
For your information i use oreilly package to upload and for download i use other source code i take from internet example.

some of the code in download java class.. i use servlet...
public void doPost(....
ServletOutputStream out = response.getOutputStream();
     response.setContentType(dm_file1contenttype);
     out.write(getBlob(id));
     out.flush();
     out.close();
public byte[] getBlob(String id) {
while (rs.next()) {
          blob = rs.getBlob(1);
          bytes = blob.getBytes(1, (int) (blob.length()));
          conn.close();

Similar Messages

  • Is it Possible to Change the Jar File Names After Downloading at Client

    Hi. All
    Here I am tring to Rename Jar file Names once after JWS Downloads at Client Place. But I don't know how to do this. I Searched in so many Blogs and Forums, but i failed to get Solution for this. As when JWS downloads Jars from server, its changes file names (prefixes with "RM" and "RT"). So same way i want to change once after it downloads files. Can any body tels how to dot this. Really ... Help is appriciated
    Thnx a lot for reading the above
    Sreedhar P

    Note from other posts:
    The content and format of the cache will and do change from version to version of javaws. It is highly unadvisable to build into you application relying on the location or format.
    That being said, for 1.4.2 or 1.5.0, the location was as given: "C:\Documents and Settings\<UserID>\Application Data\Sun\Java\Deployment\cache\javaws", and in long path below that depending on the URL of the resource.
    For version 6, the cache is in : "C:\Documents and Settings\<UserID>\Application Data\Sun\Java\Deployment\cache\6.0" and then in a directory below that named "0" thry "63", depending on the hash of the URL of the resource. The name will be completely obscure, there will be one binary index file with "idx" extension, and then the actual resource will be the file of the same name w/o any extension.
    /Andy

  • Destination file characters too long (File names) , while copying from one external to another

    I have a external my book fat32 formated and a new mybook ntfs formated external as well.  Now when I copy my files from the fat32 to the ntfs external all files copy fine but some give that destination location file characters are too long, meaning that the file names are too long.  Now I could change the file names but that would conflict with programs that need that file name.  I am using vista ultimate and would like to copy all the files over from the fat32 to ntfs so I can reformat the fat32 to ntfs.  The files got on the ntfs from a simple drag and drop from my IDE NTFS internal hard drive.
    I hope you guys to tell me what to do.
    Thank you :)

    Here's the fix....for error message "your file name is too long to be copied, deleted, renamed, moved" :
    1.   problem is this: the "file name" has a limit on number of characters.....the sum of characters really includes the entire path name; you gotta shorten it first (i.e, if the total number of characters in the file name + Path name are over the
    limit, the error appears).  The deeper your file folder sub levels are, the more this problem will come up, especially when you copy to a subfolder of a subfolder/subfolder of another path ...adds to character limit)
    2.  How do you know which combined file names + path names are too long if  you are in the  middle of a copy operation and this error pops up?  Some files copied but the "long files error message" says "skip" or "cancel" ... but not which
    files are the "too long" ones.  If you hit "skip" or "cancel" the "too long" files are left behind...but are mixed in with non-offender "good" "short name" files.   Sorting thru 1000s of "good" files to find a few "bad" ones manually is impractical.
    3.   Here's how you sort out the "bad" from the "good":
    4.    Let's say you want to copy a folder ..."Football" ...that has five layers of subfolders; each subfolder contains numerous files:
      C:/1 Football / 2 teams/ 3 players/ 4 stats/ 5 injuriessidelineplayerstoolong 
           There are five levels root "1 football" with subfolders  2, 3, 4 and lastly "5 injuries"
    5.    Use "cut" and "paste"  (for example to backup all five levels to a new backup folder):
           select "1 football" ....cut....select target folder....paste 
           ("cut" command means as the files are copied to the target destination, the file is deleted from the source location)
          Hint: avoid "cut" and "paste" to a target folder that is itself a sub/sub/sub folder ...that compounds the "characters over the limit" problem ...because the characters in the sub/sub/sub folder are included in the "file name
    character limit"...instead "paste" to a C:/ root directory.
           Suppose in the middle of this operation...error pops up: "5 files have file names that are too long"  Skip or cancel?
           select "skip"  ...and let operation finish
    6.    Now go back and look at the source location: since the software allows only the "good" "short name" files to be copied (and because you "skipped" the "bad" "Long name" files so they are not copied or deleted) ...all that remains
    in the source location are the "bad" "long name files" (because "good" ones were deleted from the source location after the "cut" operation...the bad ones stick out like a sore thumb.
    7.   You will find ....all that remains in source folders are: the "bad" "too long" files; in this example the "bad" file is in level 5:
          C:/ 1 football / 2 teams /3 players /4 stats /5 injuriessidelineplayerstoolong
    8.   select folder 5 injuriessidelineplayerstoolong (that's right...select folder, not file) gotta rename the folder first.
    9.  hit F2 rename folder..folder name highlighted...delete some of the letters in the folder name:
           like this:   5 injuriessidelineplayers  ....you should delete 'toolong'....from the folder name
    10.  then go into folder 5....and do the same operation ...with the too long file name:
            hit F2 rename file....file name hightlighted...delete some of the letters
               like this:  injuriessidelineplayers.....you should delete 'toolong' from the file name
    11.  Now..."cut and paste"  the renamed file to the target backup folder.  
    The Error message will pop up again if you missed any "bad" files....for example, it will indicate "5 files too long" ....then repeat process 5 times until you fix all of them
    12.     Finally, copy the target destination files back to the source location (when you are certain all source location file folder locations are empty) 

  • CS4: get file name after saving for web

    Hello,
    I am saving a file via "save for web" with a specific file name in a specific folder maybe with a specific resolution (width x height) entered directy within this dialog window.
    Is it possible to get this path and the optionally changed resolution via Adobe script (after saving the file; or starting the script just before "save for web")?
    Thanks a lot!
    Carlos

    I don't see anyway to get the user's options from the SaveForWeb dialog. The descriptors for both charIDToTypeID( "Expr" ) and charIDToTypeID( "Mn  " ) are empty.
    But you can use the DOM to sfw. Below is a function to save jpg using sfw.
    function SaveForWeb(saveFile,jpegQuality) {
    var sfwOptions = new ExportOptionsSaveForWeb();
       sfwOptions.format = SaveDocumentType.JPEG;
       sfwOptions.includeProfile = false;
       sfwOptions.interlaced = false;
       sfwOptions.optimized = true;
       sfwOptions.quality = jpegQuality; //0-100
    activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
    Look up ExportOptionsSaveForWeb in the scripting guide for other formats.
    You would have to do the resize as an extra step when saving using the DOM.

  • RDL reports(2008).File name after using Export to Excel is not comming properly in mozilla firefox.

    I am using Export to Excel functionality in rdl report.
    File name should be "Profitabilty By Buyer". It is working as expected in IE and chrome.
    But in mozilla firefox the file name appears as "Profitabilty".
    So the issue is it doesnt consider anything after space and user requirement is such that I cant put underscore("_") also instead of space.
    Kindly suggest the proper solution.

    Hi Mukesh,
    Reporting Services, we use a Web browser to view the report that deploy to Report Service. However, not all report functionally is supported by all browsers. Such as, the print button is not supported in Mozilla Firefox. It works only in Internet Explorer
    due to it uses ActiveX for the print button.
    I have tested it on my local environment, (SQL Server Reporting Services 2008, Firefox 28.0), we cannot reproduce this issue. So the issue can be the custom setting of your browser. Since SSRS reports are not about targeting NON-IE browsers, so in your scenario,
    we recommend you use IE to view report on Report Manager.
    And you said that you cannot put underscore ("_") also instead of space. However we can do this which you can see on the screenshot below.
    Regards,
    Charlie Liao
    TechNet Community Support

  • File names after importing word document

    I'm creating webhelp by importing word document. My help is in two languages and yes i have two word documents. To keep the html filenames same for every same topic in english and arabic. I change the file names. Now i want save this setting for the project so while importing the documents again I should be able to reuse this changing filenames. So that it can be life saver for me by not repeating to change the filenames again.

    Thinking about this some more, I don't think the feature will do what you want. The filename and any formula will work according to how you paginate and will create a filename based on the heading. That will, I assume, differ from language to language.
    The only thing I can think of experimenting with is to have the headings in language one in all documents with the other language being below but not as a heading. Post import you could amend the Topic Title and Topic Heading but leave the filename. It's klunky but the best I can think of right now.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • File name after opening in Photoshop CS3

    After adjusting an image in Lightroom 1.1, I open it, reflecting the Lightroom changes, in Photoshop CS3. When I'm done tweaking the image in Photoshop CS3, I save it as a PSD file. The problem: I find that two PSD files have been saved, one with the file name (as I intended) and one with the file name with "-Edit" appended to it (before the PSD extension). How can I avoid having the second file (with the "-Edit" appended) created and saved?
    Thanks.
    Harvey

    The -edit file is the first file. That file is the method LR uses to send the image to CS3.

  • Acrobat 5.0 How do I keep the original file name after I have converted a Word doc to PDF?

    MY colleague has a certain setting in Acrobat that allows him to keep the original file name when he converts documents from Word to PDF. Every time I convert Word, Acrobat overwrites the filename and names it "untitled.pdf". I would like to retain the original name and for Acrobat to simply add the .pdf file extension to the original name. How do I do this?

    I have no idea what you are doing for sure. Does your WORD document have a name. I opened a WORD document and selected the Acrobat Distiller printer for AA5, I got the file menu for selecting the name and it was automatically filled in with the DOC changed to PDF. If you are using PDF Maker, then you will need to search there - I removed PDF Maker for AA5 years ago and can't view that part. I see the same types of options in PDF Maker for AA8.1.2 as I saw in the printer for AA5 and guess it is the same. The untitled.pdf suggests that you never saved the original DOC file so it has a name.

  • Get file name and path from  adf inputFile

    Hi,
    I use adf's inputFile component. I need to get the file name and filePath. Does anyone knows how to do that?
    Thanks in advance

    You may bind the value to an UploadedFile object and get the name from this object.
    You may use a valueChangeListener backin bean method or a managed bean.
    Here the code i just write for something similar. Note that i'm not able to test it because of a bug in 10.1.3.1 with inputFile and web.xml parameters. I still waiting for the patch.
    public void uploadedFile(ValueChangeEvent valueChangeEvent) throws IOException,
    Exception {
    final int BUFFER = 2048;
    byte data[] = new byte[BUFFER];
    int currentByte;
    String fileName;
    UploadedFile uploadedFile =
    (UploadedFile)valueChangeEvent.getNewValue();
    if (uploadedFile != null) {
    String mimeType = uploadedFile.getContentType();
    if (mimeType == "application/x-zip-compressed") {
    // get the uploaded file as a zip file
    ZipFile zipFile = new ZipFile(uploadedFile.getFilename());
    // verify the zip archive contains only one entry
    if (zipFile.size() != 1) {
    FacesContext context =
    FacesContext.getCurrentInstance();
    ResourceBundle errorMessage =
    ResourceBundle.getBundle(context.getApplication().getMessageBundle());
    Exception ZipFileContentException =
    new Exception(errorMessage.getString("error.fileUpload.zipFileContent.moreThanOneEntry").replace("{0}",
    String.valueOf(zipFile.size())));
    throw ZipFileContentException;
    // get the entries in the zip file even it is only one
    Enumeration zipFileEntries = zipFile.entries();
    // Process each entry
    while (zipFileEntries.hasMoreElements()) {
    // grab a zip file entry
    ZipEntry entry =
    (ZipEntry)zipFileEntries.nextElement();
    // check the entry is not a directory
    if (entry.isDirectory()) {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.zipFileContent.isDirectoryInsteadFile"));
    throw ZipFileContentException;
    File destFile = new File(entry.getName());
    Magic magic = new Magic();
    // getMagicMatch accepts Files or byte[],
    // which is nice if you want to test streams
    MagicMatch match = magic.getMagicMatch(destFile, true);
    if (match.getMimeType() != "application/xml") {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    match.getMimeType()));
    throw ZipFileContentException;
    //TODO get the repository directory from classification-param.xml
    BufferedInputStream is =
    new BufferedInputStream(zipFile.getInputStream(entry));
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) !=
    -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    zipFile.close();
    } else if (mimeType == "application/xml") {
    String currentEntry = uploadedFile.getFilename();
    File destFile = new File(currentEntry);
    BufferedInputStream is =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) != -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    } else {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    mimeType));
    throw ZipFileContentException;
    }

  • Copy file name and info from finder window

    I need to get the file name and file size for lots of files in lots of folders into a text file or excel file. I have found the way to copy the file path into text edit, but can't figure out how to copy all the info in a file window. Is there a way to do this?

    It's easily done with Terminal.
    cd (drag folder into Terminal window, press return). Then:
    ls -l > ~/Desktop/list.txt
    A file called "list.txt" will appear on your Desktop, containing a list of files from the folder, along with their modification dates, file sizes, and ownership/permission info.

  • Problem with getting the file name and type from OAMessageFileUploadBean

    Hi Tapash,
    I am trying the code below to get the file name and mime type from OAMessageFileUploadBean,
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Documents");
    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    String contentType = fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    But this piece of code gives errors saying that selectValue selectValue(null, java.lang.String) not found in class oracle.svc.DataObject
    Any ideas? why this code is giving error?
    Can i handle the event of browse button for OAMessageFileUploadBean?
    Regards,
    Nagesh Manda.

    Try using class oracle.cabo.ui.data.DataObject
    --Shiv                                                                                                                                                                                                       

  • Date Repeats in file name coming back from plugins

    My filename date repeats when I edit the photos in plugins (NIK plugins) from within lightroom.  For example, if the file name is 20120402DescansoGardens and I edit in four different plugins, the file names comes back as 20120402-20120402-20120402-20120402-20120402DescansoGardens.  Does this happen to anyone else?

    Check your filename template in external editing prefs.

  • CiscoWorks Shadow Directory File Name After Device Rename

    I have noticed that when a Device is renamed through Common Services --> Device and Credentials --> Device Management --> Edit Identity, it does not rename the config archive file name in the shadow directory.  Changing the Display Name, Host Name, and IP Address for Device Properties.  All of our devices are named with the IP Address of the device so we have the IP Address for the Display Name, Host Name, and IP Address.
    Example:  Device with the name of 10.10.10.10 has a config archive in the shadow directory with the file name 10.10.10.10.cfg.  When the device is renamed to 10.10.10.20 it still continues to config archive ok but keeps the file in the shadow directory as 10.10.10.10.cfg.
    Is there a way to get the config archive shadow directory file name to change?
    Thanks. 

    Hi.
    Kindly try resubmitting Device under RME (RME ->Device management -> Normal Device ->Select that particular Device and click on resubmit) and once it is back to normal state, then try to collect Archive after performing any change on the Device and see if it updates the Name of the Device under Shadow Directory.
    If above steps does not help, you need to delete and re add Device under Common Services --> Device and Credentials --> Device Management in order to get the correct name reflect under Shadow Directory.
    Kindly let me know in case you have any doubts regarding the same.
    Thanks & Regards,
    Nikhil

  • Can I include the FILE NAME when printing from Bridge?

    I'm a commercial photographer. I shoot with my camera tethered to a Mac laptop to view images immediately as I shoot. I use Bridge to view these images.
    As I shoot, we save the file by product name, and then print proofs immediately. I need to include the File Name on these prints. Is
    there a way for me to do this directly from Bridge? If not, can you think of a way using Photoshop? Or anything else? Lightroom?

    Guessing you are using Bridge CS4 you could use the Adobe Output module for
    this. It is reachable through a seperate workspace in the top menu right
    side or the left side top menu the icon most right.
    You can create different lay outs as a PDF with this but for you it should
    be one per page and select the filename (with or without extension). Just
    explore the posibilities. For CS4 you could use the updated Output Module.
    If on CS3 you could use the contact sheet script for Photoshop that in
    Bridge can be reached by the menu Tools / Photoshop / contactsheet. This
    contactsheet script is also usable for CS4, it is on the Goodies install
    disk for PSCS4
    As I shoot, we save the file by product name, and then print proofs
    immediately. I need to include the File Name on these prints. Is
    there a way for me to do this directly from Bridge? If not, can you think of a
    way using Photoshop? Or anything else? Lightroom?

  • Insert data file name into table from sql loader

    Hi All,
    I have a requirement to insert the data file name dynamically into table using sql loader.
    Example:
    sqlldr userid=username/passwword@host_string control=test_ctl.ctl data=test_data.dat
    test_ctl.ctl
    LOAD DATA
    FILED TERMINATED BY ','
    INTO TABLE test
    (empid number,
    ename varchar2(20),
    file_name varchar2(20) ---------- This should be the data file name which can be dynamic (coming from parameter)
    test_data.dat
    1,test
    2,hello
    3,world
    4,end
    Please help..
    Thanks in advance.
    Regards
    Anuj

    you'll probably have to write your control file on the fly, using a .bat or .sh file
    rem ===== file : test.bat ========
    rem
    rem ============== in pseudo speak =============
    rem
    rem
    echo LOAD DATA > test.ctl
    echo FILED TERMINATED BY ',' >> test.ctl
    echo INTO TABLE test >> test.ctl
    echo (empid number, >> test.ctl
    echo ename varchar2(20), >> test.ctl
    echo file_name constant %1% >> test.ctl
    echo ) >> test.ctl
    rem
    rem
    rem
    sqlldr userid=username/passwword@host_string control=test.ctl data=test_data.dat
    rem =============== end of file test.bat =======================
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#i1008664

Maybe you are looking for

  • Want to change ACCOUNT GROUP to BP from CRM to ECC

    Hi All, We would like to change the Account group of our (Inside/Outside sales persons) when they are replicating from CRM to ECC.  We did change the PIDE setting according to our requirement but surprisingly 10-12 BPs are not getting changed. We ope

  • ITunes Install on Multiple PC's and iTunes Match

    I'll explain what I have and what I want to do. 1.  My main PC (laptop) has iTunes 11 on it.  It is a fresh new laptop and a fresh install of iTunes.  I have sharing turned on as well as iTunes match.  This PC accesses the music files locally (stored

  • Month end processes

    hello ,     can somebody kindly lists some generic  month end processed for fi and co , we are not using ex.rates now. thnaks very much.

  • Where to find documentation related to php-oracle

    Hi , i have been working with oracle ,and with php -mysql but never with php-oracle. I would like to ask if there are any samples application with orale-php and wich i can download. Another question is wich editor is better to use to program codes? I

  • ORA-01017: invalid username/password; logon denied.  on linux

    Dear friends, i am install oracle 9i on Linux 9 and i create database manually by DBCA I can log into system as sys giving following command sys as sysdba i can select sys tables and views. but i use tns file it doesn't work sys@test as sysdba it gav