I don't know this is the cause or not but the varaible name is typed wrong
"pponum"  check it .

Vijay

Mark Galbreath wrote:

> Is your servlet mapping in your web-xml file "servlet" or "/servlet"?
>
> Mark
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kwan,
> William
> Sent: Friday, January 18, 2002 4:09 PM
> To: [EMAIL PROTECTED]
> Subject: passing parameters from jsp to servlet
>
> Hi,
>
> I'm going from one jsp page to another jsp page and then the servlet.
> I"m having a bit of a problem passing a parameter from a jsp page to a
> servlet.  I print out the variable in the jsp page and I get a value but
> when I print it from a servlet, I get NULL.
>
> Any ideas??
>
> Here is what I'm using:
>
> jsp page:
> <form action='servlet/processServlet' method='POST'>
> ...
> request.setAttribute("txtbox",ponumber);
>
> </form>
>
> in servlet
>
> public void doPost(HttpServletRequest, request, HttpServletResponse
> response) throws IOException, ServletException
> {
>         response.setContentType("text/html");
>         PrintWriter out=response.getWriter();
>
>         String ponum = (String) request.getAttribute("txtbox");
>         out.println("ponum=" + pponum);
>
> }
>
> thanks,
> Will
>
> ___________________________________________________________________________
> 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

Reply via email to