Creating an File in the ViewController folder

Hello everybody
In my usecase I have to create a file which I'll have to be able to access for download, and since I won't be able to have access to the server and I won't know the location of my deploument I have to create that file in a folder named Reports, which I created in the WebContent of my ViewController.
Do you know how can I create the file there?
Here is my sample code:
File outPutPDF = new File ("SOMETHING//Reports//myFile.pdf");Can you tell me how can I get the path which I'll put instead of "SOMETHING"?
Thank you in advance
Angel

Another easy way to save files into the "hidden" Unix folders that should work in most GUI applications...
When you're in the standard save dialog press <Command><Shift>G (just like Finder's "Go -> Go to folder..." menu item). You'll get the same "Go to folder" dialog and can just type in "/etc" to get into that folder, then save your file.
Steve

Similar Messages

  • Creating a file in the /etc/folder?

    To install MySQL I'm following the instructions on http://stringfoo.com/2007/11/05/serversetup_onleopard/
    Step 8 is to write a four-line file and save it in the directory /etc/. BBEdit has a menu item for "Open Hidden" that can open files in that directory, but I'm stumped how to save a new file there. I'm logged in as a administrator. Dreamweaver can open files from that directory, but not save a new file there. The terminal can open files in that directory and I see "mkdir" for creating a directory there but I don't see a command for making a file. I searched help files but couldn't find anything.

    Another easy way to save files into the "hidden" Unix folders that should work in most GUI applications...
    When you're in the standard save dialog press <Command><Shift>G (just like Finder's "Go -> Go to folder..." menu item). You'll get the same "Go to folder" dialog and can just type in "/etc" to get into that folder, then save your file.
    Steve

  • I want to open a domain.site2 file outside the default folder (User/Library/Application Support/iWeb) with iWeb11, but iWeb only opens the domain file in the default folder. If I delete the default domain file, iWeb wants to create a new site. Help please

    I want to open a domain.site2 file outside the default folder (User/Library/Application Support/iWeb) with iWeb11, but iWeb only opens the domain file in the default folder. If I delete the default domain file, iWeb wants to create a new site. Does anyone have the same problem or know how to fix it?

    In Lion the Finder folder is now invisible.  To make it permanetely visible enter the following in the Terminal applicaiton window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    For opening your domain file in Lion for the first time or to switch between multiple domain files  Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an applicaiton.
    Just launch the applicaiton, find and select the domain file you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    OT

  • I am using an iMac and i am selling it tomorrow. So i am trying to back up all my files on my transcend external HD 500GB. I am not able to create a folder in the transcend and also even if I try to copy a file in the transcend folder. It just wont happen

    I am using an iMac and i am selling it tomorrow. So i am trying to back up all my files on my transcend external HD 500GB. I am not able to create a folder in the transcend and also even if I try to copy a file in the transcend folder. It just wont happen. Please help !!
    My transcend HD is on read only mode I guess. What to do? I dont have a windows computer to check and I need to create the back up right now..

    Welcome to Apple Support Communities
    It looks like the external disk is formatted in NTFS, a format that OS X can't write in. The solution is to format the external drive in "Mac OS Extended (Journaled)" (if you are going to get a Mac), or "MS-DOS (FAT)" (if you are going to get a PC) as Format in Disk Utility > http://pondini.org/OSX/DU1.html
    Then, you will be able to copy the files you need to the external drive. Note that "MS-DOS (FAT)" doesn't support files bigger than 4 GB.
    <Edited By Host>

  • Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ask in the ID forum and be much more specific about your configuration. there could be any number of reasons why manifests, temp files or restore files are created.
    Mylenium

  • My ISP is telling me that iWeb is putting my files in the wrong folder?

    First time trying to publish a website! I am trying to upload my iWeb site files via FTP from a folder that was created by iWeb. My ISP is telling me that the files are being uploaded, but to a sun folder that is not the root directory. They have pushed me back to Apple to resolve. Any help would be apprecited.

    Hello,
    I not sure I understand your problem.
    Are you using the "Publish to a Folder…" command to publish into a site that you connected to with the Finder opening a FTP site?
    I assume the server in question is a Sun server.
    Until I get the answer to my question, let me point out a one thing that could be your problem.
    When iWeb publishes a site, it places into a folder (directory) named to match the name of the web site in iWeb. I referring to the first name in the left column. It defaults to "Site". But, iWeb does put an index.html file in the same folder, which should point web browsers directly into your web site.
    You can remove the contents of the folder and pull it up to the same level with any problem. So, everything in the "Site" folder would be placed at the same level as the "Site" folder.
    By the way, there is a reason for iWeb publishing into a subfolder, because can have multiple web sites in one file. Each site has its own folder.

  • Can I include raw files into the installer folder with LV application builder?

    Hello,
    I have created a batch file that will run at the end of the installer, which will copy over some raw configuration files into the source destination so that the configuration files can be customized for each end user without rebuilding the installer with application builder. I also have an autorun.inf so the installer will automatically run when the user installs the CD.  
    However I would like to have some default configuration files and an autorun.inf file that will be automatically added to the installer "volume" folder using the application builder. 
    However I don't see a way to include raw files in the "volume" folder. It appears all source files in the application builder are embedded into the binary files.
    Please let me know if this is possible with the current application builder.
    Regards,
    Russell
    Engineering Team Leader
    G Systems, www.gsystems.com
    Certified LabVIEW Architect
    Certified Professional Instructor

    Russel,
    i think this link might give you some good hints....
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Telling ID CS5 to seek a linked file in the current folder

    For at least 5 years (and all the versions of ID), I've been unable to set up a link on text or a graphic that, when clicked, will open another PDF, because I want Acrobat Reader to look for the new PDF file in the same folder/directory as the current PDF.
    For all those years, my workaround has been to create the PDF and then in Acrobat use the Link tool (Tools > Advanced Editing > Link Tool) to select a rectangle over the text or graphic and set up a link to the file in the current directory. When I do the link this way, then save the PDF, then move the PDF to a different computer, Acrobat Reader can find the file in the current directory, even though the explicit path in the link is to a directory that does not exist on this second computer.
    So, today, I thought I'd see whether ID CS5 now sets up what I want. I selected some text, selected New Hyperlink from the Hyperlinks menu, told it I wanted to open a file. I have tried two seperate ways to describe the file, neither of which allows Acrobat Reader to correctly find the file:
    I browsed to the file (mnd.pdf) in the current directory where both the x.indd file is and the x.pdf file will be. When I take the finished x.pdf file to a new computer and click on the link, Reader puts up an error it cannot find the file, and it names the explicit path from the first computer (which intentionally does not exist on the second computer).
    I typed in ".\mnd.pdf" as the standard notation meaning to look in the current directory. In this case, Reader on the second computer does not put up an error, but no file opens. Basically, nothing happens when I click on the link (except for the warning asking me wheher I want to allow this operation).
    Bottom line questions: How can I set up a link in ID CS5 that will always look for a file named "MND.pdf" and always in the same directory as the currently open PDF? I know I can make it happen in Acrobat 9, but it's inefficient to have to set up the link every time I re-create a PDF instead of once in the InDesign file.
    Thanks,
    John

    Hi, Jongware,
    It is a bug since CS4, agravated in CS5, because until CS3 it worked very well.
    In fact, it worked through out a lot of pages. I think this was not created only to pages side-by-side but in fact to those articles that continued several pages ahead. So, in a magazine, when one has to break an article and continue this article in other page, one could (and still can) put a text frame in the of the first part of the article and type "Continue on [next page marker]". Then link this text frame with a new text frame on the page where the article continues, (on top of 2nd part of the article) and type "Continued from [previous page marker]".
    This situation – where text frames are in the document pages – still works fine.
    The problem is when this is a constant and you want to put it in master pages, and now it simply does't work. I mean, when every odd or even pages have both numbers. For me, it's a major problem, because several of my clients just love this!
    Is anyone of Adobe reading this? Are you going to help us and fix this problem, please?...

  • HT1751 After "Restoring iTunes Library Backup" it wont link to the files in the iTunes folder. I've followed the correct procedure, and iTunes lists all my music correctly (but with no artwork), but can't locate any of the files. Using Windows 7. Help ple

    After "Restoring iTunes Library backup" it wont link to the files in the iTunes folder. I've followed the procedure as described, and the iTunes folder is in the correct location. iTunes lists all my music correctly (albeit with no artwork), but can't locate any of the files.
    I've been restoring my iTunes folder from a backup hard drive to a new computer on which I've downloaded the latest iTunes (10.7). If this is a newer version than the one I backed up with could this be the problem? (I had the latest (to my knowledge) iTunes when I backed up the folder about 3 weeks ago, was this version 10.7?)
    Or is the version of iTunes (within recent updates) not an issue when restoring a library?
    Using Windows 7.
    Any help please?

    From the top of the page where the scripts live...
    The general method of use is to download the script to a folder of your choice, e.g. your Desktop, Downloads folder or create a folder at ...\iTunes\Scripts. Select a playlist or highlight some tracks in iTunes and then double-click on the script to execute it. If no specific tracks are selected the script will try to work with all tracks in the current playlist. Some scripts offer a choice of track by track confirmation of changes or fully automatic processing of the selection. Many of the scripts can optionally display a progress bar while running.
    You are strongly advised to backup your entire library, or at the very least the iTunes Library.itl file, before use. Test the behaviour of your chosen script on a small group of files first to make sure it does what you want before applying it to large numbers of files.
    Most builds of Windows will execute *.vbs scripts when you double-click them. If that doesn't happen then you might need to visit the Add/Remove Programs or Programs & Features control panel to enable the Windows Scripting Host. I can track down details if you have issues.
    Backing up and restoring data is an area that is often glossed over. Most people don't try to learn much about it until they've lost something important. (Me too )
    If your iTunes library was in the usual layout then normally copying the whole iTunes folder from the User's Music folder in the old computer to the User's Music folder in the new one will usually work fine. Ideally this is done before iTunes is installed so that there is no empty library to replace, and all settings are picked up from the old library. This post contains more details.
    tt2

  • How to read multiple files in the same folder?

    Suppose I have 100 txt files in the same folder, and I want to read them one by one. (order is not important). File name is also part of the information I want.
    How to do that?
    Thanks

    You need to use the directory to create a File (use the path name, w/o a file name). Then you need to ask for a list() (array of String containing name). To do that you'll need to implement the FilenameFilter interface, writing an accept() method that returns true if the file's name ends with ".txt".
    If that's not perfectly clear, try the java.io API docs and return more specific questions.

  • Placing the file in the Dynamic folder

    Dear All,
    We are having the some requirment like.
    We developed one Adaptermodule to pick up the Excel sheet and reads and create one file for each sheet. These files are placing in one Target folder.
    Here we are developing the one more communication channel to pickup the file from this folder and trying to place the file in the particular folder based on the File name.
    Now my requirement is we need to place the file in the Target folder based on the File Name.
    For ex if the File name is INT0001.txt then we need to place this file in usr\sap\450\in\INT0001\  folder and
    if the file name is HIRING.txt then we need to place the file in usr\sap\450\in\HIRING\
    if the file name is INT009.txt then we need to place the file in usr\sap\450\in\INT009\
    Here we are not using any IR objects in this development.
    Please give any suggistions to solve this problem.
    Regards
    Goli Sridhar

    Hi,
      Try Variable Substitution method.Refer the link for use of Variable Substitution..
    [http://help.sap.com/saphelp_nw70/helpdata/EN/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
    In file access parameter you should select create target directory.
    you should have read,write access for creating folder.
    Regards,
    Prakasu

  • UDF to copy the file from the archive folder to the source folder

    HI,
    I need a UDF to copy the xml file from the archive folder to the source folder. I dont want to create a new comm channel
    Regards,
    Varun
    Edited by: Varun Reddy on Sep 15, 2009 11:23 AM

    Hi Varun,
    do you want to copy or move the files??
    Also can you explain the time when this movement should happen? this gives a little insight on the problem and also some optimum solutions can be suggested
    Regards
    Suraj

  • How can i stop the Action Wizard from putting the original file into the Source folder with my changed documents?

    How can i stop the Action Wizard from putting the original file into the Source folder with my changed documents?

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • [svn:bz-trunk] 18055: Moved files to the correct folder

    Revision: 18055
    Revision: 18055
    Author:   [email protected]
    Date:     2010-10-07 04:20:08 -0700 (Thu, 07 Oct 2010)
    Log Message:
    Moved files to the correct folder
    Added Paths:
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds-spring.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds-spring.xml.ins tall
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/ds-console.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/ds-console.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/qa-manual.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/qa-regress.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples-spring.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples-spring.xml.ins tall
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/team.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/localhost.keystore
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/tomcat-users.xml.install
    Removed Paths:
        blazeds/trunk/servers/apache-tomcat-6.0.26/Catalina/
        blazeds/trunk/servers/apache-tomcat-6.0.26/localhost.keystore
        blazeds/trunk/servers/apache-tomcat-6.0.26/tomcat-users.xml.install

    Unless you are an Apple developer, the only way I know is to submit feedback via https://www.apple.com/feedback/itunesapp.html
    Here's the feedback I just submitted:
    Subject: Library organization bug in iTunes 12.0.1.26 for Windows x64
    I Have Feedback About: Software or Hardware Compatibility
    Comments:
    Hi,
    I have my iTunes library organized into subfolders (Music, Movies, TV Shows, and so on). When I add new video media to iTunes, either by "drag and drop," or placing a file into the "Automatically Add to iTunes" folder, the new media file is placed in the "Home Videos" folder. Then, after changing the metadata using the "Get Info" mechanism, the metadata is updated; however, the file is not moved out of the "Home Videos" folder. A new folder is created properly under "Movies" or "TV Shows" (depending on the type), yet iTunes isn't taking the final step of moving the file into that folder.
    I've validated this behavior on two different Windows systems.
    iTunes 12.0.1.26 running on OS X 10.10 (Yosemite) moves the files properly, so this issue looks to be specific to the Windows version.

  • Nothing shows up on my Desktop. I can put a file into the Desktop folder but it will not appear on the DTop. The HarDrive is not on the DTop either.

    Nothing appears on my Desktop. The Finder seems to work, so I can place a file into the DTop folder, but nothing appears on the DTop, not even the HarDrive.

    You can temporarily hide the crap on your desktop. Edit the CreateDesktop key in com.apple.finder:
    defaults write com.apple.finder CreateDesktop -bool false && killall Finder
    Then, to get my clutter back:
    defaults write com.apple.finder CreateDesktop -bool true && killall Finder

Maybe you are looking for

  • Is there any free software for reading PDF in BB8300

    Can anyone advice me a free PDF reader for BB8300, the eOffice is too expensive;(

  • Question regarding SAP query (SQ01& SQ02)

    Hello everyone, I have been assigned a task of creating a SAP query in SQ01. The report requires me to incorporate a drill down functionality. i.e. when I double click on a material I should be able to see the components of that material. My question

  • Deadlock detected in one single insert

              We have a deadlock problem in our application, we are using           weblogic server 6 and Oracle 8 database, when running to a           ceartain time, oracle will detect a deadlock problem, actually           from the stack trace, it is

  • URLConnection with large amount of data causes OutOfMemoryError: Java heap

    I am setting up a system where my customers can sent me their data files to my server. If I use a simple socket with a server permanently running on a chosen port, my customers are able to transfer files of any size without problem. However, If I ado

  • Why cant I open adobe reader x

    I can't open adobe reader x 10.1.4.  It wont open previously downloaded and I get a blank page on my browser.  I've turned off the protect mode.