Results 1 to 1 of 1
- 03-19-2009, 04:48 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
Setting a variable in JSTL for use in a JSP function
Hi,
I need to call a function in JSP that takes a parameter to get the content of an EBase form field. The parameter is defined by a field in a database. I am getting the data back using JSTL but I need a way of embedding the database field value into the JSP function call.
Here's the code:
Can anyone help please?Java Code:<% UFSFormInterface form = UFSFormInterface.getFormInterface(); %> <% String CurrentForm = form.getFormName(); %> <% String CurrentClient = form.getFieldValue("PERSON_ID"); %> <html> <head> <style> div {padding:10px; } .noborder {border:0px; } </style> </head> <body> <sql:query var="reports" dataSource="jdbc/TRI7">SELECT * FROM hcc_ics_report_mappings WHERE (calling_form = '<%= CurrentForm %>' OR calling_form = 'ALL') ORDER BY report_name</sql:query> <div style="width:150px;"> <c:forEach var="rows" items="${reports.rows}"> <c:set value="${rows.context}" var="Context" /> <!-- I want to set the variable in JSTL here --> <% String DetailID = form.getFieldValue(Context); %> <!-- I want to read the variable into a JSP function here --> <a target="_new" href='URL&report=<c:out value="${rows.path}" />&destype=CACHE&userid=@sh22&desformat=PDF&p_header_id=<%= CurrentClient %>&p_detail_id=<%= DetailID %>'><c:out value="${rows.report_name}" /></a><br /> </c:forEach> </div>
Thanks,
Mike
Similar Threads
-
JSTL problem
By mihir66 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 03-05-2009, 02:28 PM -
jstl in jsp
By nagaprasanna in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-18-2008, 08:18 AM -
setting JSTL locale "java.util.MissingResourceException"
By sabelosimelane in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 09-04-2008, 04:12 PM -
Function in a variable
By beserie in forum New To JavaReplies: 4Last Post: 01-07-2008, 03:12 AM -
JSTL error
By Eric in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 06-11-2007, 09:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks