pass textbox to variable and variable pass to sessionbean query ( see code)

sir i try get input in textbox and replace in variable and pass in sessionbean query

sir i post you my code and error

button1 code======

public String button1_action() {

//yy.setValue(currentss);

//yy.setValue(new Integer(tt.getValue().toString()));

Integer currentssgg = new Integer(tt.getValue().toString());

String cddg = (String) tt.getValue().toString();

try {

getSessionBean1().getTripRowSet().setObject(1,currentssgg);

tripDataProvider.refresh();}

catch (Exception e) {

error("Cannot switch to person ");}

return null;}

}

prerender()==========

public void prerender() {

Integer currentss = new Integer(tt.getValue().toString());

try {

getSessionBean1().getTripRowSet().setObject(1,currentss);

tripDataProvider.refresh();}

catch (Exception e) {

error("Cannot switch to person ");}

}

error in jsp page runtime browser show this error ===========

Exception Details: java.lang.NullPointerException

null

Possible Source of Error:

Class Name: webapplication7.Page1

File Name: Page1.java

Method Name: prerender

Line Number: 374

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

and more

please give me idea how pass textbox to variable and variable pass to sessionbean query

thank's aamir

[1522 byte] By [mfa786a] at [2007-11-27 3:26:22]
# 1
It's going to throw null pointer because, on entering the page the textfield value is null. So you have to remove that code inside prerender or you catch null pointer exception
kaskaleea at 2007-7-12 8:29:06 > top of Java-index,Development Tools,Java Tools...