0

hi ,

i have a java bean string which contains html and as well as jstl code ,, html code is rendering to jsp,, butnot the jstl code , how do i render that to jsp

3
Contributors
5
Replies
21
Views
2 Years
Discussion Span
Last Post by shwetha.marigowda
Featured Replies
  • 1

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> did you add that line of code in your jsp page? Read More

0

JSTL code is executed on the server, not the client. So having a servlet send it to the client isn't going to work.

0

in javaBean class

selectText = "<select style='width: 170px' id='ruleName' type='text' name='ruleName'/> "+
" <option>--Select One--</option> <option><#c:out value='${templateBean.selectCriteria}' escapeXml='false'/></option> </select>";

     in jsp:
      <td><c:out value="${templateBean.selectText}" escapeXml="false"/></td>

in browser its displaying Dropdown with select_one option but not the other option value

0

doesn't matter, he's pushing raw, uncompiled, unexecuted, JSTL code to the browser, which will never yield working HTML, let alone what he expects it will yield.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.