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

Recommended Answers

All 5 Replies

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

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

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.

yes,, am unable to pull jstl code,, i can get html,, so i modified the code.
its working fine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.