I have used to obtain parameters diferent method shown
also in examples.
Enumeration e = request.getParameterNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = request.getParameter(name);
}
Method getParameter("ParName") works fine.
Jiri
> I'm encountering a slightly different problem with
> POST.
>
> I'm using tc3.2.1 and apache 1.3.17 on win32 for dev
> purposes (we haven't yet setup the linux boxes that
> will be used for production).
>
> When send a request from a <form method=POST...> to
> tomcat via Apache, it gets invoked okay, but the
> parameters of the form don't get there! That is, when
> I print out the results of request.getParameters() it
> is empty.
>
> If I send the request directly to tomcat, it works
> fine. If I send the request using GET instead of
> POST, via either Apache or Tomcat, then it works fine.
>
> I am wondering if the problem I'm having is due to the
> use of a RewriteRule that uses [R] to redirect the
> request? Does a Rewrite/[R] cause a problem for a
> POST request?
>
> In your example below that 'worked', did you try
> printing out the result of the request.getParameters()
> call?
>
> Mel
>
> --- Jiri Trnka <[EMAIL PROTECTED]> wrote:
> > Hello
> >
> > I have an interesting problem. I have Tomcat 3.2.1
> > working with Apache 1.3 on
> > RedHat 6.22. I am invoking servlet with POST method.
> >
> > public void doPost(HttpServletRequest request,
> > HttpServletResponse response)
> > throws IOException, ServletException {
> >
> > response.setContentType("text/html");
> > PrintWriter out = response.getWriter();
> >
> > out.println("<html>Some html</html>");
> > }
> >
> > This simple example will work with Tomcat but not
> > with Tomcat-Apache
> > If I add a simple line....
> >
> > public void doPost(HttpServletRequest request,
> > HttpServletResponse response)
> > throws IOException, ServletException {
> >
> > response.setContentType("text/html");
> > Enumeration e = request.getParameterNames();
> > PrintWriter out = response.getWriter();
> >
> > out.println("<html>Some html</html>");
> > }
> >
> > example would work.
> >
> > Can someone explain me this? I think maybe there
> > is problem with mod_jk.so.
> >
> > Thanks.
> >
> > Jiri Trnka
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, email:
> > [EMAIL PROTECTED]
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]