How to get values from a query string in URL in a jsf page?

if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

Hello,
Try this:
Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

Similar Messages

  • How to get value from list of string

    Hi All,
    I have list of values (11,16,18) I need to get 16 i.e mid value . This string can go long .. How Will I do this . Is ther any function in Oracle 10g which supports this .
    Any assistance will help
    Thanks in advance .
    Sachin

    Or...
    SQL> ed
    Wrote file afiedt.buf
      1  With T
      2   AS
      3   (SELECT '11,16,18,50,60,70' str FROM DUAL UNION ALL
      4    SELECT '11,16,18,50,60,70,90,40,30' str FROM DUAL UNION ALL
      5    SELECT '11,16,18' str FROM DUAL
      6    )
      7  --
      8  select regexp_substr(str, '[^,]+', 1, lvl)
      9  from t, (select level lvl from dual connect by rownum <= (select max(length(regexp_replace(str,'[^,]')))+1 from t))
    10  where regexp_substr(str, '[^,]+', 1, lvl) is not null
    11* order by t.str, lvl
    SQL> /
    REGEXP_SUBSTR(STR,'[^,]+',
    11
    16
    18
    11
    16
    18
    50
    60
    70
    11
    16
    18
    50
    60
    70
    90
    40
    30
    18 rows selected.
    SQL>(assumes there are no empty values in the strings)

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to get key from MDX Query

    Hi All,
    how to get key from mdx query ?
    example :
    SELECT [Measures].[67822GFASOU7KUT6FKHSQ34FV] ON COLUMNS NON EMPTY CROSSJOIN([ZCOMPANY].MEMBERS, [ZMILL].MEMBERS) ON ROWS FROM ZODS_GL/ZODS_GL_001
    the result from this mdx query are zcompany text and zmill text, how to get company key and mill key ?
    Regards
    JeiMing

    hi Jeiming,
    to get key in mdx, you can try something like
    [ZCOMPANY].[LEVEL01].MEMBERS
    properties [ZCOMPANY].[2ZCOMPANY]
    following threads may useful
    Extracting texts with MDX
    MDX Statement - display only keys for characterstics and their dis. attrib.
    hope this helps.

  • JSF:how to get value from dinamically generated HtmlInputText components�H�H

    <h:panelGroup binding="#{dynamicInputGroupBean.group}"/>
    public HtmlPanelGroup getGroup() {
              if (this.getSelectedComp() == null) {
                   return this.group;
              FacesContext facesContext = FacesContext.getCurrentInstance();
              Application application = facesContext.getApplication();
              this.group = new HtmlPanelGroup();
              Set pSet = this.getSelectedComp().getParameterses();
              int size = pSet.size();
              this.instanceValue = new String[size];
              int i = 0;
              for (Iterator it = pSet.iterator(); it.hasNext();) {
                   Parameters tempP = (Parameters) it.next();
                   HtmlOutputLabel outputLable = new HtmlOutputLabel();
                   HtmlInputText inputText = new HtmlInputText();
                   inputText.setId("p" + i);
                   String valueBindingExpression = "#{dynamicInputGroupBean.instanceValue["+i+ "]}";
                   System.out.println(valueBindingExpression);
                   ValueBinding valueBinding = application
                             .createValueBinding(valueBindingExpression);
                   inputText.setValueBinding("value", valueBinding);
                   outputLable.setFor(inputText.getId());
                   outputLable.setValue(tempP.getParaname() + ": ");
                   group.getChildren().add(outputLable);
                   group.getChildren().add(inputText);
                   i++;
              // group.getChildren().add(new HtmlInputText());
              return group;
         }as codes show above, i successfully genera HtmlInputText dinamicaly�C
    but i got problems while i try to print those values...
    after the the jsp page presents in my browser,
    i input some words in the input components,
    and then click a commandButton hold an action to print their value
    action code :
    String[] tempArray = this.getInstanceValue();
    for (int i = 0; i < tempArray.length; i++) {
    System.out.println(tempArray);
    only NULL has been printed in the consol ....not the word i inputed!!!
    so my question is how can i get values from those
    dinamically generated HtmlInputText ????

    This approach is odd. What's the functional requirement after all? You normally attach the inputtext value to a backing bean property and do the desired command button action which is attached to a backing bean action method. In this method you then use the value for the query.

  • How to get values from an IFrame...

    Hi everyone. I have come to a complete stop i my project and need to ask the following: How do i get the values from an IFrame.
    Situation: I have a main.jsp page that contains an IFrame(data.jsp). Data.jsp is basically made up of a bunch of checkboxes. The state of these boxes(checked or unchecked) is determined and set by a JAVA program and the results are then stored in a StringBuffer. Contents of Stringbuffer could look something like this: <tr><input type='checkbox' name='box0' CHECKED></tr>.
    The StringBuffer in then presented in the IFrame(data.jsp) like so: <%=res.getInfo()%>
    The user should be able to check or uncheck the boxes from the main.jsp page then when pressing a submit button the changes should be stored in a DBase.
    After the submit button have been pressed i go into my Servlet's doPost() method for some basic processing. This is were the problem starts. I usally use HttpServletRequest.getParameter(String param) to get values from the main.jsp page. But these checkboxes are stored in the IFrame, so how do i go about to retrieve the values from data.jsp from the doPost() method or in some other way maybe. This is quite urgent and i hope that i have explained the scenario in enough detail.
    Any help would be greatlly apritiated.
    Best regards
    Peter

    Hello
    Just try this link
    http://www.faqts.com/knowledge_base/view.phtml/aid/13758/fid/53
    HTH

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • How to get value from a checkbox in a jsp page?

    hi there
    i have a form in a jsp which contains a <input type='checkbox' name='xx'>
    when i submit the form, how can i get the value for this checkbox? i could use request object to get parameter. i tried the following and could not get any value:
    request.getParameter("xx");
    is there any to get it? thanks.

    "checkbox" can have multiple values b/c you can check more than 1 checkbox and they can have same name.
    Example
    <input type="checkbox" name="number" value="1">one
    <input type="checkbox" name="number" value="2">two
    <input type="checkbox" name="number" value="3">three
    To get values of "number" field:
    String [] numberValues = request.getParameterValues("number");
    where numberValues[0] is the 1st value checked, numberValues[1] is 2nd value checkted and so on.....
    If you have no checkbox checked then you might get a "null pointer exception", so make sure you check to see if it's null first before accessing your numberValues array.
    If you just have 1 checkbox; then you can just call request.getParameterValue("number") and that will return your value.

  • How to get values from a stored package variable of type record ?

    Sir,
    In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started.
    What is the best way to do that ?
    Thanks
    Stephen

    Stephen,
    not sure what your model is, but if it is Business Components, I think I would expose the properties as a client method on the application module. This way all JClient panels and frames will have access to it. You could use a HashMap to store the data in teh app module.
    If JDBC supports the record type, then you should be able to call it via a prepared SQL statement. If not, you may consider writing a PLSQL accessor to your stored procedure that returns something that can be handled.
    Steve Muench provides the following examples on his blog page
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    http://otn.oracle.com/products/jdev/tips/muench/multilevelstproc/MultilevelStoredProcExample.zip
    Frank

  • How to get value from one context node to otehr contect conde in diff views

    Hello Guru's
    We have a rek which is of getting the value from one context node to other context node,
    for example there is Total value in BT111H_OPPT/ITEMLIST (One context node) we need to have the same Total value in the in BT111H_OPPT/DETAILS (other context node) automatically
    Inputs are highly appricated.......

    Hello,
    Thanks for your Reply
    But my rek is i want to get value from different views
    eg BT111H_oppt/itemslist(contex node - BTADMINI) field net value to BT111h_opp/Details(Context node - BTopporth)
    for this which method should i use to chive this.
    Thanks..

  • How to get value from messageStyledText which is present in other RN

    Hi,
    I have xxcompscore messageStyledText in region 1 (separate controller) and xxobjscore messageStyledText in region2 (separate controller).
    The both values are double.
    My requirement is to get that value from another region (page layout) and add that both values and display in this RN.
    How to do this, i tried lot but i'm getting NullPointerException Error.

    Afridi,
    I tried again by creating new controller, same error.
    I'm trying the following code in the pagelayout controller.
    Code:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    double TotalScore;
    OAMessageStyledTextBean TotalScoreText = (OAMessageStyledTextBean)webBean.findChildRecursive("XXEmployeeTotalScoreText");
    String CompString=(String)pageContext.getSessionValue("CompScoreValue");
    double CompScore=Double.parseDouble(CompString);
    String ObjString=(String)pageContext.getSessionValue("ObjScoreValue");
    double ObjScore=Double.parseDouble(ObjString);
    TotalScore=(CompScore+ObjScore)/2;
    TotalScoreText.setValue(pageContext,TotalScore);
    error:
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:616)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1182)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2607)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1940)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:390)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:280)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:68)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:214)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:219)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
         at OA.jspService(_OA.java:221)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:390)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:662)
    ## Detail 0 ##
    java.lang.NullPointerException
    java.lang.NullPointerException

  • How to get value from Thread Run Method

    I want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that it seems that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get Inside the run method::: But I get only Inside */
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";

    I think this is what you're looking for. I hold up main(), waiting for the results to be concatenated to the String.
    public class sampsynch
        class SampleThread extends Thread
         String x = "Inside";
         public void run() {
             x+="the run method";
             synchronized(this) {
              notify();
        public static void main(String[] args) throws InterruptedException {
         SampleThread t = new sampsynch().new SampleThread();
         t.start();
         synchronized(t) {
             t.wait();
         System.out.println(t.x);
    }

  • How to get values from resultset when using subquery???

    Hi ,
    I have a problem in executing sql query from java.
    I am executing an sql query which return a intersection of values from 3 tables.
    Here is the query I am using
    select id from dps_user where id in (select b.id from dps_user b,laserlink c
    where c.userid='univ.'||b.login and c.status in(1,3,8,9,10)
    intersect
    select b.id from dps_user b,laserlink c
    where c.userid=b.login and c.status in(1,3,8,9,10)).
    this query is working fine from sql .
    when I am trying to excute the same query from java nothing is coming into resultset.
    String ISP_AND_EMAIL="select id "+
                             " from dps_user where id in (select b.id from dps_user b,laserlink c "+
                                  "where c.userid='"+"univ.'"+" ||b.login and c.status in(1,3,8,9,10)"+
                                  " intersect "+
                                  " select b.id from dps_user b,laserlink c"+
                                  " where c.userid=b.login and c.status in(1,3,8,9,10))";
              System.out.println(ISP_AND_EMAIL);
              rs=stmt.executeQuery(ISP_AND_EMAIL);
    How to use concatinate string (|| ) in java.
    can anyone help to retrieve the values from this resultset...
    Thanks

    concatnation is done using + in java.
    I am doubtful about the following line where there may be error
    "where c.userid='"+"univ.'"+" ||b.login and c.status in(1,3,8,9,10)"+
    I don't know if the univ. is a string or some variable.I need more clarification on this line,then i may help u.
    thx

  • How to get values from RT table

    Hello friends ,
    I want to get earned basic from RT table  T-code - pc00_m40_clstr
    how to get that values for wage types
    gaurav

    Hi Gaurav,
    The Function Module u2018 PYXX_READ_PAYROLL_RESULT u2019 generically reads a complete payroll result, that is for all country versions, from file PCL2 or from the buffer. In doing so, the payroll result is transferred to the PAYROLL_RESULT parameter. In the calling system, this must be classified as a complex structure according to the 'PAYxx_RESULT' dictionary structure. u2018 xx u2018 is the ISO code for the country. Now the payroll result is in the parameter FS_PAY99_RESULT. In this parameter the RT table is considered and the required values are moved into a internal table (say  T_RT).
    Regards,
    Swapna.

  • How to get values from the page excpet pagecontext.getparameter

    i have a requirement wherein i am passing paramteres from the "submit" button.but the problem being that,i have multiple rows in my page.what is happening is that my "submit" button is passing the values of the previous row,instead of the current row.this is i think because "commit" gets called later and params are passed before it.
    how do i solve this problem
    or if i can get to get paramteres in a advance table layout,i l be able to achieve my requirement.beacuse in advance table layout,i am not able to do pagecontext.getparameter("---" of the item

    thanks guys,
    i did try working with row refrence but it returns a null only.
    my requirement was that i had update functionality as well as "add new rows" on the same advtbl bean.an whenevr i click on "add new row" and submit,i was always gettin the parameters for the previous row.
    now,i have got a workaround to that,by having a radio button to select rows to update and whenever i click on "add new rows" ,i disable the radio button,and get the handle based on the value from radio group.
    but still row refrence dint work for me.i will appreciate if sum1 can send me the code

Maybe you are looking for

  • Color Management issues

    Hi, Have had continual problems with color management not functioning correctly as it did in 10.5.  In SL and Lion, I calibrate the screen, this gives me a screen that looks ok, with neutral whites and reds that display well with the installed applic

  • [Solved] No Usable Pacman Repositories Configured

    I had the liblzma.so.0 problem and tought pacman was the problem. I tried to reinstall pacman several time and find out that the liblzma.so.0 symlink was the problem. Now pacman don't work I have the following message: No Usable Pacman Repositories C

  • Navigation for PO cancellation

    Hi.. can anybody tell me the navigation for the cancellation of purchase order and purchase order hold. Thanks in advance..

  • Adobe Looking for Mobile Developers and Designers for Upcoming Research Study

    The Adobe User Research team is looking for designers and developers working on mobile projects in the New York City and San Francisco Bay areas. We will be conducting site visits starting the week of March 17th and into early April, and would love t

  • Is there a report viewer control for html5 using javascript?

    VS 2005,2008,2010,2012 SSRS-2008,2012 I want to be able to create a simple report viewer that will run on ios, android, and win8 devices. I believe that the solution lay with the concept of HTML5 and javascript. If I use aspx and vb also HTML5, then