JSR286 Portlet in JSPs

Hello,
We are trying to develop JSR286 portlets in JDev.
Question: Can we design/develop JSR286 Portlet UI in jsp with JQuery?

yes ,you can develop JSR286 portlet in jsps but point is -
you need to specify the jquery path in hard coded way -means (absolute path ,not relative path)
jquery src="http://<server>:port/your portlet app context root/jquery path/jquery.js"
In that way jquery will work.

Similar Messages

  • Page definition is not found while running JSR286 portlet in WebCenter app

    Hi All,
    I have ADF application which has 3 different task flows 1. my service 2. my car 3. my bike.
    which I have placed into a single bounded task flow called repairTaskflow.
    I have created a JSR286 portlet out of a repairTaskflow. I am trying to consume it in an Webcenter application. When I place the portlet on to the page in Web center application
    and run the page. I see the following error in the console.
    oracle.jbo.NoDefException: JBO-25002: Definition ***.xxxx.view.pageDefs.applications_task_flow_applications_task_flow_CreateEmptyApplicationPageDef of type Form Binding Definition is not found.
         at oracle.jbo.mom.DefinitionManager.findDefObjectUsingMetadataObject(DefinitionManager.java:2703)
         at oracle.jbo.mom.DefinitionManager.findDefObjectUsingMetadataObject(DefinitionManager.java:2715)
         at oracle.adf.model.binding.DCBindingContainerDef.findDefObject(DCBindingContainerDef.java:292)
         at oracle.adf.model.binding.DCBindingContainerReference.getDef(DCBindingContainerReference.java:107)
         at oracle.adf.model.BindingContext.findBindingContainerDefByPath(BindingContext.java:1624)
         at oracle.adf.controller.internal.binding.RegionUtils.findOrCreateBindingContainer(RegionUtils.java:246)
         at oracle.adfinternal.controller.util.model.DataBindingActivityImpl.getActivityBindingContainer(DataBindingActivityImpl.java:233)
         at oracle.adfinternal.controller.util.model.DataBindingActivityImpl.beforeExecute(DataBindingActivityImpl.java:77)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:969)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:878)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:777)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:551)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:147)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:1002)
    Please find below the portlet.xml file
    <portlet-app version="2.0" 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" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portlet id="adf_taskflow_WEB_INF_test_task_flow_xml">
            <description>test-task-flow</description>
            <portlet-name>test-task-flow</portlet-name>
            <display-name>test-task-flow</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/test-task-flow.xml&amp;_fragmentTaskFlowId=test-task-flow</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>test-task-flow</title>
                <short-title>test-task-flow</short-title>
            </portlet-info>
            <security-role-ref>
                <role-name>valid-users</role-name>
            </security-role-ref>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <portlet id="adf_taskflow_WEB_INF_single_task_flow_definition_xml">
            <description>single-task-flow-definition</description>
            <portlet-name>single-task-flow-definition</portlet-name>
            <display-name>single-task-flow-definition</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/single-task-flow-definition.xml&amp;_fragmentTaskFlowId=single-task-flow-definition</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>single-task-flow-definition</title>
                <short-title>single-task-flow-definition</short-title>
            </portlet-info>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <portlet id="adf_taskflow_WEB_INF_applications_task_flow_xml">
            <description>applications-task-flow</description>
            <portlet-name>applications-task-flow</portlet-name>
            <display-name>applications-task-flow</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/applications-task-flow.xml&amp;_fragmentTaskFlowId=applications-task-flow</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>applications-task-flow</title>
                <short-title>applications-task-flow</short-title>
            </portlet-info>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <custom-portlet-mode>
            <portlet-mode>about</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>config</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>edit_defaults</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>preview</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>print</portlet-mode>
        </custom-portlet-mode>
    </portlet-app> In all the 3 task flow there is at least one method activity placed either as the default activity or part of activities.
    In service page taskflow the default activity is a method activity. If I convert the service-task-flow alone as a portlet, it failed. showing the similar error : pagedef not found.
    Then I created the portlet out of car task-flow whose default activity is a page. This time I can view the portlet, the car list page. Once I click create button on that page which again goes through a method activity, then it failed showing the error mentioned above
    It seems where ever there are method activities on the taskflow, the portlet cannot find the pagedef and its throwing error . I have cross checked the deployed war file and all the pagedef's are bundled into it.
    Any suggestions are much appreciated.
    Thanks,
    Morgan.
    Edited by: Morgan Freeman on Aug 19, 2011 3:27 AM
    Edited by: Morgan Freeman on Aug 19, 2011 3:30 AM
    Edited by: Morgan Freeman on Aug 19, 2011 6:02 AM

    Hi All,
    I solved this issue. The path of pagedef files was not recognized when I publish the taskflows as portlets. Though it runs when I place it as a region on jspx file.
    The folder structure where I placed pagedefs earlier was some thing like this in ViewController -> Application Resources
    com.mycomp.view.pagedefs
    When I wanted to consume the portlet in the portal application, all the pagedefs under this path were not visible to the portlet.
    Once I change the pagedef folder to the immediate folder after the Application Resources, it found all the pagedefs
    Now my folder structure in ViewController -> Application Resources
    view.pagedefs
    Is this a bug? or Am I missing some thing.
    Thanks,
    Morgan.

  • Hide Ajax enabled portlet with jsp form  loading

    Hi All,
    I seriously struck with this problem and any help is appreciated.
    Functionality:-
    I have 2 portlet in a page portletA(non ajax) and PortalB(ajax enabled and it will just handle the portletA events). For checkbox event on portletA i am submitting PortletB JSP Form through PortletA JavaScript.
    PortletB jsp Form consists of only hidden variables, which will be set by PortletA JavaScript. All this is working fine.
    Problem:-
    My problem is I have to hide PortletB.For this i am using BackingFile preRender method. If I hide portletB then JSP Form is not loading and from PortletA iam unable to get the Form object of portletB to submit.
    Even setVisible is not working.
    Here is my PortletB jsp Form
    <netui:form tagId="ajaxEnabledForm" action="deleteRSAandCMFProfile">
    <netui:hidden dataSource="actionForm.userName" tagId="userName"></netui:hidden>
    </netui:form>
    How to make PortletB invisible with jsp form loading?
    Thanks in advance.

    hi, i don't have the exact solution to your problem, but can suggest you work around.
    in portlet b jsp, add <div> tag at the top, and use its style properties to hidden/visible as per your need. from the backing file you can set a request attribute which determines the hiding and showing in the div tag.
    you may not be able to control the visibility of title bar. for this, there are two options.
    1. you can try to use portlet backing context tile bar and hide title bar from backing file.
    2. if this does not work, then define id attribute to div tag in title bar skeleton jsp, and access that div by using id from the portlet jsp and then hide that div tag.
    thanks
    sampath

  • EJB Injection into JSR286 Portlet

    I'm currently facing an issue accessing an Stateless EJB from my JSR286 Weblogic 10.3.2 Portal Server. I have 2 ears: 1) PreferencesPortalEAR and 2)PreferencesEJBEar
    PreferencesPortalEAR - contains the web module with jsr286 portlet and the ejb client jar
    PreferencesEJBEar - contains the j2ee module with the ejb and ejb client jar
    When I attempt to access the EJB from the portlet doing a JNDI lookup it works fine but when I try to use DI to get a reference to the bean I get a NullPointerException.
    Here's the code:
    PreferenceBean EJB:
    * Session Bean implementation class PreferencesBean
    @Stateless(mappedName="ejb/Preference")
    public class PreferenceBean implements PreferenceLocal, PreferenceRemote {
         @Override
         public void createPreference(List<PreferenceEntity> preferences) {
              System.out.println("Created Preference");
         @Override
         public void deletePreference(List<PreferenceEntity> preferences) {
              System.out.println("Deleted Preference");
         @Override
         public List<PreferenceEntity> getPreference(PreferenceType prefType) {
              System.out.println("Get Preference");
              ArrayList<PreferenceEntity> peAL = new ArrayList<PreferenceEntity>();
              for (int i=0;i<10;i++) {
                   PreferenceEntity pe = new PreferenceEntity();
                   pe.setId(i);
                   pe.setCreateDate(new Date());
                   pe.setPreferenceName("prefName" + i);
                   pe.setPreferenceValue("prefValue"+i);
                   pe.setUserName("weblogic"+i);
                   peAL.add(pe);
              return peAL;
         @Override
         public void updatePreference(List<PreferenceEntity> preferences) {
              System.out.println("Update Preference");
    Here's the Portlet EJBPortlet:
    public class EJBPortlet extends GenericPortlet {
         @EJB(mappedName="ejb/Preference")
         private Preference preference;
         public void doView(RenderRequest request, RenderResponse response)
                   throws PortletException, IOException {
              response.setContentType("text/html");
    //          Context ctx = null;
    //          Preference preference = null;
    //          try {
    //               /** not needed when running locally **/
    //               Hashtable<String, String> env = new Hashtable<String, String>();
    //               env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    //               env.put(Context.SECURITY_PRINCIPAL,"weblogic");
    //               env.put(Context.SECURITY_CREDENTIALS,"weblogic123");
    //               env.put(Context.PROVIDER_URL,"t3://localhost:7001");
    //               ctx = new InitialContext();
    //               preference = (Preference) ctx.lookup("ejb/Preference#com.mycompany.preferences.PreferenceRemote");
    //          } catch (Exception e) {
    //               e.printStackTrace();
              preference.createPreference(null);
              preference.deletePreference(null);
              ArrayList<PreferenceEntity> peAL = (ArrayList<PreferenceEntity>)preference.getPreference(PreferenceType.CATEGORY);
              for (PreferenceEntity pe : peAL) {
                   response.getWriter().write(pe.toString() + " ") ;
              response.getWriter().write("<p>Hello World!</p>");
    As previously mentioned, using InitialContext and JNDI lookup in the portlet works fine. When that code is commented and I use @EJB, I get a NullPointerException.
    Thanks for your help.

    We tried almost every permutation and combination, but it did not work without that dummy servlet.
    Then we had to look for a cleaner solution and we found one.
    We are now using spring injection, to get the EJB injection in our session managed bean. This way the code is extensible and cleaner.
    In future if you want something else(other than ejb lets say a web service), you will just change the Spring config file and it would't break anything.
    Edited by: desu on Mar 14, 2008 4:20 AM

  • Changes not immediately viewable when updating portlet related jsps

    Hello,
    I recently installed the 4.0 portal server and I set up a new portal based on
    the following doc:
    http://edocs.bea.com/wlp/docs40/portal/devbasic.htm
    When I modify one of the jsps that a portlet uses, the changes (when viewed in
    a browser) will show up somewhere between immediately and 5 minutes later. I
    thought this might have something to do with the "Reload Period" which is modifiable
    within the server console, for my portal web application. So, I modified it from
    300 to 0, but it still doesn't update right away. Is this "reload period" the
    problem? Any other suggestions?
    Thanks for any help,
    Kevin

    I would suggest that this be made a configuration parameter on the server console.
    I would not expect to have to go rooting around in the xml config files for something
    that (IMHO) as useful as this.
    "Peter Laird" <[email protected]> wrote:
    >
    Kevin,
    I'm glad you found your solution.
    This is a common problem. People often wonder why it is not set to a
    low number
    after an install, since most people will go into development with it.
    The problem
    is that historically there have been a number of customers who downloaded
    the
    eval copy, ran huge load tests on the out-of-the-box sample, and then
    concluded
    the product was too slow. The reason was that the product was configured
    for development
    (so the server would check the file system for every JSP of every request)
    and
    thus would not perform well at all. Therefore around version 3.2, the
    default
    for all settings was switched to favor production and not development.
    PJL
    "Kevin" <[email protected]> wrote:
    Problem solved...the weblogic.xml file has to be modified...look for:
    pageCheckSeconds
    I changed mine to 1...
    "Kevin" <[email protected]> wrote:
    Hello,
    I recently installed the 4.0 portal server and I set up a new portal
    based on
    the following doc:
    http://edocs.bea.com/wlp/docs40/portal/devbasic.htm
    When I modify one of the jsps that a portlet uses, the changes (when
    viewed in
    a browser) will show up somewhere between immediately and 5 minuteslater.
    I
    thought this might have something to do with the "Reload Period" which
    is modifiable
    within the server console, for my portal web application. So, I modified
    it from
    300 to 0, but it still doesn't update right away. Is this "reload
    period"
    the
    problem? Any other suggestions?
    Thanks for any help,
    Kevin

  • Pass request parameter to portlet in jsp

    Hi,
    I wrote a simple PDK portlet that passes a request parameter to itself. Integrated in a portal page, the parameter passing works as intended.
    Integrated in a jsp using the Oracle taglib, the parameter passing does not work. Here is the code I am using:
    <portal:usePortal />
    <html>
    <head>
    <title>Test-JSP</title>
    </head>
    <portal:showPortlet name="myPortlet" header="false"/>
    </body>
    </html>
    (index.jsp)
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>false</session>
    <passAllUrlParams>false</passAllUrlParams>
    <preferenceStore class="oracle.portal.provider.v2.preference.FilePreferenceStore">
    <name>prefStore1</name>
    <useHashing>true</useHashing>
    </preferenceStore>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>MyPortlet</name>
    <title>My Portlet</title>
    <description>My Portlet</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>true</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>/jsp/show.jsp</showPage>
    <editDefaultsPage>/jsp/editdefaults.jsp</editDefaultsPage>
    </renderer>
    <personalizationManager class="oracle.portal.provider.v2.personalize.PrefStorePersonalizationManager">
    <dataClass>oracle.portal.provider.v2.personalize.NameValuePersonalizationObject</dataClass>
    </personalizationManager>
    </portlet>
    </provider>
    (provider.xml)
    What did I do wrong?
    Regards
    Thomas

    I forgot to mention that the jsp is external and that I am using Portal 10.1.2.
    With internal jsps the parameter passing works fine.
    Amazingly portletRenderRequest.getRenderContext().getPageURL() contains the request parameter. It would be possible to extract it from the url. But I really don't want to do that.

  • Urgent: Parameter problem for portlet displaying jsp running inside tomcat

    Following jsp when run with portal 9.0.2 displays value of Name and Age but value of Telephone parameter is displayed as Null. Can anybody tell me the reason?
    Running this jsp on IBM WebSphere.
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@page import="java.util.*, oracle.portal.provider.v2.*" %>
    <%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
    <%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
    <%
    // The form submit URL refers to the current Portal page. All portlets
    // on this page share this URL. This means that the per portlet parameters
    // are in the same request. Portlets must ensure that its paramerters don't
    // collide either with other portlets or other instances of itself. This
    // is generally accomplished by using "fully-qualified" parameter names. A
    // fully-qualified parameter name prepends the (unique) portlet reference to
    // the parameter. The JPDK provides a utility to accomplish this.
    String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    // These are the session attribute names used to store the current values.
    // Because all instances of this portlet share the same user session we must
    // also fully-qualify these names to avoid collisions.
    String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
    String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
    String sTelephone = request.getParameter("TELEPHONE");
    PortletRenderRequest pRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String formName = UrlUtils.htmlFormName(pRequest,null);
    ProviderUser user = pRequest.getUser();
    ProviderSession providerSession = user.getSession();
    if (providerSession == null)
    %>
    Your provider session has been terminated or has timed out
    and you need to logout and then login to re-establish the session.
    <%
    else
    // Record, in session storage, the last values submitted.
    if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
    providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
    providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
    %>
    <!-- Output the HTML content -->
    <center>
    <table width="70%">
    <tr>
    <td>
    <b>This portlet shows how to post and process information from HTML forms.</b>
    </td>
    </tr>
    </table>
    <form name="<%= formName %>" method="POST"
    action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
    <%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
    <table>
    <tr>
    <td>
    <b>Name :</b>
    </td>
    <td>
    <input type="text" size="20" name="<%= fName %>" value="">
    </td>
    </tr>
    <tr>
    <td>
    <b>Age : </b>
    </td>
    <td>
    <input type="text" size="3" name="<%= fAge %>" value="">
    </td>
    </tr>
    <tr>
    <td>
    <b>Telephone : </b>
    </td>
    <td>
    <input type="text" size="3" name="TELEPHONE" value="">
    </td>
    </tr>
    </table>
    <br>
    <INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
    </form>
    <%
    if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
    %>
    <b>No values have been submitted yet.</b>
    <%
    } else {
    %>
    <b> Last submitted values:</b><br>
    <table>
    <tr>
    <td>
    <b>Name: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sName) %></b>
    </td>
    </tr>
    <tr>
    <td>
    <b>Age: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sAge) %></b>
    </td>
    </tr>
    <tr>
    <td>
    <b>Telephone: </b>
    </td>
    <td>
    <b><%= sTelephone %></b>
    </td>
    </tr>
    </table>
    <%
    %>
    </center>
    <%
    %>
    <!-- End output the HTML content -->
    Can somebody please help me on this?
    Thanks

    Hello,
    Let me know if the answer that I made Help needed: JSP and portal parameter problem.
    Regards
    Tugdual Grall

  • Problem using custom tag library in portlet's jsp

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

  • HTML portlet calling JSP

    We are new to portal development. We have a task where we need to get input data from user, validate it and when the user hits the submit, the portal should call a JSP which is actually executing a stored procedure. We are not clear about how to have user input set as input parameters to the JSP.
    Any help ASAP is appreciated.
    Thanks,
    Kavitha & Sujatha
    Message was edited by:
    user447516

    Hi,
    Why are you developing this portlet as a HTML portlet instead of using a JSP based JPDK portlet directly? Please have a look at
    1. http://www.oracle.com/technology/products/ias/portal/pdk.html
    2. http://www.oracle.com/technology/products/ias/portal/portlet_development_10gr2.html
    3. Post your portlet related queries on http://forums.oracle.com/forums/forum.jspa?forumID=4
    thanks,
    Harsha

  • Including portlet in jsp

    Hi,
    Is there any way through which I can include the porlet in an external JSP?
    If yes then how.
    Edited by: axeeeffect on May 14, 2009 12:45 AM

    The easiest way is to use a URL item that points to a JSP and
    displays it in the folder area. The JSP would run outside of
    Portal in it's own servlet container.
    You can use a Java Application item type, but you can't make it
    display in the folder area.
    In the next release of Portal, you'll be able to use JSP to
    define a portal page. You will also be able to embed portlets
    in a JSP.
    Regards,
    Jerry

  • JSP Portlet help

    Here is our problem:
    We are running Oracle Portal. We want to create portlets using JSP.
    We can create and deploy JSP applications to the OC4J server which is running at http://server1:8888. Portal is deployed on http://server1 (port 80 I assume). We want to use the OC4J for ease of deployment using JDeveloper as well as using servlet API 2.2, which the default server (port 80?) does not seem to provide. Here are some specifics:
    When an application is deployed to server1:8888, the deployment creates two directories, one in which the source (.jsps) are located: D:\ORACLE\j2ee\home\applications\myapplication and another into which the source is compiled D: ORACLE\j2ee\home\application-deployments\myapplication.
    Weve read as much documentation as we can find at PortalCenter.Oracle.com, but havent been able to glean the info we need.
    Specific Questions:
    1) What configuration changes need to be made to which files for the OC4J server in order to deploy to Portal. (Assume that the j2ee directory is D:\Oracle\j2ee)
    2) Where should the provider.xml file (for the portlet provider) be created?
    3) How should provider.xml be configured (which directory and files should be referenced)?
    Were (obviously) none too familiar at this point with the Oracle HTTP services, OC4J services or even portal. All we know is we need to make this work and think this is the best way.
    Weve already been through the JPDK installation and the SampleWebProvider is installed and functions. Even forayed into editing the provider.xml file to include another portlet and met with mixed success.
    All help is appreciated, and we need someone to explain as if to a 5 year old, so that we understand. Thanks.
    Also open to suggestions of other avenues to pursue.

    No replies? Do you need more information? I really need help with this.
    Please reply if this is the wrong Forum or there is somewhere I can find specific answers to my questions.
    Help, please.
    _b
    Brian Wood

  • Remote Inter Portlet Communication for JSR 168

    Hi All,
    We are stuck in a big problem using JSR 168 as remote portlets. We will be relieved if someone can suggest few ideas on this. I will provide the scenario which we are trying now.
    We have two portlets namely portlet A and portlet B which are Java(JSR 168) type portlets. These two portlets are offered as remote and they reside in the producer application. We have consumed these two portlets in our consumer application.
    The portlet A is triggering an event and portlet B is listening to the event triggered by portlet A. Currently we are trying to implement this functionality using Ajax. We tried to use customEventUrl tag in our jsp belonging to portlet A and we finally figured out that customEventUrl will not work in Remote portlets. We are not sure as how to pass the information from remote portlet A to remote portlet B. Please let us know your thoughts about this as whether the implementation is really possible when using Remote portlets.
    IMPORTANT NOTE: The event handling and the configuration code that we have made in the above scenario is working perfectly for non-remote java portlets. The problem is occurring only when we consume them in the consumer application.
    Thanks
    Vijay

    Hello Ashwin,
    What version of WebLogic Portal are you using? And is this the same for both the consumer and producer?
    If you are using WLP 10.3.2 I would highly recommend using JSR286 portlets (the next version of the Java Portlet (JSR168) specification) and the JSR286-standard eventing. The JSR286 eventing model is actually much cleaner and easier to understand than the WLP-proprietary support for events in JSR168 portlets.
    However, if you are using a version of WLP prior to 10.3.2 and can't upgrade, JSR168-style events are your only choice. I can give you examples, but they all look very similar to the examples in the online documentation.
    When events work between portlets locally, but not over WSRP, the usual problems are:
    - There is one or more of "onlyIfDisplayed", "sourceDefinitionLabels" or "sourceInstanceLabels" attributes declared on the handle*Event element in the .portlet file. These attributes restrict when the portlet should receive an event, and they usually don't work the way you think when running over WSRP. It is best to not use these attributes for portlets which are going to be used over WSRP.
    - A payload is being sent with the event which is not actually serializable. If serialization of the event payload (which is required for versions of WLP prior to 10.3.2 for WSRP) fails, the event will not be delivered to the portlet.
    - The producer may be configured to not accept events. Check your producer's WEB-INF/wsrp-producer-config.xml file; the "service-config" element should either not have an "offer-extensions" attribute, or this attribute's value should be "true".
    - The events may be getting sent during a portlet lifecycle other than processAction or handleEvent. There is no way for WSRP to handle events which have been sent during preRender or render, so it simply doesn't work.
    - In the case of JSR168 portlets, if you have a backing file on the portlet (in addition to the portlet implementation as well), that may not work in some circumstances over WSRP. It is best to have the event handlers be in the portlet implementation class and avoid the use of backing files for JSR168 portlets.
    If none of those things help you, my suggestion would be to post a sample .portlet file for one of the portlets that is supposed to be receiving the event, as well as the method signature in that portlet's implementation class that is supposed to be receiving the event, and the code which is sending the event that is supposed to be received.
    Kevin

  • How to set the contentType for JSF Content Portlet.

    Hi,
    When I tried to get the data from data base and construct a downloadable .csv appending the html at the end of the actual csv content. Please find the below given code for reference.
    JSP Code :
    <f:view>
    <h:form id = "test">
              <h:commandButton immediate="true" value = "Download CSV" actionListener="#{myManagedBean.downloadCSV}">
              </h:commandButton>
    </h:form>
    </f:view>
    Managed Bean method (Listener Method):
         public void downloadCSV(ActionEvent event) {
              FacesContext.getCurrentInstance().responseComplete();
              OutputStream os = null;
              try {
                   HttpServletResponse response = (HttpServletResponse) FacesContext
                             .getCurrentInstance().getExternalContext().getResponse();
                   response.setHeader("Content-Disposition","attachment;filename=report.csv");
                   response.setContentType("application/download");
                   os = response.getOutputStream();
                   StringBuffer buffer = new StringBuffer();
                   //following code has to be replaced by records retrieved from database.
                   for (int i = 0; i < 1000; i++) {
                        for (int j = 0; j < 100; j++) {
                             if (j == 0) {
                                  buffer.append("Test " + j);
                             } else {
                                  buffer.append(",").append("Test " + j);
                        buffer.append("\n");
                   System.out.println("Get Content Type :==>"+response.getContentType()); // always returning text/html;
                   os.write(buffer.toString().getBytes());
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   if(os != null){
                        try {
                             os.close();
                        } catch (IOException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    The above given code is appending the html content at the end of the actual content. I noticed one thing, even though I am setting the content type to application/download (or) text/csv when i am printing the content type it is always returning "text/html".
    Thanks.

    Hello,
    The portal will not allow you to change the content-type of a single portlet's response. Since each portlet is rendered onto a single HTML page along with other portlets, the content-type of the whole page (and therefore of each portlet) must be HTML-- you can't have a different content-type for just a portion of the page.
    This means that you cannot render non-HTML content for a portlet within the portal framework. However, you can render non-HTML content as a separate "resource" outside of the portal context- for example, if you create a resource URL in your portlet that points at a servlet, the servlet can serve up any content-type you wish.
    The JSR329 JSF portlet bridge (and the JSR286 portlet specification it is based on) even have a special "portlet-served resource" mechanism that allows you to serve non-HTML content while still having access to all of the portal context (all of your portlet state). From the code you posted, it looks like you are not using the JSR329 portlet bridge, but you might want to take a look at it.
    Kevin

  • How to catch and display a link content in another portlet page?

    Can you tell me how to display a URL content into next page after an user click s on this link? I am developing a JSR 168 portlet under a Portal. I have 3 pages so far in my portlet. view.jsp, view2.jsp and IpByHourPage.jsp. view2.jsp displays a lis of IP address. When an user clicks on an IP in view2.jsp, it goes to IpByHourPage.jsp. How to catch the IP address such as 123.23.89.21 that an user just click displayed in IpByHourPage.jsp. I don't know why I got null value returned.
    Also, I don't know how to do a "go back to previous page". I want to go back to view2.jsp from IpbyHourPage.jsp
    Here is my code
    in view2.jsp
    <portlet:renderURL var="aURL">
    <portlet:param name="goto" value="IpByHourPage"/>
    </portlet:renderURL>
    <a href="<%=aURL.toString() %> "><%=MyIP%></a>
    in IpByHourPage.jsp
    <%
    String MyIPHour = request.getParameter("goto");
    %>
    <h1>IP Report by Hour ( <%=MyIPHour%> )</h1>
    <portlet:renderURL var="Ret_IPByHour">
    <portlet:param name="Ret_IPHourPage" value="Ret_IPByHourPage"/>
    </portlet:renderURL>
    <center> <a href="<%=Ret_IPByHour.toString() %> "><b>Choose Another IP</b></a></center>
    in my .java file
    protected void doView(RenderRequest request, RenderResponse response)
    throws PortletException, IOException, UnavailableException {
    response.setContentType("text/html");
    String MyBegDate = request.getParameter("BegDate");
    String MyEndDate = request.getParameter("EndDate");
    String MyNetworks = request.getParameter("networks");
    String MyYourName = request.getParameter("yourname");
    PortletURL renderURL = response.createRenderURL();
    renderURL.setPortletMode(PortletMode.VIEW);
    request.setAttribute("renderURL", renderURL.toString() )
    String GotoRenderAction = request.getParameter("goto");
    String MyIPHourAction = request.getParameter("Ret_IPHourPage");
    if ( (MyIPHourAction!=null) && MyIPHourAction.equals("Ret_IPByHourPage") )
    PortletRequestDispatcher kk = getPortletContext().getRequestDispatcher("/view2.jsp");
    kk.include(request, response);
    if (MyIPHourAction != null && MyIPHourAction.equals("Ret_IPByHourPage"))
    PortletRequestDispatcher mm = getPortletContext().getRequestDispatcher("/view2.jsp");
    mm.include(request, response);
    if (GotoRenderAction != null && GotoRenderAction.equals("IpByHourPage"))
    request.setAttribute("BegDate", "MyBegDate");
    request.setAttribute("EndDate", "MyEndDate");
    System.out.println("BegDate" + MyBegDate);
    System.out.println("Endate" + MyEndDate);
    PortletRequestDispatcher mm = getPortletContext().getRequestDispatcher("/IpByHourPage.jsp");
    mm.include(request, response);
    if(MyEndDate!= null )
    PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/view2.jsp");
    prd.include(request, response);
    else if (MyEndDate==null && GotoRenderAction == null)
    PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/view.jsp");
    prd.include(request, response);
    The problem for above code is the clicked single IP can not be displayed in IpByHourPage.jsp. and I cannot go back to view2.jsp from IpByHourPage.jsp. when I click "Choose Another IP"
    I find out that the MyBegDate and MyEndDate values are all null when I click Choose Another IP link. I got the following error message
    Caused by: javax.servlet.ServletException: Unparseable date: "null null"
         at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         at org.apache.jsp.view2_jsp._jspService(view2_jsp.java:651)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    How to fix above problems. Thanks

    I think the problems are related to portletsession. But I don't know how to use it. How to put portletsession into doview method or my jsp pages. Can anyone tell me in my code? Thanks a lot.

  • How can I pass information from one portlet to another?

    First, some background...
    I am using Portal 5.0.2 and developing portlets using JSP/Java on a remote server.
    I need to pass information from a portlet on pageA to another portlet on pageB, but I can't do it using the traditional methods, such as query string, session, cookies, etc. due to either portal framework limitations or because of functional constraints (basically, a user will not necessarily be logged in to the portal, but he can view anything available to the GUEST user). Here are the different ways I've considered using to save state and their limitations:
    Query string: can't use this because portlets on remote servers don't have access to it
    Cookies: if user disables cookies, code will not function properly
    Session variables: limited to one user's connection with one portlet (i.e., can't access a session variable set in portletA from portletB)
    Application variables: because the user may not be logged in, I have no way of uniquely naming variables, which is a necessity in order to maintain state for EACH user
    User Settings: again, the user may not be logged in, so I can't use these
    PCC: can't access client-side variables because server-side JSP executes first
    Are my assumptions above correct? Has anyone had any success using one of these methods given the same constraints, or does anyone have an alternative solution? I'd certainly appreciate any help anyone could provide.
    Thanks,
    Jose

    One possibility would be to use a Login PEI to set a unique UserInfo Name/Value for the user. I think in 5.0 each guest session is unique, so would have unique UserInfo. Then you could pass this value to your portlet (by specifying it in the web service) and use it as a key into a Application-scoped hashmap where you store your info. In other words, your Application variables option, but you have a way of uniquely naming your variables via PEI-set UserInfo.

Maybe you are looking for

  • How can I get back images that keynote just decided to lose?

    I Was working on a presentation for 2 hours and all of a sudden the pictures disappeared! If they don't come back I can't risk doing that again, it could be the new surface pro instead!

  • Real slow response - Any suggections?

    Hi, I have a query that runs 3-4minutes in the interactive report region. If I put it in a regular report region it comes back in 5 secs until I put a order by on it then it takes about 1 minute. We have alot of data and show only what the person has

  • Permissions needed to use VCS as Phone Book Source

    Greetings, Backgound: I would like to use our parent company's VCS (ip reachable) as a phone book source in our TMS. It would appear that I first have to add the VCS to our systems list in TMS.To add it to our systems list I apparently need some cred

  • Spontaneous Exposé with Mighty Mouse clicking

    All of a sudden my PowerMac G5 will spontaneously go into F9 Exposé mode, showing all open windows, then immediately reverting back to the window I was working in. But then it will repeat this over and over and over and I'm unable to stop it. Eventua

  • Delete user id and password of some one created in my Iphone

    I purchased one 4G Iphone from some one,he has downloaded somany programs,but I dont know his user id and password,I have already created one id .I need to delete his id from my Iphone.when I update these programs,which is asking his user name and pa