Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jsp textbox and Errorjava.lang.NullPointerException

Thread Tools

jsp textbox and Errorjava.lang.NullPointerException

Posts: n/a
Hello ,

I have 3 textboxes(username,password, dept) of the jsp page and 2
Onclick of call btn Department.jsp opens and onclick of radiobutton
the deptcode
is displayed in dept textbox(third textbox). I have disabled dept
textbox so that user cannot enter any value.
In this textbox by default null is displayed.

<INPUT TYPE="TEXT" NAME="department" value=<%=s %> disabled >
<input type="button" value="call" name="deptusermasteradd"

Onclick of submit button the values from 3 textboxes are inserted
into database

2 problems are arising one during inserting and other while filling
the textboxes.

1> when I click submit for insertion in database
I get the following error ( related to dept textbox)

DEPT : null Errorjava.lang.NullPointerException

(if dept textbox property is not disabled value can be inserted into

2> I have entered value in username and password textbox and then
click call btn and select the appropriate radio btn and
the dept code is displayed in third textbox, but at the same time the
value from the other 2 textboxes vanishes.

I have search but couldn't get the solution,Your help is required, if
any one could send code will be helpful.

Reply With Quote
saravanavsk saravanavsk is offline
Junior Member
Join Date: Jan 2010
Posts: 2
show ur javascript code....
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[JSP] difference between jsp:forward and jsp:include Java 0 06-02-2006 01:21 PM
jsp include and jsp param Robert Mark Bram Java 2 09-12-2005 04:25 AM
JSP response.sendRedirect and jsp:forward not working ohaya Java 0 06-30-2005 04:35 PM
JSP <jsp:useBean ... /> tag: Difference between 'class' and 'type' Sean Aitken Java 3 10-21-2004 11:35 AM
Custom tags and <jsp:plugin> / <jsp:param> Raymond DeCampo Java 0 02-18-2004 01:29 AM