jsp tag

A

Alain

Is there a reason why a jsp tag in a xml format doesn't work with the
implicit out object?

<jsp:scriptlet>

out.println("<p><b>text</b></p>");

</jsp:scriptlet>

I get following error : unterminated <jsp:scriptlet> tag

When i use
<%
out.println("<p><b>text</b></p>");
%>
it works.

thx,
 
M

Manish Pandit

Is there a reason why a jsp tag in a xml format doesn't work with the
implicit out object?

<jsp:scriptlet>

out.println("<p><b>text</b></p>");

</jsp:scriptlet>

I get following error : unterminated <jsp:scriptlet> tag

When i use
<%
out.println("<p><b>text</b></p>");
%>
it works.

thx,

Are you sure there is no typo in closing tag?

-cheers,
Manish
 
O

Owen Jacobson

Is there a reason why  a jsp tag in a xml format doesn't work with the
implicit out object?

<jsp:scriptlet>

            out.println("<p><b>text</b></p>");

        </jsp:scriptlet>

I get following error :  unterminated <jsp:scriptlet> tag

When i use
<%
    out.println("<p><b>text</b></p>");
%>
it works.

thx,

The content model of a <jsp:scriptlet> tag does not prevent <p> from
being interpreted as a tag. Try placing the script within a CDATA
section:

<jsp:scriptlet><![CDATA[
out.println("<p><b>text</b></p>");
]]></jsp:scriptlet>
 

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

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top