Thank you all.
I put declarations above the conditional and it worked like a charm. It
seems so simple now.
A question though.
Am I silly that I don't like using the "JSP specific tags" like <usebean>?
I prefer to instantiate my objects and call on their interfaces right from
inside the page because it seems to...
A> not limit me to those methods and properties supported by a specific tag.
B> better separate my logic (beans and servlets) from my presentation (jsp).
Sincerely, does anyone else feel this way? I mean if I have the entire java
language at my fingertips between <%%> tags and I can call on properties
within html using expression <%=myProp%> tags, then what do I gain by using
JSP specific tags?
Thanks again, List!
Jt.
-----Original Message-----
From: Jon Thomas [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 10:03 AM
To: [EMAIL PROTECTED]
Subject:
Ok. So in my JSP I call on a servlet that returns data to me via a
"Computer" object which has name and description properties, but I can't
seem to get to those properties once I'm back in my JSP. The jsp code is
this:
<%
if (request.getParameter("selComputers") != null) {
String getComputer = request.getParameter("selComputers");
net.authentix.applicationdefs.Computer myComputer =
clsGetComputers.compGetAComputer(getComputer);
String myComputerName = myComputer.getComputerName();
String myComputerDescription =
myComputer.getComputerDescription();
}
%>
It is called in a file that get's included only if
request.getParameter("selComputers") exists.
But, if later in the same jsp I reference <%=myComputerName%> I receive this
error
d:\InetPub\ServletExec\ISAPI\Servlets\pagecompile\_AprilRelease\_AdminFuncti
ons\_System\_Services\_console_xjsp.java:189: Undefined variable:
myComputerName
out.print( String.valueOf( myComputerName ) );
^
Is this a common or obvious error? It has me quite stumped. Admittedly I
am a COM/VB dll web programmer trying to learn jsp but I just want to access
the properties of my object. Is this possible in my jsp?
I wouldn't ask but I've been trying for a couple days now and cannot get
there.
Thanks.
Jt.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets