Click to See Complete Forum and Search --> : Output Strings to Page


homerpsu
03-16-2007, 04:56 AM
Hi, Im currently using struts to allow a user to enter in some data through forms.

I have a bean that that is an array with a bunch of strings.

When I try to output it into the browser, it will ignore the spaces in the front of the string e.g.:

" hello"
" 1"

But it outputs it as:

hello
1

on my html pages. How can I output my bean so that it maintains its format?

Is there also a way I can get my output to be something similar as what the "quote" tags do but using code insteade.g.

How can I format my output like this with this frame? But code style?

Sorry if my english isn't too clear...!

Thank you for any response!

Khalid Ali
03-16-2007, 10:22 PM
I cant recall the exact syntax, its been several years when I did struts.
the write tag has an attribute along the lines of filter="of" or something...any book will have that with the tag description..