Greeting everyone,
I have been searching through the forums looking to see if someone lese has had my problem in the past. After about a hour of reading I have decided to post.
I have a SELECT statement in a JSP ( using JSTL ). All the examples I have seen it's always SELECT * from some table and run a foreach on the rows returned. That's great, but what if I am only selecting specific items?
Here is what I mean:
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<sql:query var="rs" dataSource="jdbc/mslDB">
SELECT IP, OS
FROM mytable
WHERE Hostname = ?
<sql:param value= "<%= catalog.getServerName() %>" />
</sql:query>
<html>
<body>
Server IP: (${rs.IP})
</body>
</html>
This is a very scalled down version but I believe it hits where my problem is. I thought I could get the server IP valus from (${rs.IP}), but I am sadly mistaken.
Can anyone tell me how I can get that value?
Thanks for any help.
Chad