gnujsp/Ann,
my beans:
package test;
class testBean
{
private xyz.xyzBean obj;
public String methodA
{
return "hello";
}
public String methodB
{
String b=obj.methodX();
return b;
}
public String methodC
{
String c=obj.methodY();
return c;
}
}
package xyz
class .xyzBean
{
public String methodX
{
return "hello from xyzBean";
}
public String methodY
{
//String value returned is retrieved from the database all within this method.
}
}
above beans are complied from mybean directorey
repositories settings :
repositories=E:\gnujsp-1.0.1\mybean
-classpath settings:
servlet.gnujsp.initArgs=compiler=builtin-javac -classpath "%classpath%;%scratchdir%;E:\gnujsp-1.0.1\lib\gnujsp10.jar;E:\gnujsp-1.0.1\mybean" -d "%scratchdir%" -deprecation "%source%"
my jsp:
<jsp:useBean id="obj" class="test.testBean"/>
<%
String str=obj.methodA();
out.println(str);
//working
//but
String str=obj.methodB();
out.println(str);
//Does not work
//Null Pointer Exception raised
//also
String str=obj.methodC();
out.println(str);
//Does not work
//Null Pointer Exception raised
%>
an early replay will be appreciated
Regards
Kiran kumar.r
Datacons Private Limited
#17/1, Hosur Road
Bangalore - 560 068
India
Phones : 91-80-572 3233 / 572 4919 / 572 5255 / 56 / 57
Fax : 91-80-572 5258
Website : www.dcons.com
Extn - 210