Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

jsp

Thread view: 
savy - 25 Apr 2007 12:32 GMT
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
Andrew Thompson - 25 Apr 2007 12:59 GMT
>Hello ,
>
> I have 3 textboxes...

*Yes*.  We heard you the first time..
<http://www.javakb.com/Uwe/Forum.aspx/java-programmer/35420/jsp-textbox-and-Error
java-lang-NullPointerException


Signature

Andrew Thompson
http://www.athompson.info/andrew/

Lew - 25 Apr 2007 13:57 GMT
savy wrote:
>> Hello ,
>>
>> I have 3 textboxes...
>
> *Yes*.  We heard you the first time..
> <http://www.javakb.com/Uwe/Forum.aspx/java-programmer/35420/jsp-textbox-and-Error
java-lang-NullPointerException

And multiposted both message to comp.lang.java.databases!

C'mon, "savy" or "savita", a little netiquette, please.
Roy Epperson - 26 Apr 2007 06:20 GMT
Why, they have a homework assignment do do and he can't be bother to
learn it themselves <grin>

> savy wrote:
>>> Hello ,
[quoted text clipped - 7 lines]
>
> C'mon, "savy" or "savita", a little netiquette, please.
David Harper - 26 Apr 2007 07:29 GMT
> savy wrote:
>>> Hello ,
[quoted text clipped - 7 lines]
>
> C'mon, "savy" or "savita", a little netiquette, please.

Perhaps someone should propose a new newsgroup for people like Savita
and his/her annoying friends.

Ladies and gentlemen, I give you:

                                  comp.lang.java.homework

Then the rest of us can killfile it.

David Harper
Cambridge, England


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.