Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<c:set> jstl

 
cherry sai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have a problem in displaying a list of values from a controller to my jsp page.
can someone please tell me how can i display values in the jsp page??
i am using hiberante and springs.
here is the code..

<c:set var="prior" value="${Priority}"></c:set>
where i have issue_id and priority in my list (Priority is the list from the controller).
when i am trying to display issue_id in my jsp page by saying ' prior.issue_id ' , its showing an error

org.apache.jasper.JasperException: java.lang.NumberFormatException: For input string: "issue_id"

can someone please help me how to solve this problem..
and i dont want to use <c:foreach> for this case..

thanks in advance..

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well firstly the c:set tag does nothing to display the information ,you should use the c: out tag to display info .Secondly, you haven't used issue_id anywhere in your code , where are you using it?
Please use code tags for your code.
 
cherry sai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, thanks for your reply..
sorry for not providing proper code previously..
what i am trying to do is that,

i want to compare the issue_id ( from Priority List ) with an other issue_id (from issues list) and also checking if priority equals 'Highest' .If these 2 are equal, then i want to display the issue_id(which is from the issues list).

here is my actual code:

<c:set value="${Priority}" var="prior"></c:set>
<c:choose>
<c:when test='${prior.issue_id == issues.issue_id && prior.priority == "Highest"}'>
<td><cut value="${issues.issue_id}"/></td>
</c:when>
<ctherwise>
..........
</ctherwise>
</c:choose>
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pasting more of your Error stack trace could be useful.
Also please UseCodeTags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic