GetParameter not working in my function?

hi ! I have this function but seems that the getparameter in not working and least its not catching anything.
public void facturando(HttpServletRequest request,HttpServletResponse response){
      try{
  HttpSession sesion = request.getSession(true);    
  HashMap respuesta = null;
  RequestDispatcher dispatcher = null; 
  String sDNI=null;
  BeanBDFactura bBDFac = null;
  bBDFac = new BeanBDFactura();
  System.out.println("ESTOY facturando");
       String nombre=request.getParameter("nombre"); //en realidad es nombre + apellido
       String fecha=request.getParameter("fecha");
       double totalservicios=Double.parseDouble(request.getParameter("servicios"));
       int descuento=Integer.parseInt(request.getParameter("descuento"));
       double IVA=Double.parseDouble(request.getParameter("IVA"));
       double total=Double.parseDouble(request.getParameter("total"));
       System.out.println("Datos de registrar la factura");
       System.out.println("Nombre: "+nombre);       
       System.out.println("Fecha: "+fecha);
       System.out.println("Servicios: " +totalservicios);
       System.out.println("IVA: " +IVA);
       System.out.println("Total: " +total);
       bBDFac.registrafactura(nombre,sDNI,fecha,totalservicios,descuento,IVA,total);
       RequestDispatcher rd=getServletContext().getRequestDispatcher("/exito.jsp");
       rd.forward(request,response);
     catch(Throwable theException)
  }When I execute this I get a blank page and it stops before the
System.out.println("Datos de registrar la factura");
So its a problem with getparameter. What could be causing it ?
Thanks!

With problems like this you have to query even your base assumptions.
request.getParameter() is returning null.
There could be any number of reasons for this - no parameters passed, parameter mis-spelled etc etc
So back to basics
1 - in your servlet print out all the parameters and their values
  Map params = request.getParameterMap();
  for(Iterator it = params.entrySet().iterator(); it.hasNext(); ){
    Map.Entry me = (Map.Entry)it.next();
    String param = (String)me.getKey();
    String[] values = (String[]) me.getValue();
    System.out.println(param + " = " + values[0]);
  }That will show you all the parameters getting to your servlet.
If there are no parameters, check how you are invoking the servlet. Via a url or a form submission?
If there ARE parameters, is the one you want there? Is it misspelled?
Its not working, so something, somewhere is wrong.
This is the first step in finding out.

Similar Messages

  • Brand new 15" MacBook Pro Retina - unplugged from Thunderbolt Display and Keyboards today find keyboard alpha-numerics not working; except the function keys, delete key, tab key, command/ctrl/shift/alt/fn and arrow keys; and 7/8/9/u/o/j/l nudge cursor

    Brand new 15" MacBook Pro Retina - unplugged from Thunderbolt Display and Keyboards today find keyboard alpha-numerics not working; except the function keys, delete key, tab key, command/ctrl/shift/alt/fn and arrow keys; and 7/8/9/u/o/j/l produce cursor nudges.

    It's a new machine - and the Thunderbolt Display is meant to work with it. You need to just make an appointment at your local Apple Store and have them fix whatever is wrong.
    If you like, you could always try a SMC reset and a PRAM/NVRAM reset to see if either of those will get your keyboard back in working order...
    Clinton

  • HELP! Parameter passing and getParameter not working !

    I have a problem with parameter passing from Javascript to a HTML page.
    I create a new window using window.open() with the following URL passing an argument :-
    Dropdown.html?routineArgs='CUSTOMER'
    In the Dropdown.html page I have the follwoing :-
    <% String args=request.getParameter("routineArgs"); %>
    <script language="JavaScript">
    function requestList()
         var xx = "<%= args %>";
    alert("Args = " + xx);
         document.dropdown.routineArgs=args;
         document.dropdown.submit();
    </script>
    <title>Drop Down List</title>
    </head>
    <body onLoad="requestList()">
    What am I doing wrong ? The alert in the funtion requestList just shows me "<%= args %>" and not the value of the parameter !
    Thanks.
    Sarah.

    I've tried changing Dropdown.html to Dropdown.jsp but it still doesn't work. When I hit the alert I still get printed the message :
    Args = <%= args %>
    The Javascript part does not seem to get parsed.
    Sarah.

  • Javascript For loop not working within a function

    Hi all,
    I'm a beginner to LiveCycle and I cant seem to get a loop working within a function.  The function is being called successfully because when I manually create the code it works but I am trying to clean things up.
    So here is my working example:
    function hideContent() {
            MainFlowedSub.LevelsSub.Table1.presence = "hidden";
            MainFlowedSub.LevelsSub.Table2.presence = "hidden";
           ... and so on....
             MainFlowedSub.LevelsSub.Table8.Row1.presence = "hidden";
            MainFlowedSub.LevelsSub.Table8.Row2.presence = "hidden";
           ... and so on....
    However when I try and creat a loop instead of listing every sing table/row nothing happens. this is important to my project as there will be alot of different rows depending on radio button selections earlier in the form.  Below is the current state of my code:
    function hideContent() {
        var i=0;
         for (i=1;i<=5;i++)
             MainFlowedSub.LevelsSub.Table[i].presence = "hidden";
        var j=0;
         for (j=1;j<=23;j++)
             MainFlowedSub.LevelsSub.Table8.Row[j].presence = "hidden";
        var k=0;
         for (k=24;k<=88;k++)
             MainFlowedSub.LevelsSub.Table8.Row[k].presence = "hidden";
    this will then continue as there will be hundreds of rows.
    Any help will be greatly appreciated and I am sure I am making a basic error  so thanks in advance.
    j

    thanks for your help paul.  Again, really appreciated as I know very little about all this.
    Unfortunately its still not working... One thing I am sure of is that I am doing something very basic wrong. So here is my code, I have applied your suggestion above which will cover all my data:
    To give an understanding, I have 5 tables of content, each has i amount of rows. and I am running this script to clear/remove all items being displayed.
    function hideContent() {
        for (var i=1;i<=5;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table[" + i + "]").presence = "hidden";
        for (var i=1;i<=71;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table8.Row[" + i + "]").presence = "hidden";
        for (var i=1;i<=93;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table9.Row[" + i + "]").presence = "hidden";
        for (var i=1;i<=99;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table10.Row[" + i + "]").presence = "hidden";
        for (var i=1;i<=101;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table11.Row[" + i + "]").presence = "hidden";
        for (var i=1;i<=87;i++)
            xfa.resolveNode("MainFlowedSub.LevelsSub.Table12.Row[" + i + "]").presence = "hidden";
    It has to be something to do with my For loops because if I manually insert each line it works perfectly.
    Thanks again,
    johnny

  • Input Help (F4) does not work for Planning Functions in Web

    Hi Gurus,
    I am working in BI-Integrated Planning.
    When I execute a planning function from web layout (through Web Application Designer), the "Input Help" does not work. When I give F4 it takes me to the initial planning layout screen from the planning function variable screen without any action being performed.
    But the "Input Help" works fine when I have to select for the variable from the initial selection to open the planning layout.
    Can anyone suggest me any fix for this...
    Thanks!!!

    Hi All,
    Can somebody help me here what went wrong with indesign cc extension so that copy/paste does not work in input type element text
    Regards,
    Alam

  • DBMS_OUTPUT.PUT_LINE not working in Stored Functions

    Hi All,
    I have one doubt, why is dbms_output.put_line not supported in Stored Functions?
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    end;
    Returns error -
    LINE/COL ERROR
    5/3 PL/SQL: Statement ignored
    5/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    7/3 PL/SQL: Statement ignored
    7/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    Any idea why this is happening?
    I know that to print value one can just use return statement and value will be printed in SQL Prompt.
    But what makes me think is why error for PUT_LINE method?
    If error is not thrown at DBMS_OTUPUT then doesnt that mean all methods of DBMS_OUTPUT should be accessible in a function.
    Thanks in advance!
    Av.

    Hi,
    For cant call proc inside func, or in-line thing you mentioned, just tried following -
    Here is our previous Func -
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    /*If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    exception_test;
    return 'a';
    end;
    and here is our proc -
    procedure exception_test
    as
    v_count1 number;
    v_count2 number;
    begin
    select count(test_id)
    INTO V_COUNT1
    from TEST_TABLE;
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line(v_count1);
    exception
    when no_data_found then
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line('no_data');
    WHEN TOO_MANY_ROWS THEN
    dbms_output.put_line('too many rows');
    when others then
    dbms_output.put_line('others');
    end;
    and here is the call to func -
    SQL> select func_in_sql(x) from t1;
    FUNC_IN_SQL(X)
    a
    a
    a
    a
    4 rows selected.
    So this shows it works.
    Is this what you said? or Am I getting you wrong?
    Thanks!
    Av.

  • Satellite U840W/001 W8 Fn+Z not working in Special Function Key Mode

    Hi,
    I realised that the Fn+Z does not work when my Special Functions Key mode is on i.e: when I can control the volume by just pressing F9 without pressing the Fn button.
    However, when the Special Function Keys Mode is off (& I have to press Fn with the F# buttons to control the volume), only then does the Fn+Z switch the keyboard backlight on & off.
    When I open my function key program, the only option available is to either switch the notification settings on/off. There's no timer control or anything useful on it.
    My BIOS does not have any keyboard backlight setting, only the option to use the normal Fn+F# or to use the special function key mode.
    Please help me.
    Thanks

    >I realised that the Fn+Z does not work when my Special Functions Key mode is on i.e: when I can control the volume by just pressing F9 without pressing the Fn button.
    Hmm in my case using Windows 7, the Fn + Z works even if the Special Functions Key mode is enabled. But I cannot say for sure how it works running Win 8
    On Satellite U940 with Win 8, the Fn + Z works properly too (Special Functions Key mode ON)

  • Volumne control via the earphones is not working, all other functions stop,start, next/orevíous title work fine

    Hello,
    the volumne control of my apple earphones is not working.
    All other functions available at the switch on the earphones work fine (Stop, Start, next/previous title, accept incoming call)
    I have already several times rebooted the iPhone 5S.
    I'm gratefull for every hint

    Hello Any one? Apple?
    Ah forget it... it been two weeks and nothing.
    The product wasn't even designed to last for 2 years, and mine is trash after less than one.
    I will NEVER buy another song from the itunes store or another iPod. or even another Mac product for that matter.
    Message was edited by: Chompers417

  • Auto-complete not working on variables/functions within a class in FlashBuilder 4.5

    Hi all,
    I'm using Flash Builder 4.5 (not burrito), and I'm not getting auto-complete on variables or functions within the class I'm working in.  It will auto-complete classes, and even variables within another variable, but not a variable within that class.
    As an example, let's say I have a class with this var:
    private var myDate:Date = new Date();
    If I start typing myD, I can't get myDate to autocomplete.  But once I type myDate., I'll get auto-complete for all the variables/functions in the Date class.
    I've tried re-installing FlashBuilder and switching workspaces, but with no luck.
    Also tried creating a brand new test project, but it didn't work there either.
    Anyone have any ideas what might be wrong?
    Thanks!

    Hi,
    After you type "myD" If u press cntrl + space it should auto-complete to myDate. Please raise a bug in http://bugs.adobe.com/flex with the sample project as i am not able to reproduce.
    On the other hand if you were expecting code hint to show up as soon as you type "myD" (without pressing cntrl+space) , Please follow the below step.
    Go to Window -> Preferences -> Flash Builder -> Editor
    check the "use additional custom triggers" check box. Leave the keys as default value .
    That should work for you .

  • HTML5 code hinting not working inside Javascript Function on DW CS6

    Hi,
    I am working on Dreamweaver CS6 and code hinting isnt working as expected when writing Javascript code.
    The minute I insert a function the code hinting doesnt display HTML5 items anymore.
    Should I remove the function then the HTML5 hinting reappears.
    How do I get the code hinting to work when I add in the function?
    Thanks
    Herman

    Herman Kramer wrote:
    Thanks for this. Please keep me posted if this is a bug or not.
    For now it does look like a bug. Let's wait for someone from Product team to revert.

  • IPlanet plugin for WebLogic not working - cannot find function named wl_init

    Hi,
    I have been having this issue for the last two days. It relates to
    IPlanet plugin for WbLogic. Following is the error I get:
    [17/Apr/2003:11:41:26] config ( 2069): func_exec reports: cannot find
    function named wl_init [17/Apr/2003:11:41:26] failure ( 2069):
    Configuration initialization failed: Error running init function
    wl_init: unknown error
    Here is my environment:
    SUN E-250 Server
    Solaris 8.0 with recommended Patch-set
    iPlanet-WebServer-Enterprise/6.0SP4
    Web logic 7 SP2
    Here is how I have edited magnus.conf to include the following lines:
    Init fn="load-modules"
    shlib="/usr/iplanet/servers/plugins/lib/libproxy.so" func
    s="wl_proxy,wl_init" Init fn="wl_init"
    #ServerRoot /usr/iplanet/servers/https-cablevision5
    ..... rest of the file ..........
    As you have noticed I have put everything regrding plugin in one line.
    I have also used various other combinations of breaking this line
    into multiple lines but no use.
    What I have also noticed is that if I change the name of libproxy.so
    to some other arbitrary file name that does not exist, even then the
    error message does not change. So it looks like the library is not
    even being loaded.
    The library file is owned by root and has permissions to read and
    execute for everyone.
    I will really appreciate is I can get any help. I have noticed that
    there are folks who have posted similar problem, no one gave an answer
    to them. Please be more generous this time in furnishing with your
    opinion.
    Thanks
    Jamal

    I will try and be as descriptive as possible. I hate the posts that
    dont give any help.
    Anyway you did not mention anything about your obj.conf configuration.
    Here is how it should look, e.g.:
    Init fn="load-modules" funcs="wl-proxy,wl-init"\
    shlib=/usr/local/netscape/plugins/libproxy.so
    Init fn="wl-init"
    <Object name="weblogic" ppath="*/weblogic/*">
    Service fn=wl-proxy WebLogicHost=myweblogic.server.com\
    WebLogicPort=7001 PathTrim="/weblogic"
    </Object>
    Check the following url:
    http://www.weblogic.com/docs51/admindocs/nsapi.html
    Ok,so you probably have those in there. If not, then please check
    that you have directives in obj.conf and the magnus.conf as well.
    Again the service line should be all one line.
    Next, are you proxying by path or by suffix. I.E. do you want
    everything to go to weblogic or just .jsp. You can configure either
    way. This will change your directive. Specifically ppath means proxy
    by path. To proxy by file extension (or what i call suffix) then look
    at this url for specifics:
    http://www.weblogic.com/docs51/admindocs/nsapi.html#exts (notice the
    anchor in the link)
    Post how it goes...
    a.r.
    [email protected]
    [email protected] (Jamal Najmi) wrote in message news:<[email protected]>...
    Hi,
    I have been having this issue for the last two days. It relates to
    IPlanet plugin for WbLogic. Following is the error I get:
    [17/Apr/2003:11:41:26] config ( 2069): func_exec reports: cannot find
    function named wl_init [17/Apr/2003:11:41:26] failure ( 2069):
    Configuration initialization failed: Error running init function
    wl_init: unknown error
    Here is my environment:
    SUN E-250 Server
    Solaris 8.0 with recommended Patch-set
    iPlanet-WebServer-Enterprise/6.0SP4
    Web logic 7 SP2
    Here is how I have edited magnus.conf to include the following lines:
    Init fn="load-modules"
    shlib="/usr/iplanet/servers/plugins/lib/libproxy.so" func
    s="wl_proxy,wl_init" Init fn="wl_init"
    #ServerRoot /usr/iplanet/servers/https-cablevision5
    ..... rest of the file ..........
    As you have noticed I have put everything regrding plugin in one line.
    I have also used various other combinations of breaking this line
    into multiple lines but no use.
    What I have also noticed is that if I change the name of libproxy.so
    to some other arbitrary file name that does not exist, even then the
    error message does not change. So it looks like the library is not
    even being loaded.
    The library file is owned by root and has permissions to read and
    execute for everyone.
    I will really appreciate is I can get any help. I have noticed that
    there are folks who have posted similar problem, no one gave an answer
    to them. Please be more generous this time in furnishing with your
    opinion.
    Thanks
    Jamal

  • S920 - Not working for specific function

    I have bought S920 last month
    Model No Lenovo S920_ROW
    Android 4.2.1
    Baseband Version
    S920.V23.2013/05/22 00:19
    Build Number
    S920_ROW_S121_131217
    The phone sometimes does not respond on unlocking to enter my PIN.
    I am not able to make phone recognize OK buttion during a OK / Cancel Popup.
    Few touch suddenly stops working and then it responds to the same touch after sometime.
    Can you please check on this and help me resolve this?
    -Sri

    Hi Sriram... Is this issue resolved?

  • Request.getParameter() not working correctly for Check Boxes!

    Hi,
    I am writing my own custom form action in cq5.4 and I need to access the fields of my form. I have a checkbox component on my form named 'cbox' and now I want to access it.
    So this is the code I'm writing in the JSP
    String name = request.getParameter("cbox");
    But when I fill up the data on the form and submit it.. I only get the first element of the checkbox which I had selected. So suppose if the checkbox was having some options..
    a
    b
    c
    d
    and if I selected b and d then I only get 'b'.
    Actually the type of the name variable must be String Array. But when I do..
    String[] name = request.getParameter("cbox");
    //it gives me compilation error saying cannot convert from String to String[]
    I cannot understand whats happening here. Can someone help me? How do I find out that which options has the user checked?
    Thanks!

    I think you are looking for getParameterValues().
    If you read http://docs.oracle.com/javaee/1.3/api/javax/servlet/ServletRequest.html#getParameter(java. lang.String) and http://docs.oracle.com/javaee/1.3/api/javax/servlet/ServletRequest.html#getParameterValues (java.lang.String), you'll see the behavior you are seeing is as-documented.

  • Not working Billing Block functionality for Invoicing Plan

    Hi Experts,
    I am using Invoicing plan functionality to purchase materials by using Milestones from Network of Project System. The system is allowing to post Vendor Invoice (MIRO) without removing of Billing Block of Invoicing Plan from PO and the system should give error message because of non removal of Billing block.
    The following configuration was done in Invoicing Plan of PS.
    1. Assigned Date Category to Invoicing Plan Type (30)
    2. Assignment of Invoicing Plan Type to Network Profile
    The following configuration was done in Invoicing Plan of MM.
    1. Assigned default date category to Partial Invoicing Plan type
    2. Maintained Date category to Invoicing Plan type
    3. Assigned Date proposal category to Invoicing Plan Type
    4. Maintained Date Proposal to Invoicing Plan Type
    What are the changes needs to do in configuration or transaction to prevent to post vendor Invoice because of nonremoval of Billing block from Invoicing Plan?
    Please give me the solution.
    Thanks in advance,
    Rao

    Hi Rao
    You need to have the invoicing plan done in Project System (PS) under the project with Milestones and save the plan. On dong this, the system would generate a 'Reference Number'. This can be seen when you again go to the invoicing plan.
    Use this reference number in the MM invoicing plan to link the PS & MM plans. This would create a block automatically in MM which can be lifted only on confirmation of the appropriate Milestone in PS.
    Hope this helps
    Venu

  • Quadratic probing not working in insert function, HELP!!

    I have code that reads in a file of words and inserts them into a index of the array based on their hash value. Now some words have the same hash value, such as "truck" and "lo" which are both in the file i have. The file is in alphabetical order, so it should put truck in table[11889] and when it gets to lo, the insert method should see that it is not null and it should quadratically put this in a null location, but its overwriting truck, so when i search for truck, it does not find it.
    Here is the code:
    import java.io.*;
    public class HashTable {
    private String[] table = new String[59999];
    private int numentries;
    static int i = 1;
    static int j = 1;
    public HashTable()
    public int hashFunction(String w)
    int slot = 1;
    for(int i = 0; i < w.length();i++)
    slot *= (int)w.charAt(i);
    slot = slot%59999;
    if(slot < 0)
    slot +=59999;
    return slot;
    public boolean search(String w)
    int value;
    value = hashFunction(w);
    if(value < 0)
    value+= 59999;
    if(table[value].equals(w))
    return true;
    else
    while(value < 59999)
    if(table[value].equals(w))
    return true;     
    value = (value + j * j)%59999;
    if(value < 0)
    value+= 59999;
    j++;
    return false;
    public void insert(String w)
    int value;
    value = hashFunction(w);
    if(value < 0)
    value+= 59999;
    if(table[value] == null)
    table[value] = w;
    else
    while(table[value]!= null)
    value = (value + i * i)%59999;
    if(value < 0)
    value+= 59999;
    i++;
    table[value] = w;
    public static void main(String[] args) throws IOException
    HashTable hashTable = new HashTable();
    String word;
    String file;
    String check;
    System.out.println("Welcome to the SpellChecker!");
    System.out.println("Enter the name of your dictionary file.");
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    //file = input.readLine();
    FileReader fr1 = new FileReader("c:\\general\\words.txt");
    BufferedReader keyboard = new BufferedReader(fr1);
    while((word = keyboard.readLine())!=null)
    hashTable.insert(word);
    keyboard.close();
    System.out.println("Great, you dictionary has been stored in memory.");
    System.out.println("What word would you like to check");
    word = input.readLine();
    if(hashTable.search(word))
    System.out.println(word + " is a valid word in the dictionary");
    else
    System.out.println(word + " is not a valid word");
    System.out.println("Would you like to check another word?");
    check = input.readLine();
    while(check.equals("yes"))
    System.out.println("What word would you like to check?");
    word = input.readLine();
    if(hashTable.search(word))
    System.out.println(word + " is a valid word in the dictionary");
    else
    System.out.println(word + " is not a valid word");
    System.out.println("Would you like to check another word?");
    check = input.readLine();
    System.out.println("Thank you for using the SpellChecker!");
    }

    ok, i'm extremely new to java programming. I want to know more about hashtables and i've found that this was the best example i've found so far. Unfortunately there's no comments, in it, so i don't know what is going on in some places. For example, what is the method that is used to put the words into the table? how can you change it? Is there a special way that the words have to be put into the txt file? does it count periods and commas as a null space or does it count them as a character? aslo, when i run the program, i get the following runtime error:
    Exception in thread "main" java.lang.NullPointerException
    at HashTable.search(HashTable.java:45)
    at HashTable.main(HashTable.java:119)
    my code is exactly the same as up above except that i took out the static declaration in front of i and j, i commented out (not deleted) the j declaration, and put a new j declaration in the search method like this:
    public boolean search(String w)
    int j = 1; // <~~~~~this is the added line
    int value
    Please help

Maybe you are looking for

  • Can i transfer music from my new computer to my ipod nano?

    I have been happily using my new ipod nano for some months. I have just bought a new computer. I downloaded itunes for the new computer and started to add some new cds. Now i am connecting my nano to the new computer for the first time and am trying

  • A/r Credit Memo (service) - Closed status

    Dear All, How would a service credit memo closed? As far as i'm concern, its either we offset it during incoming payment (to contra with other document) or during internal reconciliation. Correct me if i'm wrong. Is there any other method can this do

  • Cancellation of UD

    HI, Is it possiblt to cancellation of UD on the date of Inspection lot creation date. Regards, Malyadri.

  • FLEX 2 Bug ??

    Hello, Check this simple example : http://astronaute.net/_temp/flex/flexTest3/flexTest3.html source : http://paste.sharewonders.com/Default.aspx?fv=9aae6eca-becf-4c44-8797-0974e44c2852 if you first click on CHANGE LABELS, only the label in first view

  • Ipod classic won't update

    the past few times I've connected my ipod to to itunes, it doesn't update. there's also no "update ipod" option under any menus. ***? anyone know why?