www.webdeveloper.com
Results 1 to 2 of 2

Thread: Output Strings to Page

  1. #1
    Join Date
    Mar 2007
    Posts
    10

    Output Strings to Page

    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!

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,119
    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..
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles