jsp

Discussion in 'Java' started by savy, Apr 25, 2007.

  1. savy

    savy Guest

    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
    savy, Apr 25, 2007
    #1
    1. Advertising

  2. Andrew Thompson, Apr 25, 2007
    #2
    1. Advertising

  3. savy

    Lew Guest

    Lew, Apr 25, 2007
    #3
  4. savy

    Roy Epperson Guest

    Why, they have a homework assignment do do and he can't be bother to
    learn it themselves <grin>

    Lew wrote:
    > savy wrote:
    >>> Hello ,
    >>>
    >>> I have 3 textboxes...

    >>

    > Andrew Thompson wrote:
    >> *Yes*. We heard you the first time..
    >> <http://www.javakb.com/Uwe/Forum.asp...xtbox-and-Errorjava-lang-NullPointerException
    >>

    >
    > And multiposted both message to comp.lang.java.databases!
    >
    > C'mon, "savy" or "savita", a little netiquette, please.
    Roy Epperson, Apr 26, 2007
    #4
  5. savy

    David Harper Guest

    Lew wrote:
    > savy wrote:
    >>> Hello ,
    >>>
    >>> I have 3 textboxes...

    >>

    > Andrew Thompson wrote:
    >> *Yes*. We heard you the first time..
    >> <http://www.javakb.com/Uwe/Forum.asp...xtbox-and-Errorjava-lang-NullPointerException
    >>

    >
    > And multiposted both message to comp.lang.java.databases!
    >
    > 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
    David Harper, Apr 26, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias Nietz
    Replies:
    1
    Views:
    3,436
    VisionSet
    Nov 12, 2003
  2. Raymond DeCampo

    Custom tags and <jsp:plugin> / <jsp:param>

    Raymond DeCampo, Feb 18, 2004, in forum: Java
    Replies:
    0
    Views:
    614
    Raymond DeCampo
    Feb 18, 2004
  3. Timo Nentwig

    JSP 2.0: <jsp:attribute> in <c:if>

    Timo Nentwig, May 10, 2004, in forum: Java
    Replies:
    0
    Views:
    609
    Timo Nentwig
    May 10, 2004
  4. Sean Aitken
    Replies:
    3
    Views:
    10,956
    Alex Hunsley
    Oct 21, 2004
  5. Replies:
    0
    Views:
    4,335
Loading...

Share This Page