Answer the question
In order to leave comments, you need to log in
How to correctly display information from Oracle from a field with clob type?
Hello.
There is a datasource from oracle
<c:set var="SCRIPT">
select region_solution from region t1
</c:set>
<sql:query var="rs_list" dataSource="jdbc/region">
${SCRIPT}
</sql:query>
<c:forEach var="row" items="${rs_list.rows}">
<c:set var="SOLUTION" value="${row.title}"/>
<%
String str_title=null;
try {
Map map = (Map) pageContext.getAttribute("SOLUTION", PageContext.PAGE_SCOPE);
CLOB clob = ((CLOB) map.get("someClob"));
str_title= clob.getSubString(1, (int) clob.length());
} catch (Exception ex) {
//print out exception
}
<TD><%out.println(str_title);%></TD>
</c:forEach>
Answer the question
In order to leave comments, you need to log in
found a solution to the problem, it's all about row and SOLUTION, in general, it took longer to harness the issue
Map map = (Map) pageContext.getAttribute("row", PageContext.PAGE_SCOPE);
CLOB clob = ((CLOB) map.get("SOLUTION"));
str_title= clob.getSubString(1, (int) clob.length());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question