Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

tag c:out

843840Jun 17 2009 — edited Jun 18 2009
hi all, i'm new in java and jstl, and i need some help...

I have a jsp that has a "c:foreach" tag. In that i need to write on the page a value called by a java method by using the "c:out" tag.
But i have a lot of trouble by doing that.

		<c:forEach items="${requestScope.objModel.tabella.poliLegali}" var="leg">
		<tr>
				<td  class="label9"><c:out value="${leg.descrizione}"/></td>
				<c:forEach items="${requestScope.objModel.tabella.tipiRichiesta}" var="rich">
				
					<td align="center" class="label10"> <c:out value="${......}"/> </td>	
					<td align="center" class="label10"> <c:out value="${......}"/> </td>
					<td align="center" class="label10"> <c:out value="${......}"/> </td>	
					<td align="center" class="label10"> <c:out value="${......}"/> </td>	
				
				</c:forEach>
		</tr>
		</c:forEach>
in the {.....} of the code i need to put a java method that call 2 paramether, "rich" and "leg". Can i use jstl variable in java code?

I tried something like that but obviously doesn't work:
<c:out value="${obj.getTabella().getGiacenti().getValue(rich,leg)}

{code}

where obj is a java object declared in jsp.


I hope my problem is clear, sry for my bad english and thanks for the help in advice...
bye all.
Michele                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2009
Added on Jun 17 2009
2 comments
165 views