My file is not saving

Hello everyone
I used
String realPath =config.getServletContext().getRealPath("/");
to get the real path of my application.
I got the string as: /home/cascanicacom/public_html/
Now I need to create a file "write.txt" and save it under the /home/cascanicacom/public_html/ on my web server
Now please tell me where should I make the changes in the
File file = new File("write.txt"); so as to create it in the server.
I even tried:
File file = new File(realPath +"write.txt");
And when I checked in the server theres no file there.
Please!
Please advice me.

BalusC wrote:
Only invoking new File() indeed doesn't create the physical file. You have to open the stream on the file first.Thank you Sir for the reply,
How can I open the file if the file doesn't exist on the web server. My job is to create the file through codding. Even if the file exist in the web server it will overwrite it completely.
>
Anyway, didn't you see any useful exceptions or traces after doing so? Till now, there's no exception.
I tried using the
File file = new File(rootPath+"write.txt") //rootPath= getRealPath("/")
Are you looking in the right file location? No, I am just trying to create a file in the web server under the /home/cascanicacom/public_html/
Do you have the sufficient rights to write and view files? As its going to overwrite the file after every execution, so, once I create a file manually on the server and checked all the attributes of the file like read, write, etc. That was just for checking whether the reason was for the permission or not. But still the file didn't overwrite it. So that means the file just couldn't find the server path.
Do you understand how UNIX file systems work?No, I don't have much idea at all.
Please help me out BalusC

Similar Messages

  • Preview "this layered Photoshop file was not saved with a composite image" error message?

    hi, i get this message:
    in preview, when i try to open a .psd file by double-clicking it:
    "this layered Photoshop file was not saved with a composite image"
    is there any program that will open this file, that came with my new iMac?
    OS 10.9.5
    thanks!
    ps. when i clicked all through help on my Mac, it would not tell me what i needed to know.
    So, is this forum the best way to find actual useful info?

    Thank you Chris,for the correct  answer - Best, Bob

  • When I render a video Pre Elements 12 or 13 and save it to work on later. When I bring it back up the rendered file is not saved. I have to render it again. Can it be saved. Pre Ele 1 would save.

    when I render a video Pre Elements 12 or 13 and save it to work on later. When I bring it back up the rendered file is not saved. I have to render it again. Can it be saved. Pre Ele 1 would save.

    [discussion moved to Photoshop Elements forum]

  • File Info not saving in PS

    Upon entering File Info and saving the image in Photoshop, all metadata disappears. However, If I apply a metadata template in Bridge, the metadata stays. What may be causing the File Info to not save with the image in PS?
    Usig Bridge would be okay, however, I want to create layered images and keep all the metadata. If I attempt to do so in PS, the metadata for all image layers disappear.

    PNG file format does not support layers. Even Layer document that support layers may well not have meta data for all images used within a composite. Composites images made using Photoshop place to place in image files as smart object layers may have meta data for placed in image files in the smart object layer's embedded object but that metadata would not be available for use within Photoshop. You would need to open the embedded object in the appropriate application or plug-in to get at that metadata. In fact a composite image file with image file meta data is most likely for the meta data of base image used when the composite image files was created.

  • I am gettting a notice that my library file is not saving because there is no memory. What is this?

    My itunes is telling me that it is not saving my library file because no memory. What is this?

    Firefox 16 versions still work with your OS X 10.5 operating system, but that is the last version that will work.<br />
    Firefox 17 will require OS X 10.6 and later.<br />
    You can see the Firefox 17 (currently in beta) system requirements here:
    http://www.mozilla.org/en-US/firefox/17.0/system-requirements/

  • XMP Files missing/not saved?

    Please pardon the post of this redundant - I searched and couldn't find anything that helped...
    I'm using Lightroom 2.6 on Windows Vista. I've toggled the xmp switch so that XMP files should be saved.
    I make changes to metadata - primarily keywords, location, captions, etc., and when I go to the folder where the images are stored, there are no xmp files. I did a hard drive search for *.xmp and found old files from a LRv1 catalog, but not for those files I just edited.
    Other than the Edit Catalog Settings Metadata switch, is there some other place these files could be written to?
    Thanks in advance.
    Clayton

    For raw camera files LR will create .xmp files and for the others, dng, jpeg, tiff the data is stored within the actual file.

  • Imported files are not saving in Library

    When I import a video from a tape or a file based camera the files aren't saved properly.

    Can you be more specific?  What do you mean, "aren't saved properly"?  How are they being saved?

  • File Info not saved (.gif) (Ps CS6 Extended, Mac)

    I'm not certain that I've been building my workflow properly before, so if this was not supposed to be supported, I'm open to that possibility:
    Modifying the "file info" for a gif file (in my case, "General" tab, "Document Title" and "Description") doesn't actually get saved with the file - or, at least, if it is saved, it's not visible when re-opening the file.
    I believe that I understood that metadata for .png format isn't supported, but I thought that .gif was. 
    (Test case is easy: open .gif file, add a Title and Description, save, and re-open - information is gone).
    Thanks for any help anyone has...

    hi Chris & thank you for your response
    it doesn't seem possible to add File > Info to a .png image in Photoshop itself. i've tried it a few different ways.
    (shoot, actually i should try adding it again in Ps to a .png file and then see if Bridge can read it. hmmmm??)
    in an other thread: [ http://forums.adobe.com/message/5642141#5642141 ] Gene told me that i could select Copyright and Contact Info from the Metadata drop down menu in the Save for Web panel to add the info to a .png image but this didn't work.
    i don't know if Ps is having one of its "fits" or what but nothing seems to be working.
    after a bit Gene was able to tell me that i can add File Info to .png files in the Bridge Cs6 or CC (no idea what the difference is between Ps Cs6 and Ps CC) and so i tried that and it worked.
    however, it appears that Ps still cannot read the data/info when the .png image is opened in Ps itself. Only readable in Bridge.
    which brings me to an other Q ... what's the point of Copyright info that can't be read? i am not being sarcastic i just really don't understand. granted, i need to read up on this topic but was hoping you could share your thoughts/knowledge w/me   oh, and if you have any handy links i would also much appreciate it. thanx 4 ur help!!

  • "Date Modified" info changes even if file is not saved (MS Office 2008)

    I recently upgraded from Office for Mac 2004 to the 2008 version (v12.2.4). Since upgrading, I've encountered the following issue that is a huge problem. Me and several people in my office need to access Word .doc files on our network. These files are all organized in folders, and within those folders, the files are organized and sorted by the Modified Date (most recent at the top). Now...if you open an old .doc file for whatever reason and then close it (WITHOUT saving), the Modified Date will change to the current date and time. In Office 2004, the Modified Date remained unchanged until you click Save. This happens with the autosave feature turned on or off, so that is not a factor. The Modified Date changes if you open a file and immediately close it or if you leave it open for several minutes before closing. This is a huge issue for our company, as the organization of our files is becoming more and more distorted as we access these .doc files many times per day. For what it's worth, this does not happen with .xls files, only Word files.
    I am not sure if this issue has ever been resolved. I've done some research and have found no solution. This is the only relevant thread I've found for this issue: http://discussions.apple.com/thread.jspa?threadID=1029626
    Any suggestions???
    Message was edited by: ebelp

    Suggest you post your question on Microsoft's forums, as Apple discussions only provide support for Apple produts:
    http://www.officeformac.com/productforums

  • Keynote files are not saving in iCloud for access by other devices

    I have a Macbook Pro and an iMac.  When I save a Keynote presentation on the cloud, so that I can access it from the other device, I can see that the file, but there is a message below it that says "waiting". 

    I just can't get a keynote file on my Mac to show up in iCloud on the web or on my new iPad Air 2.
    The file is in the "mobile documents" folder but it is NOT showing up on my iPad. I need this for a presentation tomorrow on my iPad.
    There's no indication on my Mac that there is any problem. It just doesn't show up on my iPad, where I need it.

  • Meta-data changes on video-files 2GB not saved when on NAS

    Hi,
    the following happes to me since a few days in itunes:
    When I try to change e.g. the title-tag of a *.m4v from "Winter 2013" to "Winterholiday 2014" the changed name gets displayed,
    but if I call the edit-window (CMD-i) again the old name appears again.
    I investigated and found the following, experimenting with 10 files of different size & video-types:
    -If the file is stored on the MAC's HD, everything works as expected, no problems.
    -If the file ist stored on a NAS, the problems comes up, if the file is larger than 2GB
    -If the file is stored on a network-share of an other computer, problem comes up, if file is larger the 2GB
    -No difference, if the share comes as AFP or SMB or NFS
    I also tried setting up the NAS, no help...the only thing which solved the problem was downgrading to iTunes 10.7...which is not really usefull if one wants to use the iTunes Store
    Any hints what I could try further ?
    Regards
    Christian

    Hi.
    How are the rights configured to be inherited? Could you do a "icacls <folder>" on each level and post it back.
    Also worth considering is that this is a Linux Samba system, so it might not work as a regular windows system.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. Even if you are not the author of a thread you can always help others by voting as Helpful. This can
    be beneficial to other community members reading the thread.
    Oscar Virot

  • Recent files list not saved or updated

    I've just noticed that my Acrobat is no longer saving Recent files.
    I don't know what the problem is, but my settings are set to remember 10 files and the organizer to remeber for 30 days.
    How can I fix this problem?
    System:
    Windows XP Professional SP2
    Acrobat 3D 8.1.0
    Thank you

    Hi Bert ,
    You might want to report for a possible bug.Please refer to the following link for the same.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&loc=en
    Regards
    Sukrit Dhingra

  • File is not saving in local drive when I run thru AS

    When I run my forms in my local machine, I can save my reports in pdf format to my local drive C:\
    Now I transferred my forms in the application server. When I run the form and generated the reports, it was saved in server's drive C:\
    It's hard coded, I have C:\ as my path to save my reports. But I want it to save in my local drive, not in server. Any idea how to do this?

    The Reports Server cannot access your local PC. So, you first need to store the output on the application server (AS) and then copy it to the PC. You can use webutil for this. Search this forum or Google for webutil_file_transfer.as_to_client.

  • Converting Publisher to PDF file is not saving color text

    I am trying to convert files in Publisher 2007 to PDF. When I save the document to PDF, the color fonts are saved in black instead of the original color.  How can I fix this?  Color backgrounds are saved correctly.  It is just the text.
    Thank you.

    The fonts I am using are called Willow and Baskerville Old Face.  They are both shown normally.  I did go into the preferences and the accessibility category and clicked on the replace document colors.  I chose a text color that matched the original in the Publisher document.  That changed the text color in the PDF document but the background went to white.  I cannot match the background color in the pub document with the PDF color choices.  It would be nice if when converting I wouldn't have to change any color settings.  Any suggestions?
    Thank you for your help.

  • 'Open with'/'Always open with' file settings not saved after Mac get's shut down.

    Every time I restart the computer, I have to re-change the 'open with' settings to files. How do you get the Mac to remember the settings after the computer is shut down. It used to not have this problem.

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    on Terminal does nothing.

Maybe you are looking for