How to have ItemId in the URL in JSF based application

I have a JSF based application and I am using faces-config.xml to navigate and I am using /redirect to navigate form case to case.
The application lists products and upon selecting one, a product detail is displayed. I would like to have productId as part of the page URL so that URL can be emailed and the receiver can paste the received URL into browser and retrieve the product detail.
Currently the URL is not rewritten to have session id in it.
I am not ever sure where to start on this.

Is this line correct?
<value>#{param.productId}</value>
Try it out yourself ;)
This is clear and helpful. However I don't know how
to create this URL
(http://example.com/shop/products.jsf?productId=100)
in the first place. The URL I have is in the form of
http://example.com/shop/products.faces.
Is adding '?productId=100' to the URL something
configurable or it has to be done programmatically
via URL rewriting?You can implement it in several ways:
JSF<h:outputLink value="products.faces">
    <h:outputText value="click here" />
    <f:param name="productId" value="100" />
</h:outputLink>
<%-- or --%>
<h:outputLink value="products.faces?productId=100">
    <h:outputText value="click here" />
</h:outputLink>Or write a servlet listening on /shop/, scan the current request URI for product.faces, get the productId from the backing bean's session and rewrite the URL using request.getRequestDispatcher("product.faces?productId=" + productId).forward(request, response).
Maybe there are more clever solutions using configfiles, but I don't have much experience (yet) with such GET request thingies in conjunction with JSF.

Similar Messages

  • How to hide _layouts in the URL while accessing an application page

    Can we create any friendly URL while accessing any custom application page. I don't want to show _layouts in the URL So how can i mask the URL.

    The application pages should be in the _layouts folder (or _admin for application pages for central admin).
    You can put pages at friendly urls, but then they should be site pages, which you provision using a "Module" element from Visual Studio. But be aware that then users will be able to modify them using SharePoint designer.
    There are methods to achieve this somehow, but you should not do it in sharepoint.

  • When I open a new tab, the new tab used to show shots of 6 or so of the last sites I'd viewed, so I could easily click on one and go to it. Now it shows a blank tab and I have to type the URL of the page I want. How can I change it back?

    When I open a new tab, the new tab used to show shots of 6 or so of the last sites I'd viewed, so I could easily click on one and go to it. Now it shows a blank tab and I have to type the URL of the page I want. How can I change it back?

    Did you have the Google Toolbar installed?
    * http://www.google.com/support/toolbar/bin/answer.py?answer=115561 Web-browsing tools : Google new tab page and most visited websites
    Other extension that have a similar feature:
    *Speed Dial: https://addons.mozilla.org/firefox/addon/4810
    *Fast Dial: https://addons.mozilla.org/firefox/addon/5721

  • I have forgotten what the url is for icloud, how do I log in?

    I have forgotten what the url is for icloud, how do I log in?

    iCloud web interface: www.icloud.com
    To set up your device with iCloud go "Settings > iCloud" (iOS 5) or "System Preferences > iCloud" (Lion & Mountain Lion)

  • HT4314 I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    Hi Jamesdwills,
    Welcome to the Support Communities!
    If you are using the same Apple ID on both devices, the Game Center profile should be the same.
    Check out this information from the iPad User Guide.  Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
    Using Game Center
    http://support.apple.com/kb/ht4314
    Game Center settings - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad9a13d039
    Game Center settings
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    Allow invites
    Let nearby players find you
    Edit your Game Center profile (tap your nickname)
    Get friend recommendations from Contacts or Facebook
    Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
    Change restrictions for Game Center. Go to Settings > General > Restrictions.
    Cheers,
    - Judy

  • WD ABAP - Reading the URL Parameters for FPM application

    Hi,
    As per the Custom requirment,
    I want to pass URL parameters for WD ABAP application (sap/bc/webdynpro/dbm/app_veh_cus_search) which uses FPM.
    example: sap/bc/webdynpro/dbm/app_veh_cus_search?Customer=12345&fromExternal=true
    I am facing difficulty in reading the URL parameters.
    How to read/get the URL Parameters for an FPM WD ABAP application????
    Observation:
    I tried reading the parameter in Window --> HANDLEDEFAULT method. But could NOT read the Parameters from here for FPM application whereas if I create a Z Custom application then I could read the URL Parameters. so the issue is in reading the URL Parameters for FPM application.
    Kindly support
    Regards,
    Hussain

    Hi Hussain,
    You can do this either with the methods of interface if_fpm_parameter...
    DATA lo_param TYPE REF TO if_fpm_parameter.
    lo_param = cl_fpm_factory=>get_instance( )->mo_app_parameter.
    CALL METHOD lo_param->get_value
        EXPORTING
            iv_key   = parameter_name
        IMPORTING
            ev_value = parameter_value.
    or a more generic approach using class cl_wd_runtime_services...
    cl_wd_runtime_services=>get_url_parameter
    Cheers,
    Amy

  • Using Rename() method to change the Url of path based site collection

    Hello All,
    Is it correct to use
    SPSite.Rename() method for changing the url of path based site collection(except the root)?
    For example:
    Old Site Url: http://portal.contoso.net/sites/HR
    New Site Url: http://portal.contoso.net/sites/HROLD
    It is working in SharePoint 2013 test environment, but I will be happy to receive some feedback from you about this.
    Ivan Yankulov
    SharePoint Admin/Consultant
    http://spyankulov.blogspot.com/
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft

    Hi Lvan,
    Yes, the server object model SPSite.Rename()  method works on an SPSite object to change the URL of a site collection which is host named or path based.
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • I lost my ipad mini and i have no set the "Find my iphone/ipad" application. Help me plzzz!!!

    i lost my ipad mini and i have no set the "Find my iphone/ipad" application. Help me plzzz!!!

    You can find serial number in your Support Profile
    https://supportprofile.apple.com/

  • We have to restrict the visibility of Questions based upon technical and co

    We have to restrict the visibility of Questions based upon technical and commercial. For example if there are two section commercial and technical, technical team should not be able to see commercial questions and vice-versa

    Hi
    I could suggest an alternative approach. You  take a call whether it suits your business process
    Create a project for the event. Within project you can create two seperate Rfx one with technical team as collaborator and the other with Commercial team. Two Rfx would be evaluated and awarded seperately by respective team. You can take help of your technical expert to create custom report for overall evaluation
    Regards
    Mudit Saini

  • How to determine or verify the language used if your application is in mult

    hi,
    How to determine or verify the language used if your application is in multi Language Env.
    Thanks & Regards

    Hi again;
    I suggest also see below link which we discussed before here
    Find languages installed in my R12 instance ?
    Regard
    Helios

  • Do I need to have .businesscatalyst in the URL of a site I create with Muse? If no, how do I manage that?

    I am creating a single landing page for the company I work for. The tech team is swamped, and is unavailable to assist. I don't want to have the .businesscatalyst name in the URL. Is that possible if I host with Adobe?

    Help with using Adobe Muse CC is a better place to ask
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • How to hide parameters in the URL ?

    Hi,
    Iam using Reports 6i on web. Now Iam calling report from a report (Drill done report) using SRW.SET_HYPERLINK.
    Iam passing lot of parameters to this detail report.
    When I call the main report the URL looks like:
    http://devreports.wwt.com/dev60cgi/runrep.sh/15369?
    But when I click on the link in this main report for details, the detail report URL looks like this.
    http://devreports.wwt.com/dev60cgi/runrep.sh/15369?emp_detail&p_emp=45&p_job=clerk&p_format=PDF
    Iam hiding userid/passwd@database in the cgicmd.dat file
    I want to hide all the other parameters also like
    the Main report URL :
    http://devreports.wwt.com/dev60cgi/runrep.sh/15369?
    How to do this ?
    Please help me if anybody has the solution.
    Thanks alot.

    Hi Ram,
    Not sure if this is possible.
    However, one workaround might be the following:
    1. Write a javascript that submits the URL using, say a POST method, and does not show the parameters in the URL. You will have to write this javascript code in the "Before Report" Report Escape. For a generic example on how to use javascript in a report, see Metalink Note 125652.1. This note shows javascript to disable the right-click of the mouse on the report output.
    2. Use the Hyperlink peroperty of the report to call this javascript function, eg,
    javascript:myfunction('http://machine:port/reports/rwservlet?report=...+server=...+empno=&empno')
    I am not a javascript expert, so I cannot give you an example of the function, but I hope someone in your team can find out.
    Navneet.

  • How to pass array in the url of the servlet

    Hi Friends,
    How can i pass an array in the URL that calls a servlet. For instance,I have this in my servlet rite now:
            MyClass obj = new MyClass();
            String[] args = {"-opt1","-opt2","file1","file2","file3"};
            obj.main(args);I want that the "args" should come in the URL call,because some php application would be calling this, for instance:
    http://localhost:8080/MyProject/MyServlet?args=somearray
          MyClass obj = new MyClass();
          String[] arg = request.getParameter("args");
          obj.main(arg);Please help..I would really appreciate it.
    Thanks

    Sorry,needed to edit this,I am getting some problem,please help if you can:
    I call the java class from the servlet as shown above,and it executes fine but only for the first time...after that the tomcat automatically shuts down .....can someone explain me why????
    How can i get the execution control back to the servlet ..for example:
      System.out.println("Before execution..");
      MyClass obj = new MyClass();
      String[] arg = request.getParameter("args");
      obj.main(arg);
      System.out.println("After execution..");prints only "before execution..."..so can someone please tell me how can i bring the control back to the servlet...
    Thanks
    Message was edited by:
    java80

  • How do I find out the URL of the page a document was downloaded from?

    I downloaded a PDF several months ago; I can see it in my downloads history. When I right click it there, I see the link to the PDF itself, but I need to know the actual page it came from.
    I've checked my History, but cannot identify the page.
    Is there a definitive way of determining the URL of the page that linked to the document?

    Open the Download Manager window and select that file.
    Copy and paste this code in the Code field in the Error Console and click the Evaluate button.
    *Firefox/Tools > Web Development > Error Console
    The code adds a tooltip to the area with the file type icon at the left hand side of each entry in the DM window and shows a tooltip when you hover that area.<br />
    It only works for entries that are currently visible in the DM and not for new entries that are added by downloading files and only as long as the DM window is kept open, so you need to rerun the code in the Error Console to get a tooltip.
    <pre><nowiki>const Cc=Components.classes, Ci=Components.interfaces;
    var enumerator=Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator).getEnumerator(null);
    while(enumerator.hasMoreElements()){var win=enumerator.getNext();
    if(win.location=="chrome://mozapps/content/downloads/downloads.xul"){
    var i,r,R,C='';
    r=win.document.getElementById("downloadView").getElementsByTagName("richlistitem");
    for(i=0;R=r[i];i++){
    var fP=R.getAttribute("path");
    var fU=R.getAttribute("uri");
    var sT=parseInt(R.getAttribute("startTime"));
    var eT=parseInt(R.getAttribute("endTime"));
    var cB=parseInt(R.getAttribute("currBytes"));
    var mB=parseInt(R.getAttribute("maxBytes"));
    var rU=R.hasAttribute("referrer")?R.getAttribute("referrer"):"<no referrer>";
    var sD=cB/(eT-sT);
    var tT=[];
    tT.push("FILE: "+fP);
    tT.push("URI: "+fU);
    tT.push("REF: "+rU);
    tT.push("");
    tT.push("Total Time: "+((eT-sT)/1E3)+" sec.");
    tT.push("Curr Bytes: "+cB+" bytes"+((cB==mB)?" (OK)":"(part)"));
    tT.push("Max Bytes: "+mB+" bytes");
    tT.push("Download speed: "+sD.toFixed(3)+" KB/sec");
    R.setAttribute("tooltiptext",tT.join("\n"));
    if(R.getAttribute("selected")=="true"){C=tT;}
    if(C)prompt(C.join("\n"),C);
    </nowiki></pre>

  • How to view log of the exception occured in an application

    Hi All,
    While running the webdynpro application in the portal currently we are displaying some generic error messages in the catch block to make it user friendly.
    If some exception occurs, how is it possible for the user to view the error log in the portal itself so that the user may get a clear and detailed description of the same.
    Kindly suggest a solution for this.
    Thanks,
    Mitali

    Hi Mitali,
    To view the logs use the url http://<host>:<port>/nwa > Monitoring
    OR
    can look up the exception ID by doing the following.
    1. Navigate to System Administration->Support->Portal Runtime->Log Viewer
    2. Enter the exception id in the Search box and click on search in all files.
    3. It should popup a new window with your error message.
    OR
    all of your portal logs will go to defaultTrace.trc which is located under cluster/server0/log
    You can still watch this file through the portal log viewer.
    OR
    It it does not work for changes in the log viewing
    See the following:
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/0aa94076b63713e10000000a155106/frameset.htm
    Reagrds.
    Rajat

Maybe you are looking for

  • IPod Touch connected to home wi-fi but not working?

    I have an 16GB iPod Touch. When I first bought my iPod, I had nothing wrong with connecting and using the wifi @ home with it. But after I restored it yesterday, something went wrong. My iPod is connected to the wi-fi at home, but when I use it, it d

  • Inventory Management Collection run

    We would like to increase our Inventory Management Collection run to every 5 minutes (currently every hour).  Can anyone forsee a problem with this or have experienced a problem We have an Unserialized V3 update Thanks

  • Strange display issues for previously healthy SWFs

    Many months ago I published SWFs via Xcelsius 2008 that were carefully tested and worked well.  This week, it came to my attention that these SWFs are now displaying strangely under a variety of browsers and Flash Player versions (latest version test

  • F-90 Asset Acquisition

    Hi, When i create new asset master through AS01 system showing me quantity as required field whereas in configauration it maintain as optional field for that particular asset class. Therfore i put quantity as 1 and unit of measurement EA abd create a

  • Non - working day problem

    Hi all, We can insert other type into non-working day by choose Input type W or I or null in T554S. But I can not insert the number of hours. So how to do? Thanks a lot, Quanglv, Edited by: Quang Le Vinh on Oct 9, 2009 11:44 AM