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.

Similar Messages

  • 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. ;)

  • 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

  • How to print vertical lines for line items?

    hi experts,
                    can any one tell me how to print vertical lines for line items in ascript?
    ive tried using sy-vline but its printing jus one line each for each item .i want it in columns ?if there are any control commands plz let me know how to print?
    thanks &regards
    narendar

    hi narendar,
    Welcome to SDN.
       u can go for box command.
    Use the box command with zero width for vertical lines.
    Position the line by x position and y postion.
    syntax :
    BOX <xpos> <ypos>
           <width>
          <height>
          <thickness in twips> twips.
    Regards,
    Arun.
    Reward points if useful.

  • 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 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 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

  • M602n Laserjet - How to print 66 lines in DOS

    Running an old DOS program in virtual XP mode and need to print 66 lines instead of 60.  On older HP Laserjet IIIsi, I could just change the setting on the printer manually at the printer itself.  How do i change this setting on an  M602 printer?

    This seems to be a commercial product. For the best chance at finding a solution I would suggest posting in the forum for HP Business Support!
    You can find the Commercial Laserjet board here:
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • How to print continue Line Numbers  in PLD  Differen repetitve areas.

    Hi,
    We need to print line numbers continues in different Repetitive areas.
    Ex. Repetitve Area 0 we have item Discriptions
          Repetitve Area  Footer1 we created sotvalue() here it will display servicetaxes
          Repetitve Area Footer1 we created one text roundoff
    we need output like
    Ex:1. Dell        **Repetitve Area 0****           
          2.Mouse     **Repetitve Area 0****           
          3.Laptop      **Repetitve Area 0****             
          4.servicetax   **Repetitve Area Footer1****           
          5.cess             **Repetitve Area Footer1****           
          6.Hcess             **Repetitve Area Footer1****           
          7.Roundoff           **Repetitve Area Footer1****    as a text field       
      for above all we need to print Line numbers sequence how we can print sequence numbers for differen  areas.if i  assigned Linenum( ) in Repetitve Area 0 it will display one for Repetitve Area 0 only.and i applied Gouplinenum also it's not printing. please guide me how to print this.
    regds,
    sampath kumar devunuri.

    Hi,clint pow.
    Please we did what you said but we are not retreiving data.please tell me how we can get serieal numbers for different repetitve areas.
    regds,
    sampath.

  • 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 specific lines out of a Tail - N command.

    Hello,
    Here is my problem. Within a web application, one of the menu is supposed to do the following:
    Check the n lastest lines of a file (a log file in fact) and print the lines that only contain "ADD" or "DEL"
    I don't know how to do it ! Please, help !!

    This should get you started, it's a java version of tail which takes multiple files and there roll extension and runs forever (hopefully!).
    * @author Jeff Hackert, Jon Strabala
    import java.io.*;
    import java.util.*;
    public class TailIt extends Thread {
        private BufferedReader br = null;
        private Thread thread;
        private long rollTime = 0L;
        private String fname = null; // the log file
        private String rname = null; // the rolled log file
        private static boolean debug = false;
        private static synchronized void stdOut(String line) {
            System.out.println(line);
        public void run() {
            String s = null;
            boolean attail = false;
            long prev = System.currentTimeMillis();
            try {
                for(;;) {
                    s = br.readLine();
                    if ( s != null ) {
                        if (attail) {
                            TailIt.stdOut(s);
                    } else {
                        attail = true;
                        try {
                            sleep(10);
                            long now = System.currentTimeMillis();
                            if (now > prev + 5000) { // checks roll every five seconds
                                prev = now;
                                checkRoll();
                        } catch (InterruptedException ioe) {}
                    yield();
            } catch (IOException ioe) {}
        public void setRollTime() {
            File f = new File(fname);
            if (f.exists()) {
                rollTime = f.lastModified();
            } else {
                rollTime = 0;
        public void checkRoll() {
            long tmpTime = 0L;
            File f = new File(rname);
            if (f.exists()) {
                tmpTime = f.lastModified();
            if (rollTime < tmpTime) { //a roll occurred
                Date d = new Date(rollTime);
                stdOut("Log " + fname + " rolled at " + d.toString());
                try {
                    br.close();
                    br = new BufferedReader(new FileReader(fname));
                } catch (Exception e) {}
                setRollTime();
            } else {
                if (debug) System.err.println("no roll at " + rollTime + " " + tmpTime);
        public static void main(String [] args) {
            if (args.length != 0) {
                for (int i = 0; i < args.length; i = (i + 2)) {
                    if ((i + 1) == args.length) {
                        System.err.println("Usage: TailIt <log file> <roll extension> ...");
                        System.exit(0);
                    TailIt m = new TailIt();
                    try {
                        m.fname = args;
    m.br = new BufferedReader(new FileReader(m.fname));
    m.rname = m.fname + "." + args[i + 1];
    m.setRollTime();
    m.thread = new Thread(m);
    m.thread.start();
    } catch (FileNotFoundException e) {
    System.err.println(e);
    } else {
    System.err.println("Usage: TailIt <filename> <roll extension> <filename> <roll extension> ...");

  • How to draw a line using JSP?

    Does anyone know how to draw a line using a JSP? Any help is much appreciated.
    Regards,
    Navin Pathuru.

    Graphics classes are useless in JSP files; you can only output HTML tags to the client browser.
    You should be able to give just about any presentation look that you need with HTML and CSS. Have you played with styles? Here's a simple example that works in IE 5+ and Netscape 4.7:
    <HTML>
    <HEAD>
    <STYLE>
    .box {
    border-style:solid;
    border-color:black;
    border-right-width: 1px;
    border-top-width: 1px;
    border-left-width: 1px;
    border-bottom-width: 1px;
    .line {
    border-right-width: 1px;
    border-top-width: 0px;
    border-left-width: 0px;
    border-bottom-width: 0px;
    border-style: solid;
    border-color: red;
    width:1pt;
    height:100%;
    </STYLE>
    </HEAD>
    <BODY>
    <TABLE CELLPADDING=1 CELLSPACING=0 WIDTH=100>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field One</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Two</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER WIDTH=50%><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Three</SPAN></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Have fun!

  • How to print SO line item seperately on four part of paper

    Hi all,
    My client has following requierment.
    if we take A4 size paper and make four equal part  then we will have four part as follows
    part1 (top left),part2(top right),part3(bottom left) and part4(bottom right)*
    In sales order if there are 4 line item then i want to print
    1st line item,desc,qty,whs code,so number,cust name  on part1
    similarly for
    2nd line item,desc,qty,whs code,so number,cust name on part2
    3 line item,desc,qty,whs code,so number,cust name  on part3
    4th line item,desc,qty,whs code,so number,cust name  on part4
    order of printing is as follows
    following is A4 size  paper ,which is divided in to four parts   first line item will be printed on first part
    second line item will be printed on second part
    third line item will be printed on third part
    fourth line item will be printed on fourth part
    and so on 
    printer automaticaly print this  in there customised old ERP now they want this in the SAp B1..
    they tear this paper in four part and while despatching the item they attach this to the Item
    hope i have given proper information about my question..
    Can any body have idea how to print this in above format....
    thanx in advance.
    regards,
    Chetan.

    Hi chetan,
    I tried your require PLD but did not display the Sales Order line item seperately on four part of paper.
    Try this,
    ->> Open the PLD.
    ->> Create 1 Database field on the top Left half of page and 1 Database field on the top Right half of page in Page Header.
    ->> Create 1 Database field on the Bottom Left half of page and 1 Database field on the bottom Right half of page in
    End of Report.
    Result:
    Top Left half of page ->> 1st Row Item Description
    Top Right half of page ->> 1st Row Item Description
    Bottom Left half of page ->> (Last)4th Row Item Description
    Bottom Right half of page ->> (Last)4th Row Item Description
    Because First 2(Left & Right)Database Fields are in Page Header and both 2 fields are in page header so it will be display only the First Row Item Descrition.
    Second 2(Left & Right)Database Fields are in End of Report and both 2 fields are in End of Report so it will be display only the Last Row Item Descrition.
    so, Try this.
    ->> Create 1 Database field on the top Left (or) Right half of page in Page Header.(Display the 1st row Item Description )
    ->> Create 1 Database Field and Assign the Item Description then Create 1 formula field put formula ( LineNum()==2 )field in Repetetive Area0.
    ->> (Item Description)DB field is Link to Formula field ID.(Display the 2nd row Item Description )
    ->> Top of the menu Clcik the Print Layout Designer -> Repetetive Area -> Add.
    ->> Create 2 Database Field and Assign the Item Description then Create 1 formula field put formula ( LineNum()==3 )field in Repetetive Area1.
    ->> 1st (Item Description)DB Field put hide and 2nd DB field is Link to Formula field ID.(Display the 3rd row Item Description )
    ->> Create 1 Formula field and Paste the Item Discription (Hide) Field ID on the Bottom Left (or) Right half of page in End of Report.(Display the Last(4th) row Item Description )
    Regards,
    Madhan.

  • How to print a page in jsp?

    hello to every one...
    i made a report and when i click on print's link which is on my report page of jsp,a new popup window opens which show the report plus i want that when ever popup wndow open ,file->print... option should also be open..how can i do this?
    thanxs in advance...

    Hi
    You can open a new window, directing it to the report that you want to view. Also, call window.print() in your popup window.

  • 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

Maybe you are looking for

  • Windows 8.1 Mail app and Exchange Autodiscover

    An organisation Im currently supporting has exchange 2010 and autodiscover setup. I've used nslookup to verify autodiscover settings and everything seems ok. When I launch the Windows 8.1 Mail metro app, autodiscover is not working. I have to enter a

  • I am very dissapointed...help me if you can ,plz

    Hello my good ppl, i need your help,my ipod touch is very silent, by my standards..i mean you cant watch a movie in a bus, **** you cant listen to music sometimes either...if i turn max the volume still its not valid for all recordings...and..on max

  • JSF-EL expansion inside of object using ADF in a JSP

    JSF-EF will not convert to text inside of <object><param> I have an existing JSP application that uses an Applet. There is a lot of <% %> code that is passed to the Applet using the <param> tag. My code goes as follows: <%@ page stuff%> <%@taglib stu

  • 5800 does not turn on with SD card

    Hi, I have recently used Nokia PC Suite to delete some SMS from my Nokia 5800. After that, the phone has stopped turning on when the SD card is in. If I remove the SD card, the phone will switch on normally. How can I fix this? Thanks, Marco Message

  • Language-dependent text does not exist: TYPE=REP KEY1=SAPLRRSV KEY2=757 LAN

    Hi all, We have just installed and configuired the EP . I have craeted one user id in EP with roles bi . But when iam trying to go to Bex Web Analyser Iam getting Language-dependent text does not exist: TYPE=REP KEY1=SAPLRRSV KEY2=757 LANG= Could any