Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new line break

Status
Not open for further replies.

raji96

Programmer
Aug 7, 2001
64
US
I have array with multiple values in it,to display that I am putting it in the string buffer and then displaying it.

String[] svalue =strutsForm.getS();
vValue.append (svalue + "<BR>");
session.setAttribute("UIVALUE",vValue);

While displaying it does not break to next line instead it displays <BR> next the value.
Can anyone help with a solution for this?
Thanks!
 
Hi,

Try this..

Code:
 String[] svalue =strutsForm.getS();
 StringBuffer vValue = new StringBuffer();
 for(int i=0; i< svalue.length; i++)
 {
   vValue.append (svalue[i]);
   vValue.append (" <BR>");
 }
 
 session.setAttribute("UIVALUE",vValue);

Cheers
Venu
 
How do you write it out for display? If you are using a write bean, then you need to set filter to false. e.g.

<bean:write name="UIVALUE" filter="false"/>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top