verbose of jsp, standard tag library

A

autogoor

Hi,

I am writing jsp, suppose I have in my jsp:

<tr>
<td>
<c:if test="${param == 'good'}">
goodman
</c:if>
<c:if test="${param == 'bad'}">
badman
</c:if>
</td>
</tr>

The html generated is something like
<tr>
<td>

goodman

</td>
</tr>

This may cause peoblem for some browsers.

Without changing my jsp page, can I somehow (configure the
server?)generate the following html:
<tr>
<td>goodman</td>
</tr>
 
R

Ryan Stewart

Hi,

I am writing jsp, suppose I have in my jsp:

<tr>
<td>
<c:if test="${param == 'good'}">
goodman
</c:if>
<c:if test="${param == 'bad'}">
badman
</c:if>
</td>
</tr>

The html generated is something like
<tr>
<td>

goodman

</td>
</tr>

This may cause peoblem for some browsers.

Without changing my jsp page, can I somehow (configure the
server?)generate the following html:
<tr>
<td>goodman</td>
</tr>
In what browser would that cause a problem? If you're doing crazy things with
tables and/or using them for layout (i.e. not using them the way they are
intended), possibly yes, but that sort of question should go to alt.html. If you
really do need to eliminate the blank lines, you'll have to eliminate them in
your source:
<td><c:if test="${param == 'good'}">goodman</c:if><c:if test="${param ==
'bad'}">badman</c:if></td>

Or write a Filter or some such to do so after the fact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top