Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

leading whitespaces in xml output  RSS feed

 
Brian Percival
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have jsp that outputs xml.. I have leading whitespaces even before the xml header starts. How do I configure the server so I won't have stray whitespaces??
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66204
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JSP 2.1, there is a directive to cause excess whitespace to be trimmed.

If not and you are using Tomcat, there's a way to cause Tomcat to trim the spaces.

If not, be sure that what you want emitted first is the very first template text on the page without any preceeeding JSP syntax.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!