Use JSF with Portlet JSR 168 Specification

Hi
I need to know.... is possible run JSF application with Portlet Specification JSR 168, using Pluto Portal and Apache Tomcat ???
Best Regards
Mauricio

Hi,
the Apache Jetspeed2 - Project has a bridge,
that is designed to work with MyFaces.
http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed-2/portals-bridges/myfaces/
Hope it helps you.
Regards,
Matthias

Similar Messages

  • Upload file in Portlet (JSR-168) with library commons-FileUpdate

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

  • Local portlet (jsr 168) in separate webapp possible?

    I have a running portal webapp with some portlets inside (from the tutorials).
    Now I want to add a jsr 168 portet to the portal. The portlet is to be in a separate webapp. I already have it as a war file, if possible I would like to drop the import the war in the portal as a local portlet. Is this possible?
    In pluto (running on tomcat) the portal webapp can "see" the local portlets in other webapps through the crossContext="true" setting for webapp contexts.
    It is not possible for me to pack multiple portlets in a single webapp, since:
    - if possible I would like to deploy already packed war files
    - I use JSF (the required bridge to JSR-168 is already part of the webapp) which uses webapp-wide context-params and also faces-config.xml and other resources, making it impossible to mix multiple JSF portlets inside a single webapp.
    Thanks in advance

    No - this does not go through WSRP. WLP does bypass web services, SOAP,
    HTTP etc when you are running in what is called a local proxy mode. This
    mode is like a method call from the portal web app to your portlet web
    app.
    Subbu
    Peter Mutsaers wrote:
    You mean you have to go through WSRP, even in the local VM? Is there no way to have a truely local portlet (JSR-168 directly without WSRP) in another webapp when running in the same WLS instance?

  • How get browser URL from portlet JSR-168?

    I use Oracle Portal. And I have problem.
    How get browser URL from portlet JSR-168?

    Normaly it is
    http://server:port/portletContextRoot
    Did you create the portlet with JDeveloper? When you dpeloy the portlet to your application server, JDeveloper should output the URL of the portlet test page in the deployment output feedback.

  • Portlet JSR 168

    hi ..
    I can add navigation parameters to portlet JSR 168 by adding the parameters in oracle-portlet.xml .. where it is the only way for portlet communication .
    now I create JSF Application and expose it to JSR 168 -by adding portlet.xml file - it work good but I want to add navigation parameters for this portlet , how ??
    thanks

    You need to deploy to a WLS and then register the WSRP producer to your consuming application.
    You can read my paper about portlets: http://www.yonaweb.be/sites/default/files/ipc_0.pdf
    It explains the basic on how to create and consume portlets in WebCenter 11.1.1.3

  • Mysterious JSF Error In JSR 168 Portlets

    Hey everyone. I'm working with a rudimentary JSF application that I'm trying to surface in a JSR 168 portlet, and I'm running into a mysterious stack trace in our Portlet logs. I can deploy and surface the portlet just fine, but the following exception occurs when I put the portlet in VIEW mode:
    Caused by: java.lang.UnsupportedOperationException
    at javax.faces.context.FacesContext.getELContext(FacesContext.java:137)
    at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:467)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:697)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:676)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:284)
    ...We're using the Apache JSF portlet bridge, but have noticed the same results using the Sun bridge. In any event, the exception is being thrown by a private method (getELContext) in the JSF API. I've been unable to gain any insight on what this exception means through Googling and stepping through the bridge code. Can anyone shed some light on what may be wrong?
    Thanks,
    Joe

    Hey everyone. I'm working with a rudimentary JSF application that I'm trying to surface in a JSR 168 portlet, and I'm running into a mysterious stack trace in our Portlet logs. I can deploy and surface the portlet just fine, but the following exception occurs when I put the portlet in VIEW mode:
    Caused by: java.lang.UnsupportedOperationException
    at javax.faces.context.FacesContext.getELContext(FacesContext.java:137)
    at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:467)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:697)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:676)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:284)
    ...We're using the Apache JSF portlet bridge, but have noticed the same results using the Sun bridge. In any event, the exception is being thrown by a private method (getELContext) in the JSF API. I've been unable to gain any insight on what this exception means through Googling and stepping through the bridge code. Can anyone shed some light on what may be wrong?
    Thanks,
    Joe

  • Java Portlet (JSR 168) development with Portal

    Hello,
    We have been trying to dive back into Portal development lately. The release of 9.0.4 with support for standards-based portlets has convinced us to begin looking at 9iAS Portal as a practical portal product. We have a development environment setup with a workin 9.0.4 portal.
    Digging through the available docs on the portal studio site, I have come across a couple documents alluding to the installation of a portlet-container. Now, I have already downloaded the JSR 168 framework files. It seems that a good portion of this 'portlet container' consists of these files.
    The problem is that the documentation that is available is nothing more than a step by step set of instructions for setting up an OC4J instance with this 'portlet container', configuring an Oracle database for portlet customizations, and deploying a sample ear into the OC4J instance.
    This does nothing for me.
    What I want is documentation that indicates the requirements necessary to make a JSR-168 compliant portlet (even a 'hello world') exposed through portal with the least amount of effort, and with no references to proprietary tools. I would like to see instructions that are tailored towards a generic J2EE provider, not an OC4J one. I already have a very functional set of tools that should be able to accomodate a JSR-168 producer. We have had many problems with OC4J leading us to try to avoid it at all costs.
    Any ideas?
    Thanks!
    -Sean

    Hello
    I am probably not clear.
    In the OracleAS Portal architecture Java portlet are remote from the portal middle tier.
    In the non standard world (JPDK Portlet), the Portal Middlet tier use SOAP over HTTP to call the portlets.
    In the Standard world (JSR-168), the Portal Middle Tier will use WSRP (Web Service Remote Portlet) to call the portlets. When you use the Oracle JSR-168 container inside OC4J, these portlets are automatically accessible over remotely using WSRP.
    So, as you can see the Portal Middle Tier needs to support WSRP to be able to use JSR-168 portlet. And OracleAS 10g 904 does not currently support WSRP registration. It is why we have the "OracleAS Portal Verification Service for WSRP", to allow you to test your portlet.
    To be able to use JSR-168 (with WSRP) portlet on you internal Portal you'll have to install the OracleAS Portal Standard Developer Preview that will be available soon.
    Hope that clarify my previous statements.
    Regards
    Tugdual Grall

  • Performance Issue : Why does ADF Taskflow Portlet (JSF bridge portlet) loading ADF Specific images, css, js everytime from portlet producer with dynamic URL with portlet_id and context parameters?

    Hi All,
    We have used WSRP Portlet in Webcenter Portal Page. The Portlet is created using JSF Bridge out of ADF Bounded Taskflow.
    It is causing Performance issue. Every time static content like js, css and images URLs are downloaded  and the URL contain portlet_id and few other dynamic parameters like resource_id, client_id etc.
    We are not able to cache these static content as these contains dynamic URL. This ADF Specific  images, js and css files  are taking longer time to load.
    Sample URL:
    /<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fring_60.gif~26locale~3Den~26checksum~3D3e839bc581d5ce6858c88e7cb3f17d073c0091c7/ring_60.gif
    /<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fpartition~2525252Fie~2525252Fn~2525252Fdefault~2525252Fopt~2525252Fimagelink-11.1.1.7.0-4251.js~26locale~3Den~26checksum~3Dd00da30a6bfc40b22f7be6d92d5400d107c41d12/imagelink-11.1.1.7.0-4251.js
    Technologies Used:
    Webcenter Portal PS6
    Jdeveloper 11.1.1.7
    Please suggest , how this performance issue can be resolved?
    Thanks.
    Regards,
    Digesh

    Strange...
    I can't reproduce this because i have issues with creating portlets... If i can solve this issue i will do some testing and see if i can reproduce the issue...
    Can you create a new producer with a single portlet that uses a simple taskflow and see if that works?
    Are you also using business components in the taskflows or something? You can try removing some parts of the taskflow and test if it works so you can identify the component(s) that causes the issues.

  • Using jsf with struts

    hi;
    i am trying to understand the proper architecture when using jsf and struts together.
    i think i understand the differences between the technologies . it seems to me that instead of justifying jsf there should be a focus on how the two technologies actually collaborate.
    specifically, i would like to know or see examples of things like replacing the view portion of struts and plugging in the jsf framework instead or how to i replace the struts actions with jsf commands or maybe they are totally different things.
    where can i get information like this?
    thanks.

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • Is it possible to use servlets with portlets?

    I am building a Java portlet that will update a user's OID repository data. We are using it to provide a more user-friendly interface than the default Oracle "My Account" link on Portal.
    That portlet is made up by a JSP that submits the information to a Servlet that, in turn, forwards it to another servlet (using RequestDispatcher) that does the actual OID update and then it should redirect the page flow back to the original JSP to show the user a confirmation message.
    Things run fine up to where the OID entry is being updated correctly, but I am unable to redirect the flow back to the original JSP.
    JSP ----> Servlet ----> Servlet
    ^------------------------------|
    I did a little test and found out that after submitting the form to the 1st servlet, I cannot get a PortletRenderRequest object in that servlet.
    I have read the available documentation about building portlets but I cannot get a clear picture as to how I am supposed to build a portlet that uses servlets, or if it is possible at all.
    Is there a way to do this? Or if there isn't, can anyone provide an alternative?
    Thank you in advance.
    Best regards,
    Aldo Herrera

    If you mean the application AIM for Mac, it will depend on your download speed.
    If you mean "Can I use iChat with an AIM a screen name and does it cost anything ?" then the answer is Yes you can and no it does not cost and there is no download to do.
    If you mean "Can I use the AIM service with an @mac screen name and can this be done for free ? " then the answer is again yes.
    A trail account cost nothing and will work in ichat after the 60 days is up
    A Paid for but Lapsed account will also work in iChat and for this purpose can now be considered free.
    As I said and hinted at before your first question does not make it clear what you are actually asking.
    The Application AIM for Mac is stuck at version 4.7 and does not do Video or Audio Only chats.
    It has things that are useful in tweaking Buddy Lists in iChat but it is not specifically needed to contact AIM Buddies.
    9:00 PM Tuesday; June 24, 2008

  • Unusual using jsf with own servlet

    Hi, it will be useful for me within my javax.servlet.Servlet class implementation I use JSF for printing output to my ServletResponse.
    What I must to do for it?
    thanks for suggestions.

    The simplest thing would be to forward to or include the appropriate URL that is handled by JSF. If for some reason this is not acceptable you might want to take a look at the implementation of the FacesServlet. But I would encourage you to pursue the forwarding/including solution first as it will be less fragile.

  • Best Practices for Using JSF with AJAX - BluePrints OR Ajax4Jsf ?

    I am a newbie to AJAX4JSF . I think it provides Rapid Application Development (RAD) just by using tags like a4j: without the need to develop complex JSF Custom Components as shown in BluePrints Catalog
    https://bpcatalog.dev.java.net/ajax/jsf-ajax/
    I understand the purpose of developing JSF Custom components as Reusable for using with AJAX. But its complex and requires lot of coding i.e. PhaseListeners and Managed Beans. There should be easy way to do this especially our project needs RAD tool like AJAX4JSF.
    Any suggestions will be highly appreciated
    Regards
    Bansi

    Bansi, you are trying to compare orange-to-apple. Blue print catalog is a historical retrospection about what people thought about AJAXifying JSF in the past. Currently, the playground has been moved to the jsf-extension project. Look for DynaFaces there.

  • Portlet(JSR 168) deployment procedure

    i have created portlet and wnat to know, how register the portlet under the producer to drag n drop into the another jspx page.
    Please explain the procedure...

    You need to deploy to a WLS and then register the WSRP producer to your consuming application.
    You can read my paper about portlets: http://www.yonaweb.be/sites/default/files/ipc_0.pdf
    It explains the basic on how to create and consume portlets in WebCenter 11.1.1.3

  • Parameter passing and forwarding issues with 10.1.4 JSR 168 portlets

    Hi,
    I'm using version 10.1.4 version of Oracle Portal Server, and am trying to move a JSP web application to a JSR 168 compliant portlet.
    I am experiencing these issues:
    1. There are <form> tags in my JSPs. I've set the action attribute to "<portlet:actionURL>". This works okay and I can see the parameters in my processAction properly. However, if I modify the action attribute to "<portlet:renderURL>", I do not see any parameters in my doView(). Is this expected or a known bug?
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    3. My JSPs use request.setAttribute() and request.getSession().setAttribute(). I don't see these attributes in my processAction using request.getAttributeNames(). Is there another way of retrieving them?
    4. In my JSP, I have this code in a method declaration:
    String forwardPage = "hello.jsp";
    RequestDispatcher forwarder = request.getSession().getServletContext().getRequestDispatcher(forwardPage);
    forwarder.forward(request, response);
    This results in an exception on the server:
         06/05/07 00:25:10 AnupamPortlets: JspServlet: unable to dispatch to requested page: java.lang.NullPointerException
         at com.evermind.server.http.HttpApplication.isLegalFileSystemPath(HttpApplication.java:1298)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:502)
         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.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:253)
         at opportunity_detail____contacts__view._Controller.processRequest(_Controller.java:2516)
         at opportunity_detail____contacts__view._Controller._jspService(_Controller.java:2592)
         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 mypackage1.Portlet1.doView(Portlet1.java:158)
    I've tried moving the page around and using request.getContextPath() and getNamedDispatcher(), but same error.
    This is supported, right? I saw some old messages about this being a bug on the PDK side.
    Actually, using forwarder.include() works, but causes other issues
    Any ideas what I can try of any of these will be greatly appreciated. Thanks.

    Hi Anupam,
    I can help you with question #2.
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    I believe that the issue is an artifact of the interpretation of the JSR-168 specification by Oracle. I discovered that the setRenderParameter basically ends up sending a redirect back to the browser with the render parameters in the URL. This raised security concerns as you may have wanted to pass some sort of internal data from your action to your render request. The parameters in the url "hang around" once they are there so your portlet keeps recieving them. Based on this behavior I have decided to not use setRenderParameter in Oracle portal.
    -sean
    Solutions Architect
    www.sagelogix.com

  • Integration between portlets using JSR 168

    I've developed 3 portlets but I want them talking with each other, in a way that is JSR 168 compliant.
    For example, I have a search box portlet, where the user can only type search expressions, a search result portlet, where the user will see search results, and a search summary portlet, where the user will see statistics about search.
    First question: how can I send data from one portlet to another? Is HttpSession a safe place to share data between portlets? Can I trust that all containers will create a single HttpSession per user?
    Second question: how can one portlet force refresh of another, or even hide or show up another portlet?

    Well it is a very smart question..
    To be more precise i don't think it is been properly answered with
    JSR 168 specification.
    However,there few best practises followed in order to achieve it.
    The idea of using HttpSession (PortletSession.getHttpSession() with Usage of AJAX) as you said it certainly one of the things which evryone would think.
    http://www.ibm.com/developerworks/websphere/library/techarticles/0604_scott/0604_scott.html
    http://www.doc.ic.ac.uk/~mo197/portlets/portlet_messaging/
    http://wiki.java.net/bin/view/Portlet/JSR168FAQ(checkout the last part of the document)
    http://www.michaelgilfix.com/techblog/2007/01/27/ajax-and-portlets
    http://www.theserverside.com/news/thread.tss?thread_id=35385
    http://blogs.jboss.com/blog/jviet/2005/07/14/The_recurring_interportlet_communication_dilemna.txt
    http://portlets.blogspot.com/2005/07/inter-portlet-communication-library.html
    http://docs.sun.com/app/docs/doc/819-5942/6n807tpc2?a=view
    http://www.oracle.com/technology/products/ias/portal/pdf/oow06_S281756_jsr168ajax.pdf
    http://docs.jboss.org/jbportal/v2.2/reference-guide/en/html/ipc.html#d0e1308
    However,SUN is trying to revise it in their next specification JSR 286.
    http://jcp.org/en/jsr/detail?id=286,
    http://blogs.sun.com/nav/entry/understanding_portlet_2_0_jsr1,
    http://apachecon.com/2006/US/presentations/FR8/FR8-JSR-286-updated.pdf
    Second Question:how can one portlet force refresh >of another, or even hide or show up another portlet?As discussed earlier Usage of AJAX / (And storing Common Credentials in a Bean which scoped to HttpSession) in the dependent portlet would be quite handy in the above discussed case.
    Hope this might help :)
    REGARDS,
    RaHuL

Maybe you are looking for