[thelist] Java syntax....
Anthony Baratta
Anthony at Baratta.com
Thu Apr 26 19:23:49 CDT 2001
In order to ramp up more quickly with Java Server Pages, I'm using UltraDev
to create a few demo pages and run them with the JRun Server and IIS 5.0.
I have the JRun Server installed and working nicely. UltraDev is creating
code that is not being recognized by JRun. Here is an example:
<%=
((rsReleaseSummaries.getObject("PRID")!=null)?rsReleaseSummaries.getObject("PRID"):"")
%>
This fails with a "java.sql.SQLException: No data found".
However if I shorten the line to only
<%=
rsReleaseSummaries.getObject("PRID"), I get data.
%>
It appears that the line...
?rsReleaseSummaries.getObject("PRID"):"" is not syntactically correct.
(rsReleaseSummaries.getObject("PRID")!=null) evaluates to True, which then
trys to print rsReleaseSummaries.getObject("PRID"), which then fails.
If I change the line to:
<%= ((rsReleaseSummaries.getObject("PRID")!=null)?"Yes":"No") %>
I get Yes.
I'm not familiar with Java enough to discover the syntax error. Any clues??
----
Anthony Baratta
President
Keyboard Jockeys
More information about the thelist
mailing list