getting parameters from friendly url portlets jsr 286

Posted by user265950 on Stack Overflow See other posts from Stack Overflow or by user265950
Published on 2010-12-22T06:53:14Z Indexed on 2010/12/22 6:53 UTC
Read the original article Hit count: 443

Filed under:
|
|

link texthi, I am using ibm portal server. there is a link which is coming from external link. the url that is coming is as below http://localhost.us.deloitte.com:10040/wps/myportal/home/gm_assignee_label/gm_eoa_page?invoker=esb?agsnid=32984?asgnmtid=50085

home,gm_assignee_label,gm_eoa_page are friendly urls given to 3 different pages. things after the ? are the key value parameters.

i want to retrieve these paramters when i click on the link above and my page gets loaded.

i tried the below link as given by ibm. but it didnt help me my portlet.xml code is as below

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
    version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
    id="com.ibm.faces.portlet.FacesPortlet.8b353a4492">
    <portlet>
        <portlet-name>EndOfAssignmentPortlet</portlet-name>
        <display-name xml:lang="en">EndOfAssignmentPortlet</display-name>
        <display-name>EndOfAssignmentPortlet</display-name>
        <portlet-class>com.ibm.endofassignmentportlet.EndOfAssignmentPortlet</portlet-class>
        <init-param>
            <name>com.ibm.faces.portlet.page.view</name>
            <value>/view/endofassignment/EOASearchAssignment.jsp</value>
        </init-param>
        <init-param>
            <name>wps.markup</name>
            <value>html</value>
        </init-param>
         <init-param>
            <name>com.sun.faces.portlet.SAVE_REQUEST_SCOPE</name>
            <value>true</value>
        </init-param>  
        <expiration-cache>0</expiration-cache>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>
            <portlet-mode>EDIT</portlet-mode>
            <portlet-mode>HELP</portlet-mode>
        </supports>
        <supported-locale>en</supported-locale>
        <resource-bundle>
            com.ibm.endofassignmentportlet.nl.EndOfAssignmentPortletResource</resource-bundle>
        <portlet-info>
            <title>EndOfAssignmentPortlet</title>
            <short-title>EndOfAssignmentPortlet</short-title>
            <keywords>EndOfAssignmentPortlet</keywords>
        </portlet-info>
        <supported-public-render-parameter>AssigneeID</supported-public-render-parameter>
        <supported-public-render-parameter>AssignmentID</supported-public-render-parameter>
        <supported-public-render-parameter>InvokerID</supported-public-render-parameter>
    </portlet>

    <default-namespace>http://EndOfAssignmentPortlet/</default-namespace>
    <public-render-parameter>
        <identifier>AssigneeID</identifier>
        <qname xmlns:x="http://localhost.us.deloitte.com:10040/wps/myportal">x:agsnid</qname>
    </public-render-parameter>
    <public-render-parameter>
        <identifier>AssignmentID</identifier>
        <qname xmlns:x="http://localhost.us.deloitte.com:10040/wps/myportal">x:asgnmtid</qname>
    </public-render-parameter>
    <public-render-parameter>
        <identifier>InvokerID</identifier>
        <qname xmlns:x="http://localhost.us.deloitte.com:10040/wps/myportal">x:invoker</qname>
    </public-render-parameter>
</portlet-app>

i am trying to get the values in my doView method of portlet as below

String esbAssigneeID = request.getParameter("agsnid");

But i always get null.

please help.

TIA, Tejas

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf