Ok, firstly I think (judging by the code in the post) that you are attempting to obtain a value that's on the form, but will not be sent by clicking on the button as you have it coded. That code will cause a "GET" and you will not see the qty value. The easiest way to solve this is to output form tags to cause a post to your servlet B:
<form name=\"frmWhatever\" method=\"POST\" action=\"http://localhost:8080/slt/Add_Products\">
Then I would put your prdID in a hidden field:
<input type=\"hidden\" name=\"prdID\" value=\"" + rs.getString(1) + "\">
Change your button to something like:
<input type=\"submit\">
or
<input type=\"image\">
Now you will be able to retrieve both qty and prdID via HttpRequest (as mentioned by Safrole):
String qty = ( String )request.getParameter( "qty" );
if( qty == null ) qty = "";
Then
you should be able to test/manipulate qty with no exceptions, do the same for the other incoming values.
Hope that helps!
[ March 05, 2002: Message edited by: Brian Glodde ]