Probably you are right. Right now my problem goes to NullPointerException, a
most notorious problem in servlet programming for me. Simply put, the
getParameterValues() can't get
the parameter from the form generated by the same servlet file.
When I push the next button, the servlet is called and is supposed to
get and update parameter "rowid", but it doesn't. In the JWS console,
I found the message of NullPointerException.
Why? The NullPointerException happens so often I almost doubt that the
HttpServletRequest is null.  Anybody got the same exception when run Java
Webserver, tell me how to deal with it? Thank you very much.


My file is too long to paste here. But any suggestion from your own
experience is always helpful.  Eric
>Eric --
>
>Can you source the final HTML page as its posted onto the browser from your
>servlet / JS file ?? That will be more useful to debug than the snippets
you
>have given.
>
>If put in a proper format and CASE (imp for the vars you define), I have
>successfully used this combination. Check the error line number to give you
>more info on where it is failing. On NS type "javascript:" in the location
>bar to give more info.
>
>If it helps ..
>
>Shashank
>
>
>>
>> >                Subject:        any difference between coding javascript
>>in
>> >servlet and puting it in a file
>> >
>> >                Hello there: I am trying to program a servlet which
>>interact
>> >with client
>> >                through a set of navigation buttons (using form). I put
>>the
>> >javascript in
>> >                a separate file, the script like this:
>> >                function showDetails(butt){
>> >                if(butt=="next"){do something}
>> >                if(butt=="previous"){do something}
>> >                etc.
>> >                }
>> >                and in the servlet, I defined a form name "memberlookup"
>> >which includes
>> >                these hidden values:
>> >                <input type="hidden" name="rowid1" value="start">
>> >                <input type="hidden" name="rowid2" value="end">
>> >                <input type="hidden" name="totalrecords"
>>value=totalrecords>
>> >                and button types as:
>> >                <input type=button name="nxet" value=" > "
>> >onClick="showDetail('next')">
>> >                etc.
>> >
>> >                When I test the button, the browser give me error:
>> >                        'document.memberlookup.rowid2' is not an object.
>> >
>> >                But when I put the javascript in the servlet, it works.
I
>>am
>> >wondering
>> >                if there is any difference between coding it in the
>>servlet
>> >and puting
>> >                it in a file.  Any help is appreciated.  Eric Liu
>> >
>> >
>>
>___________________________________________________________________________
>> >                To unsubscribe, send email to [EMAIL PROTECTED] and
>> >include in the body
>> >                of the message "signoff SERVLET-INTEREST".
>> >
>> >                Archives:
>> >http://archives.java.sun.com/archives/servlet-interest.html
>> >                Resources:
>> >http://java.sun.com/products/servlet/external-resources.html
>> >                LISTSERV Help:
>>http://www.lsoft.com/manuals/user/user.html
>> >
>>
>___________________________________________________________________________
>> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>>body
>> >of the message "signoff SERVLET-INTEREST".
>> >
>> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
>> >Resources: http://java.sun.com/products/servlet/external-resources.html
>> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>>
>>__________________________________________________________________________
_
>>To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
>>of the message "signoff SERVLET-INTEREST".
>>
>>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>>Resources: http://java.sun.com/products/servlet/external-resources.html
>>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>_______________________________________________________________
>Get Free Email and Do More On The Web. Visit http://www.msn.com
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to