I have tried everything/searched everywhere and can't come up with an answer. Hope someone can give me a clue... I have and application that is doing a customer name search. It starts with an HTML Form that Posts the user entered name to search by. A controller servlet receives the request an gets the name to search by with a request.getParameter("custName"); This works fine. The servlet performs the search, gets the results, stores them in the session, and requestDispatches.forwards to a JSP. The JSP shows the results and everything is good. However, the JSP also shows the original name that the User searched with. It uses <%= request.getParameter("custName") %> to retrieve it. The problem is that it truncates the search request name at the first space entered. For example, if the user enters APPLE COMPUTER only APPLE appears in the JSP's "new" search field. The search itself works fine. Just before I dispatch to the JSP I print out request.getParameter("custName") and it shows the complete name (APPLE COMPUTER). Any Ideas? I have tried everything I can think of. I even switched to storing it in the session, but got the same results. Here's the JSP code to show the name: <TD width="351">or By Name:<INPUT size="31" type="text" maxlength="25" name="custName" value=<%=request.getParameter("custName")%>></TD> Thanks, Reed Peters Reed@cm-inc.com
I am actually not encoding the customer name at all. The HTML form is storeing it in the request, the servlet is retriving it, using it to perform the search, then fowarding the (same) request on to the JSP. When the JSP retrieves the customer name it is truncated at the first occurance of a space in the name. In fact, when I enter the name as AT&T/REED@HELP"PLEASE it returns it just fine. Even with all the &/@" characters. Surely storing strings parameters into a request or a session, don't need URL encoding. Is there some other encoding you are talking about? [ September 25, 2002: Message edited by: Reed Peters ] [ September 25, 2002: Message edited by: Reed Peters ]
There might be some settings in the browser that is causing this behavior. I know I had something similar. I unchecked the use http1.1 proxy setting in under the options/advanced tab in the browser and it worked okay.
Bosun (SCJP, SCWCD).
So much trouble in the world -- Bob Marley