Yeah I would do this but the p in this case is a class auto generated by Hibernate, and I don't know yet if it's possible to customize those auto generated classes (but I'm going to find out).
On Fri, Jan 29, 2010 at 9:18 AM, Joseph Morgan <joseph.mor...@ignitesales.com> wrote: > A really "poor man's" way of doing this is to add a "getXXX" in "p"s class > that calls > The java function and returns the value. Then, you could just write > something like: > > ${p.XXX} > > Replacing XXX with the name of the function. > > > > -----Original Message----- > From: fred basset [mailto:fredbasset1...@gmail.com] > Sent: Friday, January 29, 2010 11:07 AM > To: Tomcat Users List > Subject: Re: Viewing JSP's compiled code > > Thanks, found it. > > What I am trying to do is access a variable from a forEach loop. In > the example below I want to call a java function to do some > calculations on each "p" variable in the loop and output the results > of the calculation in the table. How do I do this? > > > <tbody> > <c:forEach var="p" > items="${model.projects}"> > <tr> > <td > class="zLarge"><div class="StdTableDataLeft"><a > href="editproject.html?id=${p.id}" title="Open > project">${p.groupName}</a></div></td> > <td > class="zSmall"><div > class="StdTableData">${fn:length(p.travelTimeSegments)}</div></td> > <td > class="zSmall"><div class="StdTableData">need to call java fn on p > here</div></td> > <td > class="zSmall"><div class="StdTableData">${p.modifyTime}</div></td> > </tr> > </c:forEach> > </tbody> > > > On Fri, Jan 29, 2010 at 8:57 AM, Caldarale, Charles R > <chuck.caldar...@unisys.com> wrote: >>> From: fred basset [mailto:fredbasset1...@gmail.com] >>> Subject: Viewing JSP's compiled code >>> >>> Simple question, how do I keep and view the source code generated when >>> a JSP is compiled? >> >> Look in Tomcat's work directory - several levels deep, organized by webapp >> name. >> >> - Chuck >> >> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >> MATERIAL and is thus for use only by the intended recipient. If you received >> this in error, please contact the sender and delete the e-mail and its >> attachments from all computers. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org