How to remove ^M at the end of lines?

Hi,
A war file is created in Windows xp. If I deployed it on Solaris + Tomcat 5.0.28, I can see ^M following each line in apps.xml and web.xml, of course, the application doesn't work properly.
In windows xp, I used command: jar -cf myapp.war *.*, then deploy it thru Tomcat Web Application Manager.
How can I fix the annoying ^M?
Thanks in advance.
Wolf

The ^M happens because the source files are created using Windows line termination. The best way to keep this from happening is to edit your XML files in an editor that lets you choose what type of line termination to use. I use TextPad, which is great.
~ Robert

Similar Messages

  • Remove prefix at the end?

    I'm using apple scripts with Automator to remove prefix from files. How can I remove prefix at the end? For example, the file name is test01.mov. I want it to be test.mov
    I have found this script but this script works in front. I'm not I programmer and I can't make any sense of the script.. Can any one help me out?! Thanks!
    repeat with thisFile in input
                        tell application "Finder"
                                  set fileName to name of (thisFile as alias)
                                  set fileName to (do shell script "echo " & quoted form of fileName & " | sed 's/^[0-9]*//'")
                                  set name of thisFile to fileName
                        end tell
              end repeat

    I can't help with Automator or scripts, but clarifying your question -
    A 'prefix at the end' is called a suffix. By definition, a prefix can only be at the beginning of something.
    And, I think you want to remove something from the end of the file's name (the filename) rather than from the file itself.

  • How to delete the ends of line ["\n"] in a String before parsing

    hi, i'd want to parse a String with Regex/Pattern.
    This String contains ends of line i want to delete before applying my parsing treatment.
    I've tried to do that by replacing the character "\n" with "" :
        // the original text
        String orgTextToParse = new String(buffer);
        //we create a pattern to recognize the ends of line
        String regExpEol = "\n";
        Pattern patternEol = Pattern.compile(regExpEol);
        Matcher matcherEol = patternEol.matcher(orgTextToParse);
        // the new text without end of line
        StringBuffer newTextToParse = new StringBuffer();
        // we replace the "\n" by ""
        while(matcherEol.find()) {
          String REPLACE = "";
          matcherEol.appendReplacement(newTextToParse,REPLACE);
        matcherEol.appendTail(newTextToParse);
        System.out.println("[new string start] " + (newTextToParse.toString()) + " [end of new string]");Is there an appropriate way to delete "\n" ?
    (perhaps a method of the Pattern or Matcher classes... ?)
    thanx
    Edited by: jfact on Dec 29, 2007 11:05 AM
    Edited by: jfact on Dec 29, 2007 11:06 AM

    The second (optional) argument to Pattern is a set of flags. Take a look at the Javadoc.
    The 'genomic' implication is that the EOL is an arbitrary line break for human consumption so it does look like you need to remove the EOL. I would just use replaceAll() since it can be done with one line of code (or just a couple if you pre-compile the regex) without the need for any looping.
    line = line.replaceAll("\n","");Edited by: sabre150 on Dec 29, 2007 10:27 AM

  • How to remove hash in the value of the field fetched from application serve

    Hi,
       I am populating values of the file which is in the application server to the internal table. But for the last field hash is also populating from the file along with the value.
    Please suggest me how to remove hash in the value of the last field.
    Thanks,
    Neelima.

    Hi Vinay,
    Please check the program. I have used the replace statement but it is not working.
    IF NOT v_sap_bom_rec IS INITIAL.
    Spliting the records at '~' delimiter
        SPLIT v_sap_bom_rec AT c_del INTO  wa_bom_file-model_name
                                           wa_bom_file-product_code
                                           wa_bom_file-description
                                           wa_bom_file-product_type
                                           wa_bom_file-mfg_part_num
                                           wa_bom_file-mfg_part_desc.
        REPLACE cl_abap_char_utilities=>horizontal_tab IN wa_bom_file-mfg_part_desc WITH space .
        wa_bom_file-status = c_status.
        APPEND wa_bom_file  TO i_bom_file.
    But it is not working.
    Please help me..
    Thanks
    Neelima

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

  • In Photoshop Elements 7, how do I free up the ends of a crop box independently?

    In Photoshop Elements 7, how do I free up the ends of a crop box independently?
    I require the end points to move independently to fit am image crop

    Thanks.
    You have helped tremendously!

  • How to remove space below the table in smartforms

    how to remove space below the table in smartforms

    maintain a loop counter for item say count
    and in text editer write
    if count > 6
      new-page.
    endif.

  • How to remove or change the color of hair in a beard? [was:does anyone know]

    how to remove or change the color of hair in a beard

    There are many ways to do that and there are many free tutorials on the web for doing that in Photoshop.

  • How to remove and change the color of Java cup and border

    Hi to all,
    How to remove and change the color of Java cup and border.
    Thanks in advance
    khiz_eng

    This is just an Image. You would need to create your own image and call setIconImage(Image) on your JFrame.

  • EWA for java only systems - how to get ewa at the end

    Hi gurus,
    I have a solma system in which  all smd agent setup for portal was done and also all tasks (to collect data for EWA) are running well for ep systems aswel.
    We are at sps 17 in solman.
    I need to generated EWA for this portal system.I have no idea of how to generate it at the end.and i need that report routed to my mail.Some one please let me know how to generate EWA(after setup of every thing) and how to route it to mail address.
    Thank you.

    Hi ,
    Thanks for few inputs
    I have my EP system in system components in java (sub). and also in systems->netweaver->I have cinfigured my EP.But after this also I am unable to schedule it in DSWP.Can any one of you give some thoughts.(Seems I am missing some thing here - can any one let me know the procedure here to cross verify)
    Rohit,I followed that user guide with out missing a single point!.But still I am unable to pull my report..
    Tried manually with xml file(generated for EP from SM) and given it in DSM but it is saying no data available.
    Seems nothing is coming from my EP.
    Below are few exceptions in xml file.
    1) introscope data is missing
    Cannot find agent name Business-Sandbox_SEP_server0 for
    instance[IInstance: key=1178028371063144, type=[Server],
    nodeId=13865850, creation=Tue May 01 09:05:01 CDT 2007]
    for thie exception - not sure why my SM is not resolving EP's sid.
    Please not - SMD is  running fine in EP
    Any thoughts?
    2) PAR data is missing
    ORA-12505, TNS:listener does not currently know of SID given in connec descriptor
    The Connection descriptor used by the client was:
    Thank you.

  • Satellite A30-921: How to remove and replace the memory?

    hi, can anyone help me how to remove and replace the memory of sat A30-921. and also, please give a detailed instruction.
    thank you in advance.

    Hi
    There is no much to explain. At the bottom side in the middle there is placed memory cover (fixed with two screws). Remove the cover and you will see 2 slots there. I dont know how much memory has you there but as Stefan said you can use max 2 GB of RAM (2x PC2700 1024MB - PA3313U-1M1G). How to remove memory modules you can see on http://www.hardwaresecrets.com/article/189/5
    Bye

  • At the end of line # is coming in output file at application directory

    Hi experts,
    I am doing a file to file tunneling in which from a file server I am picking the file and putting it into SAP application server nothing is done in IR .However when the file is reaching in application server its end seprator is coming as # .I am surprised from where the #is coming at the end of every line.When  i am dowloading the same file to my local directory in that file # is not there.
    Please help me as my client is not accepting the file with endsepeartor as # .
    Might be # is coming as the apllication server is in uniq env . But how to get rid of it .Please guide me with whatever input you have in this regard.
    Regards,
    Neha

    Hi Neha,
    I think you do not have to do anything because see you said on saving the file locally, you are not able to see the # character at the end of line..........but when you are seeing in SAP window, then this # character is displayed..............so your SAP server can be a UNIX server and it is displaying the End of Line and Carriage Return ASCII characters as # because these are non-displayable characters.....
    But still if you do not want this # character to be displayed, then you can try Binary and no character encoding........then see if your file is displayed without # character.
    Regards,
    Rajeev Gupta

  • [Solved] How to: Automatically add Semicolons at end of line

    Q. Is it possible to set JDeveloper to automatically add Semicolons to the end of a line of code?
    A. "While there is nothing that does this in batch mode to all your lines, while you are writing a line you can press the CTRL+SHIFT+Enter (complete statement in the source menu) shortcut and it will complete your line for you including the semicolon." [Solved] How to: Automatically add Semicolons at end of line
    Original Message:
    I'm spoiled from using Basic and similar programming languages, adding semicolons manually is something that'll take me time to get used to
    Thanks in advance,
    Abdulla
    Tags (for search engines):
    Jdeveloper automatic semicolon
    Message was edited by:
    Abdulla

    While there is nothing that does this in batch mode to all your lines, while you are writing a line you can press the CTRL+SHIFT+Enter (complete statement in the source menu) shortcut and it will complete your line for you including the semicolon.

  • How can I find out the number of lines in a text file?

    How can I find out the number of lines in a text file?

    java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( "YourFile.txt" ) );
    int lineCount = 0;
    while( in.readLine() != null )
    lineCount ++;
    System.out.println( "Line Count = " + lineCount );

Maybe you are looking for

  • How can I increase the speed of my wifi connection on my iPhone 4?

    Hey everybody. Okay, so long story short, my wifi speed on my iPhone 4 (Verizon) is pretty slow. So slow that I almost never turn it on because of the sluggish download speeds. However, I definitely want to have it on. I use the speedtest app, an my

  • Webdispatcher with load-balancing and local icm configuration

    Dear all, we have a webdispatcher in place to load-balance the requests to our three application servers (ABAP). The webdispatcher has a hostname that is resolved by the DNS. The application servers use local hostnames that can't be resolved in our i

  • How to set focus on a textinput/poplist using PPR

    HI, Is it possible to use PPR to set focus on a Text input or Poplist. if Yes, which attribute in the UI Item we need to use? will the attribute 'Access Key' work for the same? If PPR is not an option then getting a java bean for the UI Item is the o

  • Exporting for BBC Online Delivery?  H.264 - 1080i50

    Hi, Really need this question answered ASAP as I'm supposed to be delivering an edit.  I've been given the following [http://downloads.bbc.co.uk/commissioning/site/Essential_Clip_Deliverables.pdf ] export criteria to follow but I can't for the life o

  • Networking Leopard to Vista

    I cannot share file between my Vista and Leopard OS. Worked before with Tiger. I followed iFelix instructions, but either computer cannot find each other.