aspose file tools*
The moose likes JSP and the fly likes <c:set> jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "<c:set> jstl" Watch "<c:set> jstl" New topic
Author

<c:set> jstl

cherry sai
Greenhorn

Joined: Aug 01, 2011
Posts: 3
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

Joined: Jan 05, 2011
Posts: 477

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.


Learning and Learning!-- Java all the way!
cherry sai
Greenhorn

Joined: Aug 01, 2011
Posts: 3
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

Joined: Jan 05, 2011
Posts: 477

Pasting more of your Error stack trace could be useful.
Also please UseCodeTags.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <c:set> jstl