tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandy McPherson <allse...@webmind.nl>
Subject Bug in HttpServletRequest.getQueryString()? from POST
Date Tue, 30 Jan 2001 09:18:59 GMT
Hi when processing a request in a tag extension class I get a "null"
returned when I call HttpServletRequest.getQueryString() after a POST
when I change the form to use GET, I
get the QueryString as expected. my code fragment  looks like:

   public int doStartTag( )
       throws JspTagException
   {
       try
       {
           previous = start - count;
           if ( previous < 0 )
           {
              previous = 0;
           }

           out.print( "<a href="+nextPage+"?startAmbiguity="+previous );

            //
            // WHY does getQueryString() return null from POST?
            //
           out.print( "&"+((HttpServletRequest)pageContext.getRequest(
)).getQueryString( ) );
           out.print( ">"+title+"</a>" );
           return SKIP_BODY;
       }
       catch ( IOException ex )
       {
           throw new JspTagException( ex.toString( ) );
       }
   }

The query string contains information which I don't particularily
displayed in a GET URL, so how do I work around this, apart from getting
all the parameters and building the query string myself?

Mime
View raw message