• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

System.out.print is printing 1 word in a single line?

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've this code- when I run standalone it prints output-

login

if I run in JBoss server, then it prints output like this-

it is starting a new line with each char, any ideas?
13:34:32,160 INFO [STDOUT] l
13:34:32,160 INFO [STDOUT] o
13:34:32,160 INFO [STDOUT] g
13:34:32,160 INFO [STDOUT] i
13:34:32,160 INFO [STDOUT] n

 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there are other many workarounds, like appending to a file or fetching from string buffer.

I was wondering about System.out.print. May be JBoss inbuilt logging is changing the defult behaviour of System.out.print
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quite possible; but I wouldn't use the word "workaround". Using System.out.print in a web application is a poor practice; removing such code and replacing it by proper logging code is not a "workaround".
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic