How to handle empty string

Hi
i have some 4 text fields in one jsp ,and i wanted to pass some strings to the other jsp ,if i fill only 2 text field then at the other page (after submitting) it gives error as empty string ,i want to handle this error

i am giving the part of error page ,here in this case i am not at all filling 2 text fields ,due to which i am getting the error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: empty String
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled ................................................
root cause
java.lang.NumberFormatException: empty String
     at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java(Compiled Code))
     at java.lang.Float.parseFloat(Float.java(Compiled Code))
     at org.apache.jsp.save_bps_jsp._jspService(save_bps_jsp.java:72)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

Similar Messages

  • How to handle empty file using sftp adapter

    Hi,
    Please explain me how to handle empty files in sftp adapter.
    Thanks,
    Enivass

    Hi Enivaas,
                        I don't have the seeburger sftp adapter at hand at the moment, but asfar as I remember, this does not specifically have an empty-file handling option like the standard ftp adapter.
    So to stop emtyp files from being written, guess would need to handle this at the mapping level. For example, check for target creation criteria in the header node in mapping. If the creation criteria is not met, you can throw an error in mapping.
    You may also incorporate this condition in your Receiver determination. In this case, if the condition is not satisfied, no receiver is determined in PI.
    Regards

  • How to Handle Empty Files

    Hi Experts,
    I am doing File to File Scenario.
    If my Sender systems file is Empty , that means there is no Records in the File .
    How to Handle Empty Files ??????????
    I want to know For both Sender and As wel as Receiver Adapters
    Please Let me know..
    Regards
    Khanna

    See if u are having a sender file adapter and the file is empty u can tell the if it has to 'Process the empty file' or 'Skip the empty file processing'.
    Similarly if you have a message to going to your Receiver file adapter and the message is empty then you can decide still if you want to create a 'File with empty records' or skip creating the same.
    Regards,

  • How to handle empty variable in BPEL Assign.

    Hello ,
    I am using SOA 11g R1
    I have created one Human task with task Details. Also i am assigning the Usercomments/task/comments to onw of my variable, but if I dont provide the comments from worklist comments section, and approves the task, My Assign is giving error as it is empty. So i want to know is there any function in BPEL which can handle Empty string.
    Thank you,
    Sandeep

    By using this type
    bpws:getVariableData('Invoke_DB_WorkOrderNumber_DB_WorkOrderNumber_OutputVariable','OutputParameters','/ns10:OutputParameters/ns10:P_Name')
    !=''
    also i cant give counts because before comparing accessing variable itself gives empty <message fault > error.
    I am still getting selection failure fault as my comments is empty (i..e I am not giving comments)
    does bpws:getVariableData() itself try to access the given parameter and populates empty error.?
    I tried
    bpws:getVariableData('AssigneeApprovalProcess_1_globalVariable','payload','/task:task/task:userComment/task:comment') !=''
    string-length(bpws:getVariableData('AssigneeApprovalProcess_1_globalVariable','payload','/task:task/task:userComment/task:comment') )>0
    but same error still.

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to handle empty Dats field received from SAP RFC response

    Hi All,
    I am invoking a SAP RFC which gives me a Dats field in response.
    A valid dats fields is successfully received by my pipelines.
    But when an empty Dats field is received, My pipeline fails and i get error.
    How to handle the empty Dats field from SAP

    Hi Anant,
    This is because the legacy SAP adapter accepted RFC messages with date field empty. In the new version, the same call results in an error. WCF-SAP adapter doesn't allow blank XML nodes.
    You need to use the below custom pipeline component as a workaround.
    Refer:
    Pipeline component for enabling legacy behavior in WCF-SAP adapter.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • How to Handle the Strings more than 4000 characters in OBIEE 11g

    Hi Folks,
    I have a derived column in RPD where there are like bunch of case statements which involve the columns from 2 or more dimensions. Now I am getting an error ORA-01489: result of string concatenation is too long at OCI call OCIStmtFetch.
    How can we handle this in OBIEE? I have tried the below option that is provided in the below link but I think this work only if it is a single column but in my case it is derived column.
    Please suggest.
    Thanks,
    Bharath

    Bharath,
    Can you try using CLOB function.Check the below URL.Not sure if it helps you.
    sql - LISTAGG function: &amp;quot;result of string concatenation is too long&amp;quot; - Stack Overflow
    Thanks,
    Sasi Nagireddy.

  • How to Handle Empty

    Hi,
       I have two column's Male and Female; based on category, say for ex in professional how many males and how many females like that i am displaying the values. If Females does not contain the values for specific type means it display empty; instead of empty i want to display 0; How i need to check in (IF Condition for empty cell), or another alternative ways.
    Thanks lot,
    Regards,
    -B-

    could you post more details?
    Thanks Man
    Thanks lot
    Regards,
    -B-
    Edited by: Balaji J on Aug 12, 2008 11:43 AM

  • How to handle empty value coming to PI

    Hi Experts,
    My scenario is ABAP proxy to File. ABAP program is sending data to PI with blank value. But in PI payload that field is not showing at all.
    Suppose customer number value is blank in ABAP internal table, in PI payload customer number xml tag is not showing at all in source structure.
    Have used one to one mapping and in content conversion we have used.
    .addHeaderLine      0
    .fieldSeparator     ;
    endSeparator     'nl'
    and also I need - if any value in the source structure is coming empty we need to replace it with semi colon.it is not for a specific field, it might be any field of source structure.
    please help on this.
    Thanks,
    Swapnashree

    Hi,
              Before you call the message mapping in interface mapping, u need a java mapping code. This code will check if the required tag is absent. In case the required XML tag is missing, the java mapping code will insert the tag under proper parent node. This is best accomplished using DOM parser. If you need any further guidance from forum members on how to achieve this, then you need to publish following information
    1. Version of PI you are working on.
    2. Source XML structure.
    3. Target XML structure.
    You may refer to various java mapping blogs in SDN for further information on the topic.
    Else try this mapping of the source field
    Source field--------Exists ------> if  ----------------- target field
    if the condition evaluates true    then  map  source field -------> target else  constant (";") ------->target.
    regards
    Anupam
    Edited by: anupamsap on Sep 20, 2011 2:42 PM

  • How to handle empty  ref cursor

    when my ref cursor is empty how do i prevent null pointer exception
    Thanks

    What are you doing now? Do something else.

  • How to handle empty field in idoc to file scenario

    some field of IDoc is empty, there occurs error. like
    <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:vendor_list/vendor[3]/company_code. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at

    Hi Shen,
    You can do this in two ways :
    1.If you are above XI3.0 SP14 then you can use the node function "mapWithDefault" in between the mapping. This will create the xml tag for the field on the target side even if you are not having those fields in the source side i.e.,  idoc.
    2.At first check your field exists or not at runtime & based on that  If exists then you map it to the target field else if you dont have then if the field is alphanumeric then map the same length spaces as constant in the target or if the target field is numeric then map with a constant having that many no. of zeros.
    Ex:
    If>Idocfield>Exists>then>Idocfield
    >else>constant(may be with spaces or zeros)
    Regards,
    Vinod.

  • How to handle empty columns

    Hi guys,
    I have a template like below
    for each
    Field1 Field2 Field3
    Field4 Field5 Field5
    end for each
    I used a if condition to hide the field when the value is null.
    The report looks like below
    Field1 Field2 Field3
    NULL NULL Field6
    Field7 NULL NULL
    Question is how to make the report look better?

    Hi
    once check this
    https://blogs.oracle.com/xmlpublisher/entry/conditional_rows_and_columns

  • How to handle empty boxes to fill a pallet layer in Packing Instructions

    Hi, I would like to know if it is possible to automatically add empty boxes in an outbound delivery of finished goods when the delivery is complete.
    e.g.  In the packing Instructions I have the following
    1 Pallet
    12 boxes of finished goods ( 4 boxes per layer on the pallet )
    My delivery consists of 9 boxes on 1 pallet there I will need to add 3 empty boxes to create a complete layer on the pallet.
    I would like the system to automatically add the 3 boxes, not manually add them.

    Hi,
    I'm afraid in standard system it's not possible to add this manually. You may consider to discuss it in
    in Enterprise Resource Planning (SAP ERP) where you can find more experts in this area.
    Best regards,
    Claire

  • How to handle XML string with Single Quotes as a parameter to SP dynamically?

    Hi,
    I would like to know if there is a way to handle the Single Quotes in XML value when it is passed to Stored Procedure?
    I should be able to handle it without adding another Single Quote to it.
    Thanks,
    Chandra Shekar

    Hi Chandra,
    Your requirement is not precise. Based on my understanding and guessing, are you metioning something like the below sample?
    /*If the xml is generated you have no need to escape the singe quote(')*/
    DECLARE @xmlTbl TABLE (ID INT,name VARCHAR(99));
    INSERT INTO @xmlTbl VALUES(1,'Eric''s')
    INSERT INTO @xmlTbl VALUES(2,'Zhang''s')
    DECLARE @xmlDoc1 XML
    SELECT @xmlDoc1
    FROM @xmlTbl FOR XML PATH('PERSON'),ROOT('PERSONS')
    EXEC yourProcedure @xmlDoc1
    /*If your copy and paste the xml, you have to escape the single quote(') with 2s('')*/
    DECLARE @xmlDoc2 XML
    SET @xmlDoc2 = '<PERSONS>
    <PERSON>
    <ID>1</ID>
    <name>Eric''s</name>
    </PERSON>
    <PERSON>
    <ID>2</ID>
    <name>Zhang''s</name>
    </PERSON>
    </PERSONS>'
    EXEC yourProcedure @xmlDoc2
    If that is not regarding your requirement, please elaborate with more details.
    Eric Zhang
    TechNet Community Support

  • How to handle empty PDF document when using Sections

    I have below XML structure
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
    <LIST_INVOICES>
    <INVOICES>
    <INVOICE_NUMBER>30363</INVOICE_NUMBER>
    <INVOICE_DATE>2009-02-24T00:00:00.000-05:00</INVOICE_DATE>
    <INVOICE_COMMENTS/>
    <LIST_HEADERINFO>
    <HEADERINFO>
    <OUR_REFERENCE>12146</OUR_REFERENCE>
    <CUSTOMERNAME>ABC</CUSTOMERNAME>
    <CONTROLKEY>FREE</CONTROLKEY>
    <COUNTRY>TEST</COUNTRY>
    <YOUR_REFERENCE/>
    <ACCOUNTNUM>2997</ACCOUNTNUM>
    </HEADERINFO>
    </LIST_HEADERINFO>
    </INVOICES>
    <INVOICES>
    <INVOICE_NUMBER>30363</INVOICE_NUMBER>
    <INVOICE_DATE>2009-02-24T00:00:00.000-05:00</INVOICE_DATE>
    <INVOICE_COMMENTS/>
    <LIST_HEADERINFO>
    <HEADERINFO>
    <OUR_REFERENCE>12146</OUR_REFERENCE>
    <CUSTOMERNAME>ABC</CUSTOMERNAME>
    <CONTROLKEY>FREE</CONTROLKEY>
    <COUNTRY>TEST</COUNTRY>
    <YOUR_REFERENCE/>
    <ACCOUNTNUM>2997</ACCOUNTNUM>
    </HEADERINFO>
    </LIST_HEADERINFO>
    </INVOICES>
    </LIST_INVOICES>
    </DATA>
    I am using below loop to generate different sections
    <?for-each @section INVOICES?>
    <?end for-each?>
    It works great when I have some data.
    For some reason if there is no data generated then I get an error message saying that document not found.
    Can someone suggest what should i put here so that if data is not coming then print 'No Data Found'
    I looked at Tim's blog but that does not help and I am still getting the same error.
    Below is XML generate when no data found
    DATA>
    <LIST_INVOICES />
    </DATA>
    Please advise.

    Vetsrini
    I do have the latest one. But it the kind of template I am using it has last-page tag and some templates defined in it.
    That might be reason it is not taking the if condition for Section break. I can send my document to you if you provide me ur email address.....

Maybe you are looking for

  • How to get the closing event (not closed) of Dialog control

    Hi All, I have one requirement, that I have to close the Dialog box in an animated way like on clicking of the Dialog close button the popup has to close from top to bottom in a slide effect. sap.ui.commons.Dialog When I tried closed method of Dialog

  • How to create a Notification in the Action center when the app is in the suspended state...?

    Hi, I want to send a notification to the action center of Windows phone 8.1, when I get a callback from the lower layer code which I have registered for(I have implemented). I am able to do it when my app is in the foreground. How can I achieve the s

  • Downloading pdf files in Safari

    Lately I'm having trouble downloading pdf files that are open in the Safari window. I'm using the latest versions of Safari Adobe Reader on an IMac OSX 10.6.8. I used to download them simply with "command s", now it says "the document ... cannot be e

  • AccessControlException & Reflection ...

    Hi all, I have an extremely strange error with my Applet. I have a signed Applet that loads a bunch of GUI components using a custom class loader. That all works fine. In fact, the following works and is tested: - Signed applet tested and works - Cla

  • Load Flat File into BW-BPS using a Web Browser....

    Hallo, I am trying to implement the titled How To with some modifications. I am trying to read the uploaded data in the extension class of the Web Interface. The details are as follows: <b><u>Modification 1)</u></b> - Instead of using the standard su