tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sun" <ju...@silkroute.com>
Subject Re: HttpUtil
Date Wed, 14 Feb 2001 15:08:02 GMT
yes, I can get String[] paranames, five values, 1,2,3,4,5, but I only checked 1,2,4, how can
I get these three values? if use HttpUtil, I can get directly checkboxname=1,2,4
    -----Original Message-----
    From: Cox, Charlie <ccox@cincom.com>
    To: 'tomcat-user@jakarta.apache.org' <tomcat-user@jakarta.apache.org>
    Date: Tuesday, February 13, 2001 6:48 AM
    Subject: RE: HttpUtil
    
    
    you should actually use : 

    String[] paranames = request.getParameterValues("checkboxName"); 

    then you should be able to use paranames[0],paranames[1]...to get your values. 

    
    
    -----Original Message----- 
    From: sun [mailto:junxu@silkroute.com] 
    Sent: Tuesday, February 13, 2001 12:45 PM 
    To: tomcat-user@jakarta.apache.org 
    Subject: Re: HttpUtil 

    
    
    I only get one, paraname=1, actually I checked 4 boxes, in terms of posted 
    inputstream, I should get a array of value, it should be paraname=1,2,4,5. 
    that is why I have to use HttpUtil, but now it is not working, so where is 
    wrong? maybe I should use servlet instead of jsp, than inputstream will not 
    be corrupted. 

    
    
    -----Original Message----- 
    From: Chris Janicki <Janicki@ia-inc.com> 
    To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org> 
    Date: Monday, February 12, 2001 9:34 PM 
    Subject: Re: HttpUtil 

    
    
    String paraname = request.getParameter("checkboxName"); // 'request' is a 
    built-in JSP object 

    
    
    >>>>>>>>>>>>>>>>>> Original Message
<<<<<<<<<<<<<<<<<< 

    On 2/13/01, 12:21:40 PM, "sun" <junxu@silkroute.com> wrote regarding Re: 
    HttpUtil: 

    
    
    > but how to get parameter value passed from previous page, 5 checkbox with 
    > same name different value, I want to get paraname=1,2,4,5 if I selected 4 
    > boxes. 

    
    
    > -----Original Message----- 
    > From: Craig R. McClanahan <Craig.McClanahan@eng.sun.com> 
    > To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org> 
    > Date: Monday, February 12, 2001 9:14 PM 
    > Subject: Re: HttpUtil 

    
    
    > >sun wrote: 
    > > 
    > >> no, I didn't call request before using HttpUtil, HttpUtil was put at 
    > first 
    > >> line in .jsp. 
    > >> 
    > > 
    > >But the JSP page did it for you (that is, the generated servlet did). 
    > > 
    > >Simply use the standard JSP mechanisms to retrieve request attributes 
    and 
    > you 
    > >should be fine.  If you *really* want to process the input data 
    yourself, 
    > you 
    > >should be using a servlet instead of a JSP page. 
    > > 
    > >Craig McClanahan 
    > > 
    > > 
    > >> 
    > >> -----Original Message----- 
    > >> From: Craig R. McClanahan <Craig.McClanahan@eng.sun.com> 
    > >> To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>

    > >> Date: Monday, February 12, 2001 2:48 PM 
    > >> Subject: Re: HttpUtil 
    > >> 
    > >> >sun wrote: 
    > >> > 
    > >> >> yes, I tried that, got same error, "short read", 
    > >> >> in terms of docs, it means posted inputstream is invalid, but I
am 
    not 
    > >> sure 
    > >> >> about that. 
    > >> >> 
    > >> > 
    > >> >One reason you could get a "short read" response is if the servlet 
    > >> container 
    > >> >has already read the input stream's contents.  For example, if you are

    > >> >processing a POST request and you have already called something like

    > >> >request.getParameter(), the contents of the input stream would have

    > already 
    > >> >been processed. 
    > >> > 
    > >> >Craig McClanahan 
    > >> > 
    > >> > 
    > >> > 
    > >> >---------------------------------------------------------------------

    > >> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    > >> >For additional commands, email: tomcat-user-help@jakarta.apache.org

    > >> > 
    > >> 
    > >> --------------------------------------------------------------------- 
    > >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    > >> For additional commands, email: tomcat-user-help@jakarta.apache.org 
    > > 
    > > 
    > >--------------------------------------------------------------------- 
    > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    > >For additional commands, email: tomcat-user-help@jakarta.apache.org 
    > > 

    
    
    > --------------------------------------------------------------------- 
    > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    > For additional commands, email: tomcat-user-help@jakarta.apache.org 

    --------------------------------------------------------------------- 
    To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    For additional commands, email: tomcat-user-help@jakarta.apache.org 

    
    
    
    --------------------------------------------------------------------- 
    To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
    For additional commands, email: tomcat-user-help@jakarta.apache.org 


Mime
View raw message