No subject
Sat Nov 12 19:29:10 PST 2005
the time. I would be curious to see what your compiler error is.
I know without a doubt that the following works...of course assuming
the obvious that Foo is a valid class and is imported.
<%
Foo foo = new Foo();
%>
<a href="<%= foo.bar() >"><%= foo.bar() ></a>
>From: "Fakoya, Jide" <jide.fakoya at eds.com>
>To: "'advanced-java at lists.xcf.berkeley.edu'"
><advanced-java at lists.xcf.berkeley.edu>
>Subject: [Advanced-java] Dynamically generating hyperlinks
>Date: Thu, 28 Jun 2001 10:58:12 +0100
>
>Guys,
>
>JSP code below outputs a list of company URLs to a html page,
>rs.getString(1) simple returns the company URL.
>
><%
> Class.forName(driver);
>
> Connection conn = DriverManager.getConnection(url, userid,
>password);
>
> PreparedStatement stmt = conn.prepareStatement(GET_BUSINESS_QUERY);
> stmt.setString(1, business);
>
> ResultSet rs = stmt.executeQuery();
>
> while (rs.next()) {
> %>
> <a href= XXXXXXXX ><%= rs.getString(1)%></a>
> <br>
> <br>
> <br>
>
> <%
> }
> %>
>
>How do I specify the link i.e. what should XXXXXXXX be, I tried "<%=
>rs.getString(1)%>" but the compiler complains.
>
>Regards
>
>Jide
>_______________________________________________
>Advanced-java mailing list
>Advanced-java at lists.xcf.berkeley.edu
>http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the Advanced-java
mailing list