JSP Document/JSPX: what determines how tabs/space/linebreaks are removed in the output?

后端 未结 3 1159
悲哀的现实
悲哀的现实 2020-12-16 06:12

I\'ve got a \"JSP Document\" (\"JSP in XML\") nicely formatted and when the webpage is generated and sent to the user, some linebreaks are removed.

Now the really we

3条回答
  •  鱼传尺愫
    2020-12-16 06:15

    true
    

    Whitespace inside is stripped if you use the above directive in your web.xml. Given the semantic model quoted in BalusC's answer, this directive is only useful if you're not using XML syntax.

    (Tomcat 6.0.16; Servlet 2.5 declarations; JSP 2.1 declarations in XML syntax)

提交回复
热议问题