A
Anonymous
Hi,
I am using JSTL to build JSP pages. Depending on input parameters, I
want the JSP pages to query a database based on different SQL queries.
For example, instead of using the following hard-coded-in "Select"
query, I want to build the "Select *** from ***" statement dynamically.
<sql:query var="grs" dataSource="jdbc/testdb">
select distinct group_name from user_groups order by group_name
</sql:query>
For example, I'd to change above sql:query to the following example:
<% String qry= "select distinct group_name from user_groups order by
group_name
";%>
<sql:query var="grs" dataSource="jdbc/testdb">
qry
</sql:query>
Is this possible?
Thanks,
I am using JSTL to build JSP pages. Depending on input parameters, I
want the JSP pages to query a database based on different SQL queries.
For example, instead of using the following hard-coded-in "Select"
query, I want to build the "Select *** from ***" statement dynamically.
<sql:query var="grs" dataSource="jdbc/testdb">
select distinct group_name from user_groups order by group_name
</sql:query>
For example, I'd to change above sql:query to the following example:
<% String qry= "select distinct group_name from user_groups order by
group_name
";%>
<sql:query var="grs" dataSource="jdbc/testdb">
qry
</sql:query>
Is this possible?
Thanks,