tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Ruthenbeck <just...@nextengine.com>
Subject RE: Trying submit text containing the = sign
Date Thu, 10 Apr 2003 21:17:09 GMT
At 01:01 PM 4/10/2003, you wrote:
>I myself am using post method and my tomcat version is 4.1.17LE
>Java version is 1.4.0_03 if that matters
>
>Also try not using a hidden value, try using an actual form that you type 
>values into, then submit it

Changed the <input> to type text and entered "me=you" in the textbox ... 
still works fine for me for both GET and POST form methods.

I should add that the browser (or at least IE) takes care of encoding 
anything the user enters in the textbox such that entering "me=you" in a 
textbox results in the following URL being loaded:

http://me.com/myapp/TServlet?pwe=me%3Dyou

When you do a req.getParameter() in your servlet, Tomcat will decode this 
and give you the value "me=you" (verified with IE and Tomcat 4.0.3).  If 
you enter the URL directly in the browser such as

http://me.com/myapp/TServlet?pwe=me=you

you'll get a "null" value for the parameter (which seems to agree with the 
info in the link neo_deets referenced).

I'm not expert in this area, so these are just observations.  Others would 
be able to give definitive answers.

justin


>-----Original Message-----
>From: neo_deets [mailto:neo_deets@hotmail.com]
>Sent: Thursday, April 10, 2003 3:55 PM
>To: Tomcat Users List
>Subject: Re: Trying submit text containing the = sign
>
>
>This link might help:  Get: only allows 1024 charactors and only ASCII to
>charactors
>
>http://www.htmlhelp.com/reference/html40/forms/form.html
>
>
>----- Original Message -----
>From: "Justin Ruthenbeck" <justinr@nextengine.com>
>To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>Sent: Thursday, April 10, 2003 2:40 PM
>Subject: RE: Trying submit text containing the = sign
>
>
> >
> > (Using TC 4.0.3)
> >
> > Just wrote a small test and in 4.0.3, it looks like POSTed requests handle
> > the equals sign like you're looking for (the equals sign and anything
>after
> > it are returned by the req.getParameter() method), although GET requests
> > return a null value.  To be absolutely clear:
> >
> > URL: http://me.com/myapp/TServlet?p1=comments=false
> > CODE: System.out.println(req.getParameter("p1"));
> > OUTPUT: null
> > ------------------
> > URL: http://me.com/myapp/TServlet (form method=POST)
> > HTML: <input type=hidden value="comments=false" name="pwe">
> > CODE: System.out.println(req.getParameter("p1"));
> > OUTPUT: comments=false
> >
> > Since the behavior is different for POST vs GET requests, I would think
> > there's a problem here.  Can someone verify this on 4.1.24?  Any comments
> > from spec or implementation people?
> >
> > justin
> >
> >
> >
> > At 12:20 PM 4/10/2003, you wrote:
> > >This is definately a jsp/tomcat issue, regular html submit pages transfer
> > >the = just fine
> > >
> > >I am using request.getParameter("name") and its not returning anything
> > >including and after the =
> > >
> > >Replacing all = signs before the submit is not a solution that I would
> > >like to use. Perhaps I should
> > >not have used the term work around.
> > >
> > >I also can't depend on java script to fix a problem that would most
> > >likely contain very important data. There are a lot of places that
>disable
> > >java script because they
> > >consider it a security risk.
> > >
> > >I also can't ask the end user to type anything else than they normally
> > >would. Forms should submit exactly
> > >what they are told to submit.
> > >
> > >So basically I am looking for a fix to this problem and not a work
>around.
> > >
> > >-----Original Message-----
> > >From: jakarta-pipon [mailto:jakarta-pipon@interlap.com.ar]
> > >Sent: Thursday, April 10, 2003 3:12 PM
> > >To: Tomcat Users List
> > >Subject: Re: Trying submit text containing the = sign
> > >
> > >
> > >try replacing = with %3D before submit the form
> > >----- Original Message -----
> > >From: "Luc Foisy" <Luc.Foisy@technical-magic.com>
> > >To: "Tomcat User List (E-mail)" <tomcat-user@jakarta.apache.org>
> > >Sent: Thursday, April 10, 2003 3:51 PM
> > >Subject: Trying submit text containing the = sign
> > >
> > >
> > >
> > >Apparently the = and anything after it doesn't pass very well on a form
> > >submit, I assume because of the parameters
> > >
> > >Anyone know how to work around this???


____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
    See http://www.nextengine.com/confidentiality.php
____________________________________


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


Mime
View raw message