Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

jsp textbox and Errorjava.lang.NullPointerException

 
 
savy
Guest
Posts: n/a
 
      04-25-2007
Hello ,


I have 3 textboxes(username,password, dept) of the jsp page and 2
buttons(call,submit).
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.

<TD>DEPARTMENT</td>
<td>
<INPUT TYPE="TEXT" NAME="department" value=<%=s %> disabled >
<input type="button" value="call" name="deptusermasteradd"
onclick="userdept();">
</TD>

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
database)


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.
Thanks
Savy

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

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 alexjaquet@gmail.com 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



Advertisments