[thelist] Java syntax....

Warden, Matt mwarden at odyssey-design.com
Fri Apr 27 14:36:17 CDT 2001


> At 05:37 AM 4/27/2001, you wrote:
> >Without knowing more about your objects, I'm just guessing but...
> >perhaps the rsReleaseSummaries.getObject("PRID") returns the object
> >and not a printable string.  Maybe try using
> >rsReleaseSummaries.getObject("PRID").toSting, or something like it,
> >after the '?' operator.
>
> Dean...
>
> The Objects are Record Sets. Also if I just do this
>
> <%= rsReleaseSummaries.getObject("PRID") %>
>
> It "prints" fine.

Well, well the JSP interpreter converts your line above to servlet methods,
it'll usually use a javaserver-specific method. For instance, it might turn
it into something like this:

writeToStream(whatever_you_have_in_<%=%>);

So, it's possible that you just can't use that type of expression within <%=
and %> in JRun's output method... depending on how it parses things. You
will want to find the .java file that is created from your JSP code and post
the relevant servlet code if you can't figure out what is up. It's possible
that it's creating something like:

writeToStream(((rsReleaseSummaries.getObject("PRID")!=null)?rsReleaseSummari
es.getObject("PRID"):""))

which might be screwing things up.

Also, try this:

<%
String sPRID = rsReleaseSummaries.getObject("PRID");
if (sPRID != null) out.println(sPRID);
%>


hth,


--
mattwarden
mattwarden.com





More information about the thelist mailing list