To find number of parameter from request

Freinds,
Is there any way to find out number of parameter submitted from request object. But the constraint will be with out going through loop.
Example
int count = 0;
          Enumeration list = request.getParameterNames();
          while (list.hasMoreElements())     {
               count++;
               list.nextElement();
          }

Can some body help me to resolve the warning created by this line
ArrayList paramList = null;
paramList = new ArrayList(Collections.list(request.getParameterNames()));CheckFilter.java:96: warning: [unchecked] unchecked conversion
found : java.util.Enumeration
required: java.util.Enumeration<T>
paramList = new ArrayList(Collections.list(request.getParameterNames()));
^
CheckFilter.java:96: warning: [unchecked] unchecked method invocation: <T>list(java.util.Enumeration<T>) in java.util.Collections is applied to (java.util.Enumeration)
paramList = new ArrayList(Collections.list(request.getParameterNames()));
^
CheckFilter.java:96: warning: [unchecked] unchecked call to ArrayList(java.util.Collection<? extends E>) as a member of the raw type java.util.ArrayList
paramList = new ArrayList(Collections.list(request.getParameterNames()));

Similar Messages

  • Getting value of parameter from request object

    If i submit a form using button element of html form then i dont get name of the button element as Parameter of request object and hence its value.
    why and how?
    Thanks in advance

    what do you mean submit a form with a button? You don't submit a form with a button, you submit it with a submit element. Unless you use Javascript to submit from an onclick handler in the button. In which case, you aren't submitting from the button, but from the script. I'm not sure that buttons are sent in forms. Why would they? If you are using buttons and Javascript, then you could use a hidden field and set it's value to the button's value when it's clicked before submitting the form.

  • Remove parameter from Request

    Hi,
    my Servlet computes a request (doGet()-method) with some parameters (e.g. http://myApp/test?param=Hello).
    Then it forwards to another servlet/jsp:
    request.getRequestDispatcher("/mySite").forward(request, response);
    But before forwarding, I want to remove the parameters! How can I do this?
    I cannot find a method like "request.removeParamter(param)" in the API!
    Thanks
    Daniel :-)

    Hi everyone.
    I had a similar problem and I've resolved it with a workaround: I needed to forward a Servlet to the Servlet itself, for multiple data posting, so I used a request attribute to determine if I was processing the first call or the next ones.
    I think this workaround will work also when you must forward Servlet1 to Servlet2.
    Here's the code:
    In the first time call (or in Servlet1):
    if (...some conditions...) {
    // Instead of removing parameter...
    request.setAttribute("switch","Y");
    In the next calls (or in Servlet2):
    String par = null;
    String switch = (String)request.getAttribute("switch");
    if (switch == null) {
    par = (String)request.getParameter("par");
    I know that in this way the "par" parameter is not really removed, however, if you managed the attribute "switch" correctly, it would be null.
    Don't forget to remove the attribute from the request when you no longer need it. Let's clean our junks... ;-)
    Hope this helps.
    Carlo

  • Get Date parameter from request

    hi all,
    i've a JSP in which there is a date field, in the JSP i'm declaring a date variable and use request.getParameter but the date variable store another date with time part while i want the entered date without time part...any help?

    My CO --------------------------
    if( pageContext.getParameter("Submit") != null)
    String userid = (new Integer(pageContext.getUserId())).toString();
    String personid = (new Integer(pageContext.getEmployeeId())).toString();
    String v_date = pageContext.getParameter("StartDate")+"";
    String v_end_date = pageContext.getParameter("EndDate")+"";
    System.out.println("call to process request0 : " + userid);
    System.out.println("call to process request0 : " + personid);
    System.out.println("call to process request0 : " + v_date);
    System.out.println("call to process request0 : " + v_end_date);
    Serializable[] params = {personid,v_date,v_end_date};
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String empUserid = pageContext.getUserName();
    System.out.println(pageContext.getUserName());
    System.out.println("Calling initMoverQuery");
    am.invokeMethod("initMoverQuery", params);
    System.out.println("Call out of initMoverQuery");
    My AM------------------------------------------------------------
    public void initMoverQuery(String pid,String sd,String ed)
    System.out.println("In init Query of AM" +pid);
    EmployeeMoverVOImpl vorep = getEmployeeMoverVO1();
    Number personid = new Number(Integer.parseInt(pid));
    System.out.println("user id"+ personid);
    System.out.println("start date"+ sd);
    System.out.println("end date"+ ed);
    if (vorep == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "EmployeeMoverRepVO1")};
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    if (!vorep.isPreparedForExecution())
    // vorep.initQuery(personid,sd1,ed1);
    vorep.setWhereClauseParam(0,personid);
    vorep.setWhereClauseParam(1,sd);
    vorep.setWhereClauseParam(2,ed);
    vorep.executeQuery();
    System.out.println("End SP VO Query");
    }

  • Pass parameter from request

    Hi,
    I have 2 pages, in page2 CO2, it passes parameter 'cancel'
    processFormRequest{
    else if("Cancel".equals(pageContext.getParameter("event")))
    pageContext.putParameter("cancel", "Y");
    pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG",
    null,(byte)0,null,null,true,null);
    in page1, CO1, I get the parameter 'cancel'.
    processRequest{
    cancel = pageContext.getParameter("cancel");
    Now, if I want pass 'cancel' to processFormRequest of CO1, how should I do it?
    thanks
    Lei

    Lei,
    To get the value in co1, there are two alternatives:
    1)Pass value in hashmap:
    HashMap hmap= new HashMap();
    hmap.put("cancel","Y");
    pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG",
    null,(byte)0,null,hmap,true,null);
    in page1, CO1 processRequest, you can get it by
    cancel = pageContext.getParameter("cancel");
    2)Pass param in url itself:
    pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG&cancel=Y",
    null,(byte)0,null,null,true,null);
    in page1, CO1 processRequest, you can get it by
    cancel = pageContext.getParameter("cancel");
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to find the Purchase Orders from Sales Order number

    Hi ...
    Is there a way to write a query to find the Purchase orders
    from the Sales Order number ....
    I have notice the table POR9 (Purchase Order - base Document)
    but it seems to be empty.
    Could you please help me to figure this out,
    Thank you very much
    Kind Regards
    Sanjaya

    hi,
                 u did mistake in selecting the table
    SELECT T0.DocNum FROM ORDR T0                 for  sales order
    SELECT T0.DocNum FROM OPOR T0                 for purchase order
    how to find the table in SAP B1.
    go to above menu view => system information. tick it(or select it)
    then below status bar u can see the table and field name.
    open the required form and just keep the  mouse cursor  on any field.
    you can see the table and field name below.
    hope now u can able to track the table name.
    regards
    sandip

  • Response status has number of values different from request

    Hi,
    I'm getting the following message when I try to refresh a worksheet from a workbook.
    "Response status has number of values different from request"
    Has anyone encountered this message? what does this mean?
    I'm using SmartView 11.1.2.1.103 on HFM 11.1.2.1.103 environment.
    Thanks in advance,
    Ram

    Try removing external calculations (/$C$1) and see if the error message changes.

  • How to find the message_ID/Reference_ID from a IDOC number

    hi
    can some one tell me how to find the message_ID/Reference_ID from a IDOC number
    regards
    Buddhike

    hi,
    check the t.code IDX5 .
    also check the below link for reference
    Monitoring the IDOC Adapter in XI/PI using IDX5                         
    Monitoring the IDOC Adapter in XI/PI using IDX5                         
    regards
    kummari
    Edited by: kummari on Jul 28, 2008 9:20 AM

  • How to find the approver from request key

    How to determine the approver from request key.
    If the approver is a group where do i find the correlation.
    I have checked WFTASK and WFTASK HISTORY but unable to correlate. This is with respect to OIM 11G R2
    Many Thanks

    select IDENTIFICATIONKEY, TASKID, TASKGROUPID, TASKNUMBER, OUTCOME, STATE, ASSIGNEDDATE, Assignees, APPROVERS, TASKDEFINITIONNAME, CREATOR, ORIGINALASSIGNEEUSER, SUBSTATE from WFTASK where identificationkey = <request key>

  • I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contracts from my phone that I did not want there and find they are now gone from my e-mail account on my computer.  Can I retrieve them?

    I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contacts from my iphone that I did not want on my phone. when I went into my e-mail account on my computer the contacts were deleted from there also.  Will I be able to retrieve them?  If so, how?  Thank you.

    In the device sync pages select Photos on the top at the right.
    Un tick Sync Photos
    Apply

  • $count parameter from an EntitySet

    Hallo everybody,
    today I spent the whole day to find a soution to get acces to the $count parameter from an existing SAP NetWeaver Gateway service and the associated entitySet. Up to now it doesn't work....
    The $count parameter is reachable under following link:
    http:/...../sap/opu/odata/sap/ZXXPUR_UI5_APP_GY_MONITOR_SRVreportsSET/$count
    Here is the response:
    I tried to use this parameter to use it for an "count" parameter for an IconTabFilter.
    <IconTabFilter icon="sap-icon://time-entry-request" id="backgroundJobsTab"
      text="Backgroundjobs" design="Horizontal">
    <content>
    </IconTabFilter>
    And here is my sourcecode to get / bind the parameter to the count parameter from the IconTabFilter:
    var countData = new String("0");
    var cURL = this.getUrl("/sap/opu/odata/sap/ZXXPUR_UI5_APP_GY_MONITOR_SRV/reportsSET/$count");
      $.get( cURL, function(data) {
      console.log(data);
      console.log(countData);
      countData= new String(data);
      console.log(countData);
      }, "text")
    oIconTabFilter = this.getView().byId("backgroundJobsTab");
    oIconTabFilter.setCount(countData);
    Here is a picture from the debug mode / developer tools from Googe Chrome:
    So normally I get back an string "12". But why it get not displayed / set for the count parameter ?
    Many thanks
    Dominik

    The countData is not generated when you set it to IconTabFilter. The get request you do is asynchronous, so do something like this
    oIconTabFilter = this.getView().byId("backgroundJobsTab"); 
    $.get( cURL, function(data) { 
    console.log(data); 
      console.log(countData); 
      countData= new String(data); 
      console.log(countData); 
    oIconTabFilter.setCount(countData);
      }, "text")  ;

  • I can't get past the "redemption" phase in Elements.  I enter the number I got from Amazone, where I downloaded the program, but Adobe tells me it's incorrect.  Help!

    I can't get past the "redemption" phase in Elements.  I entered the number I got from Amazon, from where I downloaded the program, but Adobe tells me the number is the wrong code.

    Hello,
    because you did purchase your product from Amazon, you didn't get a serial number, only a code with which you can request a serial number from Adobe. Please have a look at http://helpx.adobe.com/x-productkb/global/find-serial-number.html. (Start here: How did you purchase your product?)
    The following part, so I just see at least, ceased to exist on my Adobe website, everything takes place in the link from above. I leave it as an info yet, it might still fit for you. For this purpose, please click your way through to your Adobe Store and find the button "Get Serial Number". Fill in the form and after a while you will get the real serial number.
    Good luck!
    Hans-Günter

  • Problem calling Procedure with parameter from Dynamic Page

    I received an error saying the Page not found
    here's how to reproduce the error.
    1. Create procedure in portal30 schema.
    Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    2. Create Dynamic Page with following code
    <ORACLE>DECLARE
    v_total NUMBER;
    BEGIN
    ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<machine.domain:port#>/pls/portal30/PORTAL30.DYN_
    ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure');
    END;</ORACLE>
    3. I clicked on Customize Link and entered 2 numbers as values for v_one and v_two.
    4. Got "The page cannot be found" error in I.E. or "The requested URL /pls/portal30/PORTAL30.DYN_SAMPLE_ADD.show was not found on this server." on Netscape
    However when I subsitute "ADD_TWO_VALUES(:v_one,:v_two, v_total);" in the dynamic page for "ADD_TWO_VALUES(3,2, v_total);", it runs just fine.
    What's wrong here? Can I not use a parameter from a dynamic page and call a procedure with it? Help is needed urgently and will be greatly appreciated.
    -Ahsun

    Hi,
    I tried with your code with few changes ,please try with them.
    Create or Replace PROCEDURE <myschema>.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    I created the procedure in <mySchema> and granted that to <application_schema> and made some changes
    <ORACLE>
    DECLARE
    v_total NUMBER;
    BEGIN
    <procedure_schema>.ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<your_host>/pls/<portal_schema>/<application_schema>.DYN_FOR_OTN.SHOW_PARMS', 'Re-Execute Procedure');
    END;
    </ORACLE>
    Hope this helps.
    rahul

  • Find total processing time from routing

    Hi,
    I'm writing specs for creating a production scheduling report for sales orders. I'm stuck at finding the relevant tables and fields for this particular calc. I want to find the processing time from routing.
    Total Processing Time (if Procurement type = u201CEu201D, then all operations from tasklist/Routing Operations for the material number) = Setup Time + (Machine time * Operation Quantity) + (Labor time * Operation Quantity)
    Any suggestions??
    Thanks

    Hi
    Check with any one of the following table:
    EAPL     Allocation of task lists to pieces of equipment
    EINA     Purchasing Info Record: General Data
    EINE     Purchasing Info Record: Purchasing Organization Data
    ESKL     Account Assignment Specification: Service Line
    ESLH     Service Package Header Data
    ESLL     Lines of Service Package
    INOB     Link between Internal Number and Object
    KALC     Material Quantity Calculation - Formulas
    KALT     Material Quantity Calculation: Header
    KOCLU     Cluster for conditions in purchasing and sales
    KSSK     Allocation Table: Object to Class
    LFA1     Vendor Master (General Section)
    MAPL     Assignment of Task Lists to Materials
    MLST     Milestone
    MLTX     Milestone Description
    PLAB     Relationships
    PLAS     Task list - selection of operations/activities
    PLFH     Task list - production resources/tools
    PLFL     Task list - sequences
    PLFT     Process Instructions
    PLFV     PI Characteristics/Sub-Operation Parameter Values
    PLKO     Task list - header
    PLKZ     Task list: main header
    PLMK     Inspection plan characteristics
    PLMW     MAPL-Dependent Charac. Specifications (Inspection Plan)
    PLMZ     Allocation of bill of material items to operations
    PLPH     CAPP: Sub-operations
    PLPO     Task list - operation/activity
    Thanks
    Saravana
    Reward if useful

  • How to get useful data from request?

    Hello.
    I am looking for creating a management tool for a web site. All I want is that is there any ready to use API or package or open source project for retrieving user�s information? I just mean that is there any easy to use way in java to get useful data from a client (for example location, his or her system configuration and information �).
    Thanks.

    If you dump all the data from request (see the javadoc, and especially the "header methods" ) you'll see the data you can get are quite simple.
    The only thing you can try to rely on are ;
    - the IP address from the sender (when reversed to DNS, you can sometime use the tld to locate the country it comes from. Yet, you'll get many .com name, so it's not that significant. it may also give you the IAP used). Note that if the user is using a proxy, it's the proxy IP that you'll collect
    - the User-Agent header : from this, you can guess the OS and the browser used
    - the Referer header : usefull to get where your user comes from (where they found a link to your site)
    - the Cookie header : if you're using a servlet container with session id stored in cookie, you should see the Cookie header appear on the second request to your site. That helps finding out wether your user accep cookie or not (from a server point).
    Besides these, i don't think you can get any other useful data without asking your users on a form. Note that it's the client that decides to send Referer, User-Agent or Cookie headers. Those are not mandatory to the Http Protocole and some browser allow their user to fool their content (butmore than 90% of the widespread browsers don't)

Maybe you are looking for

  • Passing variables frm xsl to a java method

    here is my current frustration -- aside from being new to java and xsl... i have an xml message (that is passed to me from another process) as follows: <?xml version="1.0" encoding="UTF-8"?> <WillsXMLStart>     <inputEventStart>TRUE</inputEventStart>

  • Using ComboBox as an editor for treenodes

    I have a customized combobox editor for editing treenodes. The treenodes may or may not editable based on a particular condition in the userobject at each node. The node and the combobox are rendered fine but as soon as I select an item from the comb

  • Program-calculator

    hiiiiiiiiiii program to perform arithmetic operation in java by checking precedence i have a doubt can anyone clear that using java i have got the elements using an String array and printed the array.. i should check each element in the array for pre

  • Product registration--- individual object- installed base

    HI all, As soon as i register the products in ICSS, it creates individual objects. 1)HOw can it be automatically added to Existing ibase of customer? 2) Or how can it be created itself automatically as Installed base. Please  give me some valuable su

  • MySQL Insert Statement

    I apologize if this can't be answered here. I found no answer from Google. MSSQL7 insert statement - "Insert into myTable Select a,b,c,d,e from myTable where ID = 2" This creates a duplicate row in the table. The ID is the key and is auto incremented