Hi, You should not *have* to use a useBean in order to instantiate a class. I did not see in the example you posted, where you actually created an Object.. your code was :
myClass myObject; myObject.getSomeString() /* This will actually contain all the code in JSP, just to avoid the JSP page cluttered with Java Code */ .. but no-where was there a myObject = new myClass(); ie : myClass myObject = new myClass(); myObject.getSomeString() until you do this, there is no object, just a ref, so you can't call methods on it. Thanks, Mehdi Nejad "Laxmikanth M.S." <laxmikanth.ms@sonata-so To: Tomcat Users List <[EMAIL PROTECTED]> ftware.com> cc: Subject: RE: JSP help: A bit off topic 03/01/2003 10:15 Please respond to "Tomcat Users List" I don't see useBean Tag ....if u want to use a class use UseBean and call the methos using the bean... > -----Original Message----- > From: Raj [SMTP:[EMAIL PROTECTED]] > Sent: Friday, January 03, 2003 3:42 PM > To: Tomcat Users List > Subject: JSP help: A bit off topic > > Hi, > This doesn't exactly relate to Tomcat, but it is a general JSP query. You > see, I am using a set of Java classes, packaged as CTG (CICS Transaction > Gateway) provided by IBM. My problem is, I am able to instantiate a CTG > object inside the JSP. For example, in the JSP, if I write > > <html> > <blah blah blah> > <% > CTGClass ctgObject = blah blah blah > ............ > ......... > %> > <b><%=ctgObject.getSomeString()%><b> > > > This works fine. But when I write all this code inside my class, and say > > <html> > <blah blah blah> > <% > myClass myObject; > myObject.getSomeString() /* This will actually contain all the code in > JSP, just to avoid the JSP page cluttered with Java Code */ > > But this doesn't work. This problem is not only with CTG but many other > classes, too. One interesting observation is, if I add a main to myClass > and run it from the command prompt, it works perfectly. > > Any help? > Raj > << File: InterScan_SafeStamp.txt >> << File: ATT12098.txt >> ********************************************************************* Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. ********************************************************************* -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>