Request.getParameter("") values: Are they null or ""?

Hello:
I have a web page that links up to a MYSQL database. I use JSP files to process the database queries from an HTML form. However, I am having an issue after moving the code from MYSQL 5.0 and JDK 1.5 to a machine with MYSQL 4.X and JDK 1.4.X
I am enabling user to enter several pieces of search criteria that I, in turn, use to build the SQL syntax statement. And I test to see which HTML fields the user has entered something into so that the SQL only includes those where statements.
I first had the following to process the individual search criteria into SQL where statements:
String tester1 = request.getParameter("tester");
String tester = "";
if (tester1 != "") {
     tester += " tester like \"" + tester1 + "%\"" + " and ";
     } else {
tester += "";
so if the user enter "Tommy in the tester field as a search criterion this part of the SQL would be
tester like Tommy%
Then I build the select statment with only the where statements that the user is interested in (and provided search criteria on):
String syntax = "Select * from database where ";
String array[] = { tester, call_from, call_to, r_no, rec_no, date };
for (int counter=0;counter<array.length;counter++){
          if (array[counter] != "") {
          syntax += array[counter];
int a = 0;
int b = (syntax.length() - 4);
String syntax1 = syntax.substring(a, b);
so the above would create
Select * from database where tester like Tommy%
This worked on the previous machine. However, it no longer works on the machine with the older apis. So I have tried everything to weed out the blank database fields so they are not factored in the query (if they are they return nothing as these fields are required to be entered into the database). I tried this:
String tester1 = request.getParameter("tester");
String tester = "";
if ((tester1 != "") || (tester1 != null)){
     tester += " tester like \"" + tester1 + "%\"" + " and ";
     } else {
tester += "#";
. . . and then . . .
String syntax = "Select * from database where ";
String array[] = { tester, call_from, call_to, r_no, rec_no, date };
for (int counter=0;counter<array.length;counter++){
          if (array[counter] != "#") {
          syntax += array[counter];
int a = 0;
int b = (syntax.length() - 4);
String syntax1 = syntax.substring(a, b);
But no matter what I try the query that gets sent to the database is as follows:
Select * from qa_data where tester like "%" and called_from_1 = "" and call_to = "" and r_no = "" and rec_no = "" and (date >= "" and date <= "")
So I am at a loss. It appears that I am not testing for the correct value that the browser is sending to my JSP file when a user does not enter a value in the field. What other than "" and null are there? I have tested for one or the other and both. I am at a loss now as to what to do. I am only concerned with IE6/7 and Firefox 1.5
I output what the value being sent to the JSP file was and it was something like "The tester value is:". So, basically it isn't anything ("").
Can anyone help me here?

Rule #1 when comparing strings: use the equals() method, rather than == or !=
You only use == when checking for null, or checking to see if it is the same object.
if (tester1 == null || tester1.trim().equals("")){
  // value is null/empty/spaces only
else {
  // a value is present
}

Similar Messages

  • Request.getParameter() values in servlet? Urgent

    String str=request.getParameter();
    I am facing a problem when i submit the arabic values from hidden form fields using javascript.
    In servlet when i tries to retrive the arabic values stored in the session, it displays only
    garbage values(ie. ?????????).
    How to solve this problem?
    Please clarify and if possible give some samples.
    Thanks & Regards,
    Govindaraman

    Hi Govindaraman,
    in O'Reilly's Servlet book in the internationalization section it describes how. You have to change the String returned into bytes using the proper enconding, then back into a String to it will convert to Unicode.
    The basics are this:
    String parameterName="your param name";
    String encoding = "your charset encoding on the page";
    String value = request.getParameter(parameterName);
    value = new String(value.getBytes(), encoding);
    value is now a Unicode string that should be correctly interpreted.
    You can use new String( oldString.getBytes(), encoding) to convert between charsets.

  • Submitting request.getParameter value on page submit

    I am getting the value from the request parameter as under
    <%
    String mod = request.getParameter("mod");
    %>
    Now i want this mod value to be submitted as page submits. For that i used:
    <h:inputHidden id="mod_field" value="" />
    Now the question is how to pass the above mod value using this hidden input? and secondly how to bind it with the property in the backing bean (say the name of my backing bean is bean.navigation) so that i can access and use the value.

    Hay this exception has again started showing me up.
    exception
    org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.ReferenceSyntaxException: param.mod
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.ReferenceSyntaxException: param.mod
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.tsheetRcode_jsp._jspService(tsheetRcode_jsp.java:344)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    root cause
    javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.ReferenceSyntaxException: param.mod
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         javax.faces.component.UIOutput.getValue(UIOutput.java:147)
         com.sun.faces.renderkit.html_basic.MenuRenderer.getCurrentSelectedValues(MenuRenderer.java:670)
         com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:549)
         com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:525)
         com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:481)
         com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
         javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
         javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:616)
         javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:539)
         com.sun.faces.taglib.html_basic.SelectOneMenuTag.doEndTag(SelectOneMenuTag.java:505)
         org.apache.jsp.tsheetRcode_jsp._jspx_meth_h_selectOneMenu_0(tsheetRcode_jsp.java:449)
         org.apache.jsp.tsheetRcode_jsp._jspService(tsheetRcode_jsp.java:263)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)

  • Return the column names for which the row values are not null.

    Hi i m a new guy to db admin, and i need a sql script which should return column names of the particular table. and the returned column should have value (fyi - if the column has null value column name should not come in the sql o/p).
    Exmple:
    table name - A
    s.no name mark status fee
    1 aa 45 p null
    2 bb 30 null paid
    3 cc 35 p paid
    fyi -1) if i give the table name(A) and s.no (2) the o/p should be -- name,mark.
    2) if i give the tablename(A) and s.no (1) the o/p should be --- name,mark,status.
    Thanks
    Krishna.
    Edited by: user13294228 on Jun 14, 2010 10:54 PM

    BTW,
    The previous solution is for all values of the column, if you want a specific row, you can add it in where clause.
    I mean in your example, it you look like:
    SET serveroutput on;
    DECLARE
       l_cnt          NUMBER;
       l_str          VARCHAR2 (255) := '';
       l_table_name   VARCHAR2 (255) := 'YOUR_TABLE_NAME';
       l_col_cond     VARCHAR2 (255) := 'S_NO';
       l_val          NUMBER         := 1;
       CURSOR c_col
       IS
          SELECT column_name
            FROM user_tab_columns
           WHERE table_name = l_table_name;
    BEGIN
       FOR i IN c_col
       LOOP
          EXECUTE IMMEDIATE    'SELECT COUNT ('
                            || i.column_name
                            || ') FROM '
                            || l_table_name
                            || ' WHERE '
                            || l_col_cond
                            || ' = '
                            || l_val
                       INTO l_cnt;
          l_str := l_str || CASE
                      WHEN l_cnt = 0
                         THEN ''
                      ELSE i.column_name
                   END || ',';
       END LOOP;
       l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
       DBMS_OUTPUT.put_line (l_str);
    END;Saad,
    Edited by: S.Nayef on Jun 15, 2010 11:54 AM

  • Null value in Session vars and request.getParameter

    We're migrating our application from iPlanet.
              Under iPlanet, when we looped through a resultset and set the values to
              session variables - it worked fine, even when a resultset value was null,
              but in WebLogic, I get the following error:
              java.lang.IllegalArgumentException: key/value is null
              Is there anyway to "turn this off" so it behaves like iPlanet?
              My second question is that we have many JSP's that check to see if a
              parameter is null in javascript:
              Here's the code:
              function onLoad() {
              document.form.elements[0].focus();
              // Check to see if the user is coming from a shortcut
              var imageName = "<%=request.getParameter("imageName")%>";
              if (imageName == "null") {
              selectTop("<%=select_image%>");
              } else {
              selectTop(imageName);
              <% if (tableIndex == 2) { %>
              loadShortcutIcon(13,100);
              <% } %>
              in iPlanet, when the parameter "imageName" is not in the URL, the javascript
              variable gets set to "null" - but in WebLogic, it is set to a blank string -
              "". Is there anyway to make this return null like iPlanet?
              Thanks,
              Matt
              

    Hi,
    the URL parameter is added just for the request to the page. When you press the command button then you issue a new request that does not have a URL parameter added. To work around this, you can use a PhaseListener that stores the URL request parameter in the session for later use
    Frank

  • SOAP_EXCEPTION - Value cannot be null. Parameter name: s

    Hi All,
    I'm getting the following error whicle executing my soap scenaraio.
    "Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to process request. ---> Value cannot be null. Parameter name: s"
    Its IDOC to SOAP scenario.
    can some one tell me what might be missing. its not anything to with the data, as we tried extracting the output message from moni and using in the application and it works. we also tried sending a blank idoc and the error is same. so, conclusion is the parameter is not any data in the message but something to do with the soap message setting.
    any help will be greatly appreciated.

    Hi suraj,
    i tried opening the url in ie and manually uploading the payload. its all works perfect. error comes only when sent via XI.
    the paramets are:
    Receiver SOAP
    Transport protocol: HTTP
    Message protocol: SOAP 1.1
    Connection parameters
    Target URL: http://**..*.*/XIDynExchange.asmx
    no check box checked
    Security prameters
    not checked
    Conversion parameter
    no checkbox checked
    soap action: http://***.org/SendXMLMsgSA
    No advance setting done
    what might have gone wrong?
    Regards,
    Rashmi

  • JSP request.getParameter bug

    i try the following code for receive Parameters from jsp.
    <% String name=request.getParameter("Name"); %>
    but when Name TextField(in HTML) is empty and i want to check
    for none empty field with (if) instruction with following code..
    if(name ==null ) //somecodes..
    this instruction not run and programs continue .

    It's not a bug.
    <%
    String name=request.getParameter("Name");
    if (name == null) {
      //what to do if parameter does not exist
      //e.g.: a checkbox not checked
    } else if (name.trim().equals("")) {
      //what to do if parameter exists but is 'empty'
      //e.g.: an text input field with no non-whitespace characters
      //NOTE: if you want leading and trailing spaces to be
      //      considered values, remove the .trim() from the condition
    } else {
      //there is a value.. do with it as you will
    %>

  • Request.getParameter(): special character handling problem

    Hello, there:
    This should be an easy question for the gurus in here.
    I use a string attached to the url as the parameter string, which includes spaces. the system automatically converts them to %20, but when I receive them in my servlet using request.getParameter, a special character, &Acirc; appears; I couldn't proceed with it.
    I suppose this is a common problem but seems that I didn't find topics about it on this forum.
    So anyone can help? Any encoder/decoder APIs to handle it?
    Thanks a lot,
    Sway

    hi,
    escape can solve ur problem
    use js function to submit form like
    function subForm()
    var any_spcl_value ="kdfhjdf$%@#$% 2FGSFG @%@#%@# V";
    mainForm.action = "index.jsp?value="+ escape(any_spcl_value);
    mainForm.submit();
    and use request.getParameter("value");
    u ll get kdfhjdf$%@#$% 2FGSFG @%@#%@# V as it is.
    AE

  • Request.getParameter is NULL from window.open form submit

    Hi all,
    We have one portlet application where a jsp page has a link which opens as a child window using the window.open function in javascript.
    It has a form and some textboxes with a save submit button.When the save button is clicked the portlet processAction is called but when i try to set the renderrequest all the request.getParameters are null .I have tried both the ActionRequest and HttpServletRequest and both have nul values.
    As a result me Save is failing since the request.getparametrs are null.I added the "save" as part of form action URL and its getting passsed but the other, i am unable to fetch.
    My Form action is : <form name="saveEntries" id="saveEntries" action="<portlet:actionURL secure="true"/>&action=save&_pageLabel=ABC" method="post">
    My process action code is :
    Enumeration<String> parameters = request.getParameterNames();
              while(parameters.hasMoreElements()) {
                   String parameter = parameters.nextElement();
                   String[] values = request.getParameterValues(parameter);
                   if(values != null && values.length > 1){
                        response.setRenderParameter(parameter, values);
                   } else {
                        response.setRenderParameter(parameter, request.getParameter(parameter));
                        if(request.getParameter(parameter)!=null && "save".equalsIgnoreCase(request.getParameter(parameter))){
                             HttpServletRequest httpRequest = (HttpServletRequest) request.getAttribute("javax.servlet.request");
                             Enumeration parameterNames = httpRequest.getParameterNames();
                             Enumeration<String> httpparameters = parameterNames;
                             while(httpparameters.hasMoreElements()) {
                                  String httpparameter = httpparameters.nextElement();
                                  String[] httpvalues = httpRequest.getParameterValues(httpparameter);
                                  if(httpvalues != null && httpvalues.length > 1){
                                       response.setRenderParameter(httpparameter, httpvalues);
                                  } else {
                                       logger.debug("----------------->:ApproveTime else processAction = :Getting HTTP :parameter:"+parameter);
                                       logger.debug("----------------->:ApproveTime else processAction = :Getting HTTP :request.getParameter(parameter):"+request.getParameter(parameter));
                                       response.setRenderParameter(httpparameter, httpRequest.getParameter(httpparameter));
    Any help is highly appreciated.

    Hello,
    One potential reason why it isn't working for you is that the Java Portlet specifications (JSR168 and JSR286) don't allow URLs to be manipulated once they are created with a a portlet:xxxURL tag. The reason for this is that the portlet container needs to be able to rewrite the URLs to properly go back through the portal framework (or over WSRP if running the portlet remotely) and to encode all the parameters needed. The portal framework could even change it from a URL to a Javascript action, where simply appending extra "&paramName=someValue" onto the end of the generated URL won't work. So this:
    <form action="<portlet:actionURL secure="true"/>&action=save&_pageLabel=ABC" method="post">isn't legal by the portlet specification-- if you want to add parameters to the actionURL, you can by doing this:
    <form action="<portlet:actionURL secure="true"><portlet:param name="action" value="save"/><portlet:param name="_pageLabel" value="ABC"/></portlet:actionURL>" method="post">which will add the parameters to the URL in a way that will always work with the portal framework.
    One other thing to note- it looks like you're just trying to copy all of the action parameters in the request into render parameters in the response; this can be done much easier like this:
    response.setRenderParameters(request.getParameterMap());Kevin

  • In JSP pages request.getParameter returns null

    There are two jsp's,the first JSP has 1 textbox inside the form tag.We input the values in the textbox and submit.
    Code :Ist jsp
    <BODY>
    <HEAD>
    function validate()
    document.add.submit();
    </HEAD>
    <FORM name="add" method="post" action=/dir/two.jsp" >
    <TABLE width="37%" border="0" align="center" class="c4f3">
    <TR>
    <TD class="c4">Rating</TD>
    <TD><input type=text name="rating"></TD?
    </TR>
    <TR>
    <TD align=center><INPUT type="button" name="submitadd" value="Submit" onClick="validate()" </TD>
    </TR>
    </TABLE>
    </FORM>
    </BODY>
    After the submit it goes to the 2nd JSP page .
    code:2nd Jsp
    <%
    String Rating=request.getParameter("rating");
    out.println(" Rating "+Rating);
    %>
    The 2nd JSP pages gets the values by request.getParameter.When I use method='post' in Ist JSP ,even if I enter values in the textbox, it prints null. But when I give method="get" , it prints the value.
    Pls let me know if there is any problem in the code or its the problem due to webserver configuration.Also suggest the solution to over come this problem.
    Thanks

    If I'am right you have misplaced the opening body-tag of your first jsp-page.
    The opening body-tag should follow after the closing head tag .
    The structure of your HTML-code should look like this:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>

  • Jsp request.getparameter doesn't get querystring values

    We have recently deployed our jsp application which was running successfully on ias8i apache jserv into the 8.1.7 JVM and configured the mod_ose on the Oracle HTTP server every thing seems to be fine except the following case.
    Here we are accepting the userid,password from a jsp and submiting to the same jsp for action on submit we are reading a combination of jsp form feilds and url querystrings strangely we are able to get values only for the form feilds and querystrings return null.
    The same peice of code works fine on apache jserv implementation.
    Any clues please write to me.
    <SCRIPT Language="JavaScript">
    function check_password()
    document.Login.action ="problem.jsp?tab=YES&nSessionId="+document.Login.sessionid.value+"&nUserId=" + document.Login.userid.value;
    document.Login.target = "_top";
    document.Login.method = "post";
    document.Login.submit();
    </SCRIPT>
    <%
    userid = request.getParameter("userid");
    password = request.getParameter("password");
    tab = request.getParameter("tab");
    %>
    <form name="Login" Border="0" TopMargin="0" LeftMargin="0" Marginheight="0" Marginwidth="0">
    <table>
    <tr>
    <td class="FORMHEADERLEFTB"><b> Login</td>
    <td class="FORMHEADERLEFT">:</td>
    <td><input TYPE="TEXT" NAME="userid" SIZE="25" VALUE="<%=userid%> MAXLENGTH="10"></td>
    </tr>
    <tr>
    <td class="FORMHEADERLEFTB"> Password</td>
    <td class="FORMHEADERLEFT">:</td>
    <td><input TYPE="password" NAME="password" SIZE="25" VALUE="<%=password%>" MAXLENGTH="10" onChange="check_password()"></td>
    </tr>
    </table>
    <input type="hidden" name="sessionid" value="999999">
    </form>
    Thanks
    suresh
    null

    How are you retrieving the parameter values? I am able to retrieve parameters successfully using the following simple testcase:
    untitled1.jsp:
    <form method="post" action="servlet1">
    <P>Username:
    <input type="text" name="un"/>
    </P>
    <P>Password:
    <input type="text" name="pw"/></P>
    <P>
    <input type="submit" value="Submit"/>
    </P>
    </form>
    servlet1.java: (copy and paste from doGet() to doPost() method depending on value of form method in untitled1.jsp)
    String un = request.getParameter("un").toString();
    String pw = request.getParameter("pw").toString();
    out.println(un);
    out.println(pw);
    Please test this and let me know your results and the differences with what you are trying to do.
    Regards,
    Lynn
    Java Tools Team

  • In WL6.1 request.getParameter returns NULL for URL parameters that exist

              With the following URL, I get different results between WebLogic 4.5.1 and WebLogic
              6.1:
              http://phx-kmccarthy.medspecialists.net/tsweb/ParametersTest.jsp?apple=macintosh&tree&dog&country=USA
              Weblogic 6.1 returns:
              query string = apple=macintosh&tree&dog&country=USA
              apple = macintosh
              tree = null
              dog = null
              country = USA
              WebLogic 4.5.1 returns:
              query string = apple=macintosh&tree&dog&country=USA
              apple = macintosh
              tree =
              dog =
              country = USA
              here is the jsp...
              <%--
              * ParamtersTest.jsp which shows that empty parameters are ignored in WebLogic
              6.1
              --%>
              <%
              String apple, tree, dog, country;
              apple = request.getParameter("apple");
              tree = request.getParameter("tree");
              dog = request.getParameter("dog");
              country = request.getParameter("country");
              out.println("<br>query string = " + request.getQueryString());
              out.println("<br>apple = " + apple);
              out.println("<br>tree = " + tree);
              out.println("<br>dog = " + dog);
              out.println("<br>country = " + country);
              %>
              From the documentation on the getParameter() method:
              Returns the value of a request parameter as a String, or null if the parameter
              does not exist.
              In my opinion, not existing and being empty are different. Also, every other web
              application environment we've dealt with (including WebLogic 4.5.1) treats them
              as different. If the parameter doesn't have a value, (i.e. ...&tree&dog&...) then
              getParameter() returns the empty string, not null.
              As a result of this we have JSPs that break when running on 6.1.
              

    Found the solution at last. Tomcat servlet container can't handle the chunked transfer-encoding that the J2ME Wireless Toolkit uses when you call outputstream.flush() in midlet. Using outputstream.close() instead of outputstream.flush() will avoid this problem for small requests. For all the codes in the articles on Http Post in Wireless Forum, don't use outputstream.flush() and it will run perfectly - Servlet's request.getParameter(parameterName) will work fine in doPost method.

  • Request.getParameter("_ROWKEY") returns null in JDev 3.2

    My SubmitEditForm.jsp uses a bean which inherits from the EditCurrentRecord data web bean. In JDeveloper 3.1 'request.getParameter("ROWKEY")' in this JSP returns the rowkey for the record being edited, but in JDeveloper 3.2 'request.getParameter("_ROWKEY")' returns null. No modifications have bean made to the application - the working JDeveloper 3.1 app has only been compiled in JDeveloper 3.2. Can anyone help please?

    Hi,
    This exception is raised when the multipart/form-data parser has read the number of bytes specified by the Content-Length HTTP header, or tries to read past the end of the input stream, but has not parsed to the end of the message. As implied by the error text, this can happen for a couple of reasons.
    Although its unlikely, it is possible for a client to sent an incorrect Content-Length header. However, we've so far only seen this with a user-written HTTP client. We have yet to see a browser send the wrong value.
    The usual reason for this error is if a user hits the stop button while submitting a form. If the browser has already sent the HTTP header, including Content-Type, then the parser will try to read the entire message. However, this is going to fail, as the browser stops sending the request as soon as the stop button is pressed.
    Finally, there is one more possible reason for this error, and that is if the request is somehow being 'munged' in some way between the browser and the servlet container.
    To help us better understand what is happening here, can you supply
    the following information:
    - Does this problem happen consistently or occur only randomly?
    - When it does happen, is it repeatable, or does it go away if the user hits the submit button again?
    - Does it happen with certain HTML forms, any HTML form, or is it specific to the data entered into a pariticular form?
    - Does it happen with any browser, or a specific version and/or implementation?
    - What is your network configuration? For example, does the problem occur only when going through a proxy server or fire wall.
    - Does it depend on network load? For example, does it happen only at heavy load times?
    - What is you web server configuration, on what platform are you running it, and what JDK version are you using?
    As I'm writing this, the TAR system is down for upgrades - my apologies if you've already supplied this information.
    Regards,
    Simon
    null

  • Not able to get the full value from request.getParameter()

    hi all,
    Iam giving a text input value as" Analysis and tracking" in one jsp form.
    while fetching and assigning the value to another variable using request.getparameter , iam getting only the text "Analysis" , the space after it were ignored andnt displaying it.
    Help me in solving this.
    thanx
    Balaji

    I think you are code is something like this
    <input name="xyz" type="text" value=<%=variable%>>
    HTML ignores spaces. Therefore you are only getting Analysis, the first word, when your browser encounters the first space it ignores whatever is present after that.
    One way of overcoming this is putting double quotes around the text value
    <input name="xyz" type="text" value=<% out.println("\"" + variable + "\""); %>
    Thanks.

  • How to get Int value from request.getParameter()?

    Hi all,
    I have a integer value which is passed from one page to another page.
    i am geting this value in the next page using
    request.getParameter().
    Eg.
    Suppose value of "i" in page1 is 32, i pass this as hidden variable to next page.
    <input type="hidden" Value="<%=i%>" NAME="limit">
    in page2, i fethch this value to a variable by name "limit"
    String limit=request.getParameter("limit");
    but, since value stored in limit is int, i can't assign it to string.
    i can't use request.getParameter for int values.
    How to solve my problem.
    I know it is simple,
    Pls. help me
    Regards
    ASh
    String limit=request.getParameter("limit");

      String limitSTR = request.getParameter("limit");
      int limit = -1;
      if (limitSTR != null) limit = Integer.parseInt(limitSTR);

Maybe you are looking for