I'm attempting to use a <%@ include file="xx" %> within a table cell, and it ends the include with a carriage return, even though the included file has none. Is there some way I can strip out the carriage return in the table cell?

Simon Brown

What you'll notice about JSPs is that if you have a page directive (for example), the resulting generated HTML page will contain a blank line where the directive was once present. It gets worse if you have lots of page directives (for importing classes, setting the error page, etc) as there is usually lots of whitespace at the top of your HTML page!

The linebreaks you have in your JSP page are usually present in your HTML page. To ensure that your HTML page doesn't contain extra linebreaks, try and remove them from your JSP. The unfortunate consequence is that you will probably end up with messy looking JSP code.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact