/    Sign up×
Community /Pin to ProfileBookmark

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.

[QUOTE]

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

[/QUOTE]

Sorry if my english isn’t too clear…!

Thank you for any response!

to post a comment
Java

1 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliMar 17.2007 — 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..
×

Success!

Help @homerpsu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...