Why does the text gets created in tomcat base directory?

Hi friends,
can anybody tell me when i create a text file abc.txt from my servlet from the application base
c:\tomcat6\webapps\filterApplication\ ,
the text file gets created in c:\tomcat6\abc.txt
I want the text be created relative to the application i.e. c:\tomcat6\webapps\filterApplication\abc.txt , so that my
code will be portable.
In summary :
file being created => c:\tomcat6\abc.txt
expected location=> c:\tomcat6\webapps\filterApplication\abc.txt
my file write code within my servlet:
FileWriter fw = new FileWriter("abc.txt");
fw.write("Some entry text here---");
fw.close();
thx.
--Sujoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

one query: if file is created relative to Java and Tomcat starts from bin directory, them
file should have been created in c:\tomcat6\bin\abc.txt,
NOT at c:\tomcat6\abc.txt
Am I write?
--Sujoy                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • HT203167 Why do files that I have organized into folders not stay in their folders after closing and reopening iTunes? And Why does the renaming get undone? I do this in iTunes Media/ Music.

    Why do files that I have organized into folders not stay in their folders after closing and reopening iTunes? And Why does the renaming get undone? I do this in iTunes Media/ Music.

    I recently had to reinstall my software for a
    dell computer a dell latitude d 830, then after installing all of my software and such including itunes the player did well even record to disks with no problems now that my system has done alot of updating of system files....now the itunes does not burn to my cd...error message 2131 this time
    The 2131 usually indicates firmware needs to be updated on a drive.
    Head to your drivers and downloads page for your latitude at Dell, and check for updates to your firmware for your optical drives. If you're behind and you update, does that clear up the 2131?

  • When does the horizontalScrollBar get created on a List?

    When does the horizontalScrollBar get created on a List?
    The scroller is created, but the scrollbar isn't created yet and I get an error:
    I have a spark List:
    <s:List id="list" creationComplete="creationCompleteHandler(event)">
            <s:layout>
                <s:HorizontalLayout  />
            </s:layout>
    </s:List>
    private function creationCompleteHandler(event:FlexEvent):void {
         (event.currentTarget as List).scroller.addEventListener( FlexEvent.UPDATE_COMPLETE, onScrollerComplete );
    // these don't trigger anything!
    //    (event.currentTarget as List).scroller.addEventListener(FlexEvent.CREATION_COMPLETE , onScrollerComplete );
    //    (event.currentTarget as List).scroller.addEventListener(Event.ADDED_TO_STAGE , onScrollerComplete );
    private function onScrollerComplete(event:Event):void {
         // horizontalScrollBar still null at this point - how can I use it?   
         // I want to set the style, but it's not created yet!
         // event.currentTarget.scroller.horizontalScrollBar.setStyle("repeatInterval", 600);

    I just realized that
    this.setIconImage(new ImageIcon("image.jpg").getImage())
    did not create the icon for my saved files.
    So what did create it? I did not program it!
    However, I happen to have an icon file Ananya.ico where I have my java project. I use if for my installation file. Did Java use this icon?
    Please help! Thanks!

  • How does the icon get created for a saved file

    In my program I allow saving files using JFileChooser and ActionListener.
    In the constructor of the main class which extends JFrame I also set an icon by saying:
    this.setIconImage(new ImageIcon("image.jpg").getImage());
    This does not only set an icon on the title bar and the minimized window, it also creates an icon on my saved files. However, the image quality for the icon on my saved files is bad, even though the image quality for the other icons is ok. The size of the icon image I am providing is close to the size of the icon image on my saved files.
    How did the icon get created for my saved files? Is it possible to improve the image quality?
    Thanks for looking at this!

    I just realized that
    this.setIconImage(new ImageIcon("image.jpg").getImage())
    did not create the icon for my saved files.
    So what did create it? I did not program it!
    However, I happen to have an icon file Ananya.ico where I have my java project. I use if for my installation file. Did Java use this icon?
    Please help! Thanks!

  • Why does the text used in Flash file gets cut off in swf?

    Please help.
    I am using some text in FLA and when I test movie or publish swf. I see the end of the last word in the text line cut off.
    I tried putting extra space after that and that solved the problem yesterday but today again I face the same problem and the problem is not getting solved with the same solution.
    Does anybody know why it's happening?
    Please let me know.
    Thanks in advance.

    one query: if file is created relative to Java and Tomcat starts from bin directory, them
    file should have been created in c:\tomcat6\bin\abc.txt,
    NOT at c:\tomcat6\abc.txt
    Am I write?
    --Sujoy                                                                                                                                                                                                                                                                                                                                                                                                               

  • When using classic dialog controls in labview 7.1 why does the text color that I have selected always stays black?

    I have an older program created in LV 6.0.2 that uses dialog buttons. The text color is red or blue. When I load it into LV 7.1 the color stays black. When I edit text I can see that the color is correct but it will not display the color when I leave edit mode on the control. Even if I select a new button from the classic tools pallete "dialog controls" I am unable to change the text color.
    What is happening? Why does LV 7.1 prevent this text color change?
    Roger

    The dialog control colors are set by the operating system so they match other controls that the OS generates. So in LabVIEW 6, they were actually not behaving correctly.
    The following text is from the LabVIEW help on Dialog controls.
    "You cannot customize the appearance of the dialog spin control, slide controls, or progress bars because the controls and indicators use platform-specific drawing functions that do not support customization. You also cannot use Property Nodes and Invoke Nodes to customize the appearance of these controls and indicators."
    If you need different text color, you'll have to use the non dialog controls.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Why does the menu get cut off even if the project is widesrcreen?

    I made a widescreen project in iMovie, exported it to iDVD, and chose a widescreen theme. It looked fine on my computer but when I burned it and played it on my home DVD player, the words were cut off. I also noticed that when played on some TVs, my movie (although widescreen) played as full screen and therefore, cut off some of the footage. Does anyone know how to fix this?

    HOW TO MAINTAIN 16:9 ASPECT FROM IMPORT TO BURN
    This is the way I do it. There is no compulsion on you to do it my way, but this works (for me). I started this method before iMovie and iDVD were upgraded to 6.0.3, and because not all elements of the various iDVD themes (particularly the pre-iDVD 6 ones) are consistent in keeping to 16:9 throughout the process.
    The widescreen preview works just fine when you check your finished project within iDVD. The problem only happens when you either burn a project or save it to an image.
    A bug in iDVD 6, particularly when working with PAL, and which has been reported to Apple, is that the sub-menus in many of the themes (the chapter settings) default to 4:3 aspect, NTSC and mpeg 1, instead of the desired 16:9 in mpeg 2 in PAL. This may be partly a leftover from iDVD 5 or even a newer ‘feature’ of iDVD 6. Either way, it is annoying when it happens, and we must hope Apple cure it in iDVD 7. In the meantime here is my failsafe workaround, which sounds a lot more complicated when reading about it, that it is in practise.
    Living in the UK, I use PAL (25 fps). Wherever you see a reference to PAL (25 fps) in the following you may substitute NTSC (30 fps) in the various settings mentioned (if you don’t live in Europe), the basic idea is the same. I still use this method, and take these steps, regardless of whether it is always necessary. Worst case scenario: it would have worked anyway. Best case scenario: it works perfectly where it otherwise wouldn’t!
    The object of the exercise is therefore to ‘fix’ all constituent parts of the project (video, titles, theme, effects, even audio!) in the desired 16:9 aspect to avoid producing a DVD where the movie is in 16:9 and the menu is in 4:3 or where other irritating surprises lurk in your project, which you only discover after burning a coaster!
    First go to http://www.mydvdedit.com/index.php?lang=english and download myDVDedit. This is shareware although the download is free. Send the guy a few dollars/euros, he deserves it. While you are there, read all about it. Now install it in your Applications Folder. You will need it later.
    You have finished your iMovie project with music, transitions and so on, and saved it to you Movies Folder. Before you started the project you naturally set it to DV Widescreen.
    Open iDVD. Give the project a name, and save it as Widescreen if it didn’t default to the same aspect as your iMovie project. Now import the iMovie project into iDVD, choose a theme (any theme you like, even if it prefers to stay at 4:3) and save the project. Do what you would normally do to the theme and its drop zones. Save the project.
    Now save as Disk Image on your desktop. Leave it there for the moment when it has finished/appeared.
    Open your Movies Folder. Create a new folder. Name it PROJECTNAME – TS FILES (where ‘projectname’ is the name of your project!). Close the folder. You can of course call it anything you like, but this aids identification.
    Now double-click the disk image on your desktop. It contains two folders: AUDIO_TS (which is empty, but please pretend that it isn’t) and VIDEO_TS. Drag and drop these to the folder you created in your Movies Folder. (This takes a moment).
    Click on the AUDIO_TS folder and go to Get Info in the file menu. Right down the bottom is where you have to change the permissions. Under ‘Ownership & Permissions’ change this from Read Only to Read & Write. Click the small triangle next to Details, scroll down and click on ‘Apply to enclosed items’. You will be asked for your root password. Close the get info window, and now click on the VIDEO_TS folder and do the same. Close the Projectname-TS Files folder. You have now allowed yourself to change the properties of the contents of those folders, which leads us to the next all-important step.
    Open myDVDedit. Go to File and open the projectname TS Files folder. By all means stare at it shock and awe, but don’t bother finding out what it can do, except for the following:
    Top left you fill see a list of files. Lower centre you have a large window. On the vertical menu to the left of that, click te middle one (VTS or VMG).
    In the window at the top left, ignore ‘First Play’ (if there was anything to correct in that, myDVDedit will have done so and told you).
    Click on VMG Menu en (English). Now the whole thing springs to life.
    Set Coding Mode to MPEG-2 (if it isn’t already)
    Set Standard to PAL (or NTSC if that is what you want)
    Set Aspect to 16:9 (not any of the other options)
    Now save the file.
    Click on VTS Menu 1 en (English) and repeat as above.
    Click on VTS Menu 2 and repeat as above.
    You have now permanently ‘fixed’ the entire contents of the TS folder (the disk image) in 16:9 aspect. Close myDVDedit – you won’t need it again until the next project!
    If you have Toast 7 Titanium, open it. ‘Select DVD-Video from VIDEO_TS’. Choose Select from the main Toast window and select your projectname-TS Files folder. You are now ready to burn! You can set the burn speed (2x recommended) before the burn commences. Allow Toast to verify the burn before you eject the DVD-R disk.
    If you don’t have Toast 7, then I assume you can burn the projectname-TS Files folder (disk image) via Disk Utility. I say ‘assume’ only because I have never tried it that way.
    Either way, you now have a DVD which will play as 16:9 widescreen on any TV set, even the old ones where you can’t ask it to letter-box.

  • Why does the text display differently on two different computers?

    I created a Keynote presentation on my G5 which contains some slides with type. I copied the presentation to my MacBook Pro, which I use for presentations, and the text moved! I had some that was fine, but some where the whole text block moved and some text that reflowed. I did not get any font error messages and both computers are using the same fonts which I control using Suitcase Fusion. Any suggestions?
      Mac OS X (10.4.9)  

    That’s a lot of work for nothing, IMO. You could just convert the text to an MSO or even a scrolling frame using this method:
    http://boblevine.us/digital-publishing-suite-101-keep-text-sharp-in-raster-slideshows/
    All that said, what are the settings in the web content pane in the folio overlays panel.

  • Why does the text look pixelated

    I am using Helvetica Neue and when I publish the site the text looks pixelated.

    Best practice is to use a Web Font, if possible. If not, use a Web Safe Font and only as a last resort use a System Font (since it will be converted to an image). An image is slower to load in your browser, prevents site viewers from copy/pasting your text content, prevents using the browser's Find feature within the page, and prevents you from being able to apply hyperlinks on ranges of text. Muse does automatically generate "alt tags" for the image, so search engines will still be aware of the original text content.
    If a System Font is used, it will only render well if the background of the text frame is 100% opaque. (It has a solid fill color. An 100% opaque gradients. Or it has a 100% opaque fill image.) This is due to the fact smoothing the edges of the type on an LCD display requires knowing the color of the pixels behind the text. If the text frame is transparent then the smoothing will be performed using an inferior approach that is color agnostic to avoid creating color artifacts on the edges of the type. (Note that bringing in a transparent image containing the type from some other source will have the same problem.)

  • Why does the text in text boxes go invisible when annotating PDFs in preview?

    If I hover my mouse over where the text box is, the little yellow box that tells you what text is there comes up and shows what the box is supposed to say, but the text is invisible. If I double click the area where the text is supposed to be, it highlights and makes the text visible again. Its not that the text is white, because if i drag it over a dark area, it still doesn't show up. This happens when I open it up again after annotating and saving/closing it. I attached pictures of my cursor hovering over the invisible text box, and one of it hovering over an unaffected text box, for comparison. This has happened to me before. What is happening and how do i stop it?

    david302 wrote:
    But, about half the time, when i am finished typing and click out of the box, back to view the result, the text does not appear. If i go back to Edit Content within the box, it is there, but disappears when i exit the box. It does not print when i print a test sheet.
    The fact that 'about half the time' you are seeing this issue and presumably not the other part of the time, I would suggest trying to run the 'Repair Database' option in the First Aid dialog:
    Quit Aperture > press and hold Option + Command keys while launching Aperture > select and run the 'Repair Database' option.
    Post back as needed.

  • Why does the text size shrink when I make the window smaller?

    I have some notes in a DOCX page.  I don't want the entire page blocking up the desktop yet I want to see the notes.  When I change the size of the page, the text shrinks too.  How useless is that?
    How to I keep the text normal size and have a smaller page?
    Everything I know I learned from my cat. No matter what the situation is, there is a napp for that.

    Hi,
    When we I change the size of the page manually in Word 2013, the text won’t shrinks. I also resize the window via code below:
    Sub ReSizeWinodw()
    Application.ActiveWindow.WindowState = wdWindowStateNormal
    Application.ActiveWindow.Width = 500
    Application.ActiveWindow.Height = 500
    End Sub
    It won’t shrink the text too. If you are using code to resize the window of Word, would you mind sharing with us some code snippet to help us to troubleshoot this issue?
    If not, I suggest you posting it to
    Word IT Pro Discussions get more effective responses.
    Best regards
    Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why does the text size option have no effect?

    Hi, text is really small. When going through display option settings and enlarging the text using the A button it has no effect on actual pages. The text is still tiny. I have tried downloading 'no small text' but get the message that it's incompatible. Is there a solution? Thanks.
    I have version 29.

    It's unclear but that desktop font sizing change only affects "certain desktop optimized websites". It's really misleading.
    There is no way to adjust font sizing on mobile optimized websites which I assume you're trying to adjust.

  • When I open a pages doc why does the text not show but the preview in Finder shows the text?

    Doc shows a blank page but shows the number of pages at the bottom and flickers the text when I click on Outline icon.

    In most cases it is because you have not updated Pages to the current version.
    Peter

  • Why does the site manager create c:\ folders for files that don't belong to the site via FTP?

    Hello everyone,
    now I've been using Dreamweaver since Ultradev 1.0 and I have just recently upgraded to CS 5.5 Web Edition. Before that I used CS3. I've allways been very satisfied with Macromedia and Adobe products until now
    Now I don't know whats happened in the last few years but I am getting the impression that the quality of Dreamweaver used to be alot more stable.
    Developing for more than half my life I understand that bugs are usual and that not everything can be cared for, but to be quite honest I also know that there are bugs that just should not happen when you ship a product.
    On the other hand I do love some of the enhancements that have come with 5.5, for example the Javascript Framework integration and jQuery code hinting features but what I really cannot understand is why the heck is Dreamweaver automatically uploading files that do not belong to the currently open site to the ftp server? I cannot think of any scenario in which this would be appropriate behaviour. I'd understand it if the files somehow contained links (CSS, JS, PHP, etc.) to the currently open site, but they don't! Dreamweaver simply sets out, every now and again, to creating a totally "dumb" folder structure on my ftp servers when I open a file from outside of the site - which I do very often to copy code I used in other projects.
    It's just frustrating having to cleanup the ftp servers because Dreamweaver created folders like this "c:\localhost_root_folder\client_folder\client_project_folder\www\.... and so on", and saves a file in there that has nothing to do with the currently open site.
    Now I've looked for settings that would supress this behaviour but I could'nt find any.
    Also, I really don't want to stop using the automatic upload function because it speeds up development time significantly.
    Does anyone know how to work around this issue, or even better, does anyone know why this behaviour is happening and what it's purpose is?
    Thanks in advance.
    David

    ... what I really cannot understand is why the heck is Dreamweaver automatically uploading files that do not belong to the currently open site to the ftp server? I cannot think of any scenario in which this would be appropriate behaviour. I'd understand it if the files somehow contained links (CSS, JS, PHP, etc.) to the currently open site, but they don't! Dreamweaver simply sets out, every now and again, to creating a totally "dumb" folder structure on my ftp servers when I open a file from outside of the site - which I do very often to copy code I used in other projects.
    Dreamweaver doesn't "automatically upload" anything unless you have it set to on save. This is a bad practice if you aren't 100% sure of what you're doing. You may see it as a time saver, but if you have to go back two or three times and clean everything up, it isn't. Additionally, you select what is uploaded or not uploaded. If you choose to upload the entire root folder every time, then Dreamweaver will upload everything inside it... not automatically, but because you chose it.
    As to the "dumb folder structure", when you define a site, YOU and YOU ALONE define the folder structure. If you are working in multiple sites at once (bad practice unless your are extremely meticulous about details) odds are you will sooner or later save a file from one site, with another site open in the Files Panel and Dreamweaver will save the file to the open site, not the one you opened it from (see why it's a bad practice to do this?).
    It's just frustrating having to cleanup the ftp servers because
    Dreamweaver created folders like this
    "c:\localhost_root_folder\client_folder\client_project_folder\www\... .
    and so on", and saves a file in there that has nothing to do with the
    currently open site.
    It reads like you have defined a testing server and are using it when  you put files. C:\localhost is a testing server protocol. If you are  testing files and then attempt to put files from the testing server  instead of the root folder, they will have the filepath from the testing  server and not from the root folder file structure. Again a bad  practice unless you are meticulous about details and remember to switch  back to the root folder from the testing server panel BEFORE you put  files.

  • Why does the text jump up and down when I'm trying to read or click on something? It's damned annoying. How can I stop it

    Home page or email page, the page jumps up and down at random and when I try to click on something I often miss and end up clicking something I don't want. It gets real annoying and I can't find where to stop it. Why did someone think to do this in the first place. I've learned new profanity because of it.
    G runyan

    Hello,
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    You can also try to create a new profile.
    * [[Use the Profile Manager to create and remove Firefox profiles]]
    * '''[[Firefox no longer works with Windows 2000]]'''

Maybe you are looking for

  • Itunes 10.5.3 won't complete the download- errors while installing

    Hey everyone- For the last month or two I have tried to upgrade my Itunes from 10.5.1?, first to 10.5.2 and then 10.5.3. Each time I tried to upgrade, the installation almost completes before this message comes up "Errors occurred while installing th

  • Late 2011 Macbook Pro still running slow on Mavericks

    Anyone care to look at my EtreCheck results and see if there is anything glaring that may be the problem? I noticed a [failed] under one of the User launch agents... EtreCheck version: 1.9.15 (52) Report generated August 30, 2014 at 7:37:18 PM MDT Ha

  • Camera Raw custom settings issue on 4.5?

    I updated to CR 4.5 on my new Mac 17 inch powerbook, and now the custom settings choice uder the basic pull down menu no longer seems to do anything. It used to update from the previous change I had done in the open camera raw window. Now I would nee

  • Unresolved error message

    On my psc 2410xi, the error message is: Remove and check Print cartridge.  I have followed the removal and cleaning instructions provided for this message but I still get the same message.

  • Exporting file to disc, project is too large.

    The error message tells me that I've exceeded the size limitations and I need to change the format to CAF or change the bounce range. This was never an issue in version 9.