jai _ wrote:

> Thank you so much Kare.
> That worked beautifully :-)
>
> >From: Kare Nuorteva <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> >        Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: adding a new parameter to request?
> >Date: Fri, 23 Mar 2001 19:52:37 +0200
> >
> >Hello,
> >
> >Ok, Maybe you should do HttpServletResponse.sendRedirect() and append
> >required parameters to URL.
> >
> >Cheers,
> >Kare
> >
> >On Fri, 23 Mar 2001, jai _ wrote:
> >
> > > Date: Fri, 23 Mar 2001 17:08:11 -0000
> > > From: jai _ <[EMAIL PROTECTED]>
> > > Reply-To: A mailing list for discussion about Sun Microsystem's Java
> >         Servlet API Technology. <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: adding a new parameter to request?
> > >
> > > No waht I want is I need to append the paramater to the request.
> > > ie if I have /LoginServlet?param1=value1
> > > I need to be able to do
> > > /LoginServlet?param1=value1&param2=value2
> > > If I say setParameter(), it puts the value in the session not in the
> > > request, they way I want it to be.
> > > I should be able to do getParameter() on param2, as if it came from the
> > > request.
> > > Thanks
> > >
> > >
> > >
> > > >From: Geeta Ramani <[EMAIL PROTECTED]>
> > > >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> > > >        Servlet API Technology." <[EMAIL PROTECTED]>
> > > >To: [EMAIL PROTECTED]
> > > >Subject: Re: adding a new parameter to request?
> > > >Date: Fri, 23 Mar 2001 11:40:02 -0500
> > > >
> > > >Jai:
> > > >
> > > >Are you saying that a (subsequent) call to getAtribute("command") is
> > > >returning
> > > >null?
> > > >
> > > >Geeta
> > > >
> > > >jai _ wrote:
> > > >
> > > > > I am forwarding a request to another servlet using,
> > > > > RequestDispatcher.forward()
> > > > > method. But before I do that, I need to add one more parameter to
> >the
> > > > > request....
> > > > >
> > > > > ServletContext sContext = getServletContext();
> > > > > request.setAttribute("command","LOGIN");
> > > > >
> > > > > RequestDispatcher  reqDispatcher =
> > > > > sContext.getRequestDispatcher("webapp/Provider/CommandServlet");
> > > > >
> > > > > if(reqDispatcher!=null )
> > > > > reqDispatcher.forward(request, response);
> > > > >
> > > > > But my newly added attribute to the request is not getting passed.
> > > > > Is there any other way to do it?
> > > > >
> > > > > Thanks, I appriciate your help.
> > > > >
> > > > >
> [...]



Hi :-)   from the direction of several emails which talked about the different
kinds of parameters,  the following is just as a reference, don't laugh... //haha
:-)

 there are at least 2 kinds of parameters:
   * tailP :-)
    - in a form:
     <FORM ACTION=http://host:8080/servlet/MyServlet?tailP0=vt0 METHOD=POST/GET>
    - we directly enter in a browser:
      http://host:8080/servlet/MyServlet?tailP0=vt0
    - with URLConnection:
      URL url=new URL(http://host:8080/servlet/MyServlet?tailP0=vt0);
      URLConnection uc = url.openConnection();

    * bodyP :-)
     it is in a form:
     <INPUT TYPE=hidden NAME=bodyP0 VALUE=vb0>

   and I think first you get several tailP(recv) and/or bodyP(recv) in
     MyServlet0, then you want to Add a New tailP(new), and goto
     MyServlet1, is it right? I also find:
    - with RequestDispatcher, I found it will Remember the old tailP(recv),
       and Forget the new tailP(new).  I don't know why very clearly.
     - with sendRedirect(), it will Forget the old tailP(recv), and Remember
        the the new tailP(new).  I think it is because of HTTP redirect.

if the above is wrong, please correct it, thanks in advance!


Bo
Mar.23, 2001

___________________________________________________________________________
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