How to print new line in jsp page

hi
how to print new line in jsp page
thanks

\n - new line character is in java specific not HTML
specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;)

Similar Messages

  • How to print 20 lines in one page and remaining lines in another in script?

    Hi I created 2 pages in script for page1 next page is page2 , how i can print 20 lines in one page and remaining in next page plz send me the code for that and is windows same for 2 pages?...

    Hi Krishna,
    Try below code...
        CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form                              = form.
        CALL FUNCTION 'START_FORM'
        EXPORTING
         language               = sy-langu
         startpage              = page1
      LOOP AT itab.
        count = count + 1.
        item = count mod 20.
        IF item EQ '1' AND count NE '1'.
           CALL FUNCTION 'END_FORM'.
           CALL FUNCTION 'START_FORM'
           EXPORTING
             language               = sy-langu
             startpage              = <b>page2</b>
        ENDIF.
       "write_form statement ....
      ENDLOOP.
    Message was edited by:
            Hikaruno

  • How to print break line in jsp.

    in jsp where a bean.getProperty() value has a broken line. but it displays as a single line in the web page. when printing the line by System.out.println() statement, it displays as a verious new line where '\0' is applied but in jspbean.getProperty it does not.
    For example :
    It displays by SOP()statement as
    Successful
    No error
    No restarts
    No marked completed
    but in web page it displays as
    Successful No error No restarts No marked completed.
    please provide the code that support in jsp file so that the output statement should like as SOP()statement output type.
    Thanks in advance.
    Uttam

    I guess you want to display CRLF (\r\n) in JSP?
    Line breaks in HTML are generally represented as < br >.
    You have 3 options:
    1) replace CRLF by < br >.
    2) style the line using CSS with 'white-space' set to 'pre'.
    3) surround the line with the HTML < pre > tag.

  • How to print new line in webdynpro

    Friends,
    I want to print a success message in new line, the below shown is a one singe line and want to split two lines.
    I used this:
    wdComponentAPI.getMessageManager().reportSuccess("Example : this is the test message i would like to print in two lines, some how it is not working please help me how to "+
    "/n/n print this in two new lines.")
    when i execute the above code it is displaying on screen as succsess message as below shown in one line:
    Example : this is the test message i would like to print in two lines, some how it is not working please help me how to print this in two new lines.
    But my requirement expecting  some thing below shown:
    Example : this is the test message i would like to print in two lines, some how it is not
    working please help me how to print this in two new lines.

    really? how?   Ó.o

  • How to print new line using DBMS_OUTPUT package

    Hi,
    I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
    set serveroutput on size 200000
    set feedback on
    BEGIN
    DBMS_OUTPUT.PUT_LINE('First Line');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE('Second Line');
    END;
    I expect following output ...
    First Line
    Second Line
    but i got following output....
    First Line
    Second Line
    why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?

    You can try the following:
    SQL> ED
    Wrote file afiedt.buf
      1  BEGIN
      2  DBMS_OUTPUT.PUT('ONE LINE...');
      3  DBMS_OUTPUT.PUT('SECOND LINE...');
      4  DBMS_OUTPUT.NEW_LINE;
      5  DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
      6  DBMS_OUTPUT.PUT('TEST');
      7  DBMS_OUTPUT.NEW_LINE;
      8  DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
      9  DBMS_OUTPUT.PUT_LINE(CHR(10));
    10  DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
    11* END;
    SQL> /
    ONE LINE...SECOND LINE...
    THIRD LINE WITH NEW LINE...
    TEST
    FOURTH LINE
    EXAMPLE
    FIFTH LINE
    PL/SQL procedure successfully completed.Documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062

  • Need help in how to print new line character in unix using java

    Hi All,
    I use the printstream class to print some line in a text using java.
    here is the code:
       FileOutputStream out; // declare a file output object
            PrintStream p; // declare a print stream object
                    p.print("\t");
                    p.print(date);
                    p.print("\t\t");
                    p.print(RecCount);
                    p.println("\n");when i use this and output of this character in windows is
    date RecCount
    22-07-2007 23456
    when i use the same code in unix it shows the following output:
    date RecCount[]22-07-2007
    it wont accept the new line character could any one give me an idea to solve this problem.

    PrintStream has a println() method. Use that. Or System.getProperty("line.separator").
    Because a newline char doesn't necessarily specify a line break. It's system-dependent.

  • How to Print new line in Acrobat SDK?

    I was use "\n" in end of string in PDETextAdd, but its doesn't go for new line.Any one help me pls...

    You have to place very single line separately, there is no newline function
    in PDETextAdd.
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • How to print one line item per page?

    Hi,
    I have to develop a smartform for printing tags (labels) and i am stuck. My problem is:
    If more than one materials are available in one document, one material will be printed per one page. So if three line items are there, three pages of print are there.
    Can someone please tell me how to go about it?

    Hello Richa,
    it all depends if you are printing the Header data or not.
    In your case I can recommend a Loop over the items in the Form processing and in each loop step you craete an entire page print out, this should be possible.
    If you need to print the header, this could be done prior to entering the loop.
    I hope this helps you in finding a solution
    Regards
    Isabelle

  • How to print new order in odd page or new page

    Hi Experts,
    I want to print my order layout in oddpage. If any new order comes it should print inthe odd page. Currently its printing Back to back.
    But I want to print my order layout in oddpage or new page.
    Any one guide this??
    Offering points is against the terms of engagement.  Text changed by moderator.  Also, do not post the same question in more than one forum.
    Mohana
    Edited by: Mohana Vijayan on Oct 31, 2008 8:35 AM

    Hi mohana,
    For script or smartform?
    In case smartform
    Create  pages as per your requirement.
    In the global defintion --> initialization tab -->
    if w_page = 1.
    control_parameters-startpage = '%PAGE1'.
    else.
    control_parameters-startpage = '%PAGE2'.
    ENDIF.
    Regards,
    Sravanthi

  • How to print header lines at the top of every page with Alv list display?

    Dear all,
    I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
    The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = ls_variant
          it_events                = lt_events
        TABLES
          t_outtab                 = lt_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and lt_events as below:
      ls_event-name = 'END_OF_LIST'.
      ls_event-form = 'ALV_END_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'ALV_END_OF_PAGE'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_LIST'.
      ls_event-form = 'ALV_TOP_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'ALV_TOP_OF_PAGE'.
      APPEND ls_event TO lt_events.
    So, how can I print header lines for every page?
    Best Regards,

    Hello Saba,
    Your point might be very close to solution.
    Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
    reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
        EXPORTING
          it_fieldcat_lvc         = gt_fcat
        IMPORTING
          et_fieldcat_alv         = lt_fcat
        EXCEPTIONS
          it_data_missing         = 1
          it_fieldcat_lvc_missing = 2
          OTHERS                  = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
        EXPORTING
          it_fieldcat = lt_fcat
        IMPORTING
          e_width     = l_width.
    WRITE l_reptx TO l_reptx CENTERED.
      NEW-LINE.
      WRITE: AT (l_width) l_reptx CENTERED.
      SUBTRACT 10 FROM l_width.
      WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = lt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    Do you have other suggestions ?

  • How to insert new line character?

    Hi all,
    I have two lines to print.
    out.println("Available number of columns="+cols);
    out.println("Number of columns must be present=10");My problem is:
    i want both the lines to be printed one below the other. But, it is displayed in one single line.....
    Can anyone please tell me how to insert new line character?
    I tried with \n, '\n' and \r\n but, in vain......
    Thanks for your time.
    Regards,
    Ashvini

    You should never use "\n" directly.
    The line separator character is different on different operating systems.
    And putting quotes around it in your string will make absolutely no difference in the JSP.
    To find out what the line separator is you should use System.getProperty("line.separator");
    The JSPWriter and PrintWriter classes will automatically use this property with a println statement, so a println will always finish with a line separator.
    The issue here was that HTML by default ignores all whitespace.
    The solutions provided
    - use a <br> tag instead of a carriage return
    - use <pre> tags, which tells the browser not to ignore whitespace. That can be troublesome in JSP which generates a lot of extraneous carriage returns into the code.
    Cheers,
    evnafets

  • How to call BPEL process in JSP page

    Hi
    I am new to BPEL.please help me how to call BPEL process in JSP page.
    Thank You...

    Check this thread ....
    How can i call asyncronous BPEL process from Java Class????
    Tom..

  • How to print the Terms and Condition page ine the sap-script

    Hi experts,
                             i got the requirement that how to print the Terms and condition page in the script,i have the three pages, having the same main window, in the last of the main window(all three pages)  i have called the hard coded text(i.e so10 text), but when i am displaying the output  data get printed in the first page but i am getting the second page heading on the top of  the terms and condiions page. In all the three pages i  have the same main window, if i  make change in any window i will affect all the other main  windows.  so please suggest me how i need to go.HOW TO GET GRID OF THE TEXT ON THE TOP OF THE SECOND PAGE OF THE TERMS AND CONDITONS.
    like this i have called in the MAIN WINDOW
    /E : LAST ( IN ALL THREE PAGES)
           INCLUDE ZSD_INVOICE_TERMS TEXT OBJECT TEXT LANGUAGE EN.
    IN THE TCODE SO10
    NEW PAGE TERMS.
    1) TERM MS AND CONDITONS  TEXT.................................................
    FIRST->NEXT, NEXT->NEXT,,   TERMS--->TERMS.

    Hi,
    1. Create a new page by Name : LAST
    2. Identify the text element which will be the last element in the form in the debug mode.
    Mostly Ex: SUM, TOTAL, LAST etc.,
    3. the page linking should be
    First --> Next
    Next --> Next
    4. In the Text element identified in the step 3.
    Write the following code
    /: NEW PAGE  LAST
    /: INCLUDE the standard text created for the terms and conditions in SO10
    Check the syntax for the command but the logic will be the same.
    It should resolve your problem.

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How to print horizantal lines in smartforms?

    hi friends,
                       how to print horizantal lines in smartforms.
    waiting for ur valuble replies.
    Thanks,
    Kiran

    HI,
    If u use templates or table,then use borders to print the horizontal lines.
    Eg : Create template-->Table painter->click select pattern button->Display framed pattern->select 3rd one.it will display only horizantal lines.
    if want to print horizantal line under the text, then create one paragraph or character formate with Underline in smartstyles.Use that paragraph or character to u r text element

Maybe you are looking for

  • [SOLVED] KDE4.4.5 multiple krunner errors at launch

    All of a sudden KDE won't launch properly. I get a series of 70+ KDE Crash Handler messages, all with some variation on this: "Details: Executable: krunner PID: 6078 Signal: 7 (Bus error)" This is all that I get when I check the debug info: Applicati

  • How do I play an .flv file ?

    I got an email with a .flv attachment.  I understand this is a flash file. What do I need to do to play this file? Windows XP 32 bit Your site check says I have flash version 10.1.53.64 I never explicitly installed flash, I understand it came bundled

  • Showing multiple popups

    Hey all, I am trying to implement my own menu system by subclassing JMenu, JMenuItem, and JPopupMenu. Everything works fine, except for one glitch: when what should be a submenu opens, the main menu closes because they are both popups and swing only

  • Web Excel Interface of  Web interface bulider

    Hi All, I'm not able to input values in the cells of the excel layout in the web interface builder , though the layout and header are clearly visible. Regards, Santosh.

  • Running Windows!?

    OK, So in my High School, the eMacs are running windows? How did they do this? Firstly, I'm pretty sure you can only run windows on intel machines - and If I've done my research right - eMacs aren't intel! They do also run OS X - I'm the only one tha