and it is working perfectly. I want to convert this JSTL variable "i" in the JSP primitive type. like
<% out.println(i)%>
How can I do this... Thanks in advance
Dhiraj Srivastava
Ranch Hand
Joined: Aug 29, 2001
Posts: 49
posted
0
What I want to get the ${i} value in a primitive data type. Like in int. e.g getting the ${i} in a integer say in i or j
How can do this. ... Its urgent
alan do
Ranch Hand
Joined: Apr 14, 2005
Posts: 354
posted
0
i haven't found a way to do this. jstl has automatic type coercion though (see specs appendix). perhaps your problem can be solved (if you care to explain in details further) with more JSTL and not necessarily finding out how to get the jsp primitives from JSTL values.
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Dhiraj Srivastava
Ranch Hand
Joined: Aug 29, 2001
Posts: 49
posted
0
See this what I exactly wants
<sql:query var="Emp" sql="SELECT * FROM EmpList" dataSource="${example}"> </sql:query>
<%-- Get the column names for the header of the table --%>
<TABLE BORDER=1> <c:forEach var="columnName" items="${Emp.columnNames}"> <th><c ut value="${columnName}"/></th> </c:forEach>
<%-- Get the value of each column while iterating over rows --%>
As you can see on this JSP page I am getting some data from the data base. Now I want to amend the JSTL variables like getting the values from ${Emp.rows} in an array.