BC4J Java portlet anyone?

Hi,
Has anyone managed to write a BC4J Java portlet? Or for that matter a UIX Java portlet? I have found some info on writing a Struts based Java portlet but nothing on either BC4J or UIX.
Thanks,
Steve

I have converted a three page bc4j jsp application to three portlets in 902618 version of the portal. But i was feeling lazy to remember all the steps i had to go through..but then i found these steps in Oracle9i Application Server Developer's Guide.
chapter 9 - Running in a Portal Framework
Looks like they have got most of the steps if you want to turn your application into portlets.
Here is a cut and paste for you..
--------------------xx------------------------
You need to add some calls to the JPDK API to make your application run in a portal environment.
Update the links where you want to display another page within the portlet. If the file that contains the URL is an HTML page, you have to change it to a JSP page because you need to determine the URL dynamically.
See Section 9.4, "Update the Links Between Pages Within a Portlet".
Invoke the include method instead of forward. You have to use include because the portal needs to add data from other portlets. If you use forward, the portal does not have a chance to gather data from the other portlets.
See Section 9.5, "Use include instead of the forward Method".
Use the portletParameter method in the HttpPortletRendererUtil class to ensure that request parameters have unique names. This ensures that applications on the portal page read only their parameters and not parameters for other applications. This also enables applications to use the same parameter name; the method prefixes parameter names with a unique string for each application.
See Section 9.6, "Protect Parameter Names".
Make all URL paths absolute paths using the absoluteLink or the htmlFormActionLink method in the HttpPortalRendererUtil class, depending on the HTML tag.
See Section 9.7, "Make All Paths Absolute".
---------------------xx---------------------------
This might give you a starting point.

Similar Messages

  • Java Portlet built with BC4J JSP

    Dear Forum,
    The BC4J JSP tag "jbo:ApplicationModule" creates a stateful session by storing a sessioncookie: When this cookie is found, the application module object will be re-used across webpages.
    When a Java Portlet is built using BC4J-JSP, this portlet plants a cookie in its client (the portal). This seems however not to be possible. This means that the portlet can only be stateless.
    Has anyone a clue how to plant a cookie in the portal; thus enabling stateful sessions?
    Kind regards,
    Edwin Grosmann

    It looks like WebSphere is wrapping the Oracle JDBC driver with it's own classes (like com.ibm.ejs.cm.proxy.OraclePreparedStatementProxy).
    On Step 1 of the Business Components Project Wizard, change the SQL Flavor toSQL92 and the Type Map to Java.
    This is the same type of thing required with talking to non Oracle databases (in short, it tells BC4J not to cast things to Oracle classes and just talk against java.sql.*)
    Hope this helps,
    Rob
    Team JDev

  • Anyone using Java Portlet Tools?

    Is anyone using the Java Portlet Tools to develop portlets?
    You can read about it here:
    http://dev2dev.bea.com/pub/a/2006/05/java-portlet-tools.html
    I was told by BEA that this is unsupported but I don't think thats going to be a problem.
    If you are not using this then how do you build portlets in java without resorting to scriptlet code?

    Thanks for the reply Chris.
    It looks like the portlet tools does 3 things:
    1 - filters content like the DotNet WCC http module to make existing apps behave when run inside the portal
    2 - drops a bean in the request automatically for you so that you can access portlet functionality on the jsp with JSTL and no scriptlet code
    3 - gives you some custom tags to read and write session prefs and publish and subscribe to events without javascript
    Items 2 and 3 are very desirable to me for new portlet development.
    So who is using this toolkit and are you using it with JSF or Struts or just straight JSP?

  • Character conversion error when installing Java Portlet Container Preview

    I'm trying to tets out JSR 168 portlets on our Oracle 10g server. I'm following the instructions at http://portalstandards.oracle.com/
    I download and try to install the "Java Portlet Container Preview Release 2", and I get the following error:
    [oracle@jupiter home]$ java -jar ~/wsrp-install.jar ~/jwsdp-1.3
    File "/home/oracle/jupiter_mid/j2ee/home/config/global-web-application.xml" modified successfully
    oracle.webdb.utils.PortalExceptionImpl: Error transforming file "config/server.xml"
    at oracle.portal.PortalException.<init>(PortalException.java:66)
    at oracle.webdb.wsrp.server.install.InstallException.<init>(InstallException.java:31)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:387)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    Caused by: javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    ... 2 more
    caused by: ; SystemID: http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd; Line#: 1; Column#: -1
    javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    [oracle@jupiter home]$
    This is what the server.xml looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!DOCTYPE application-server PUBLIC "-//Oracle//DTD OC4J Application-server 9.04//EN" "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd">
    <application-server localhostIsAdmin="true"
    application-directory="../applications"
    deployment-directory="../application-deployments"
    connector-directory="../connectors">
    <rmi-config path="./rmi.xml" />
    <sep-config path="./internal-settings.xml" />
    <jms-config path="./jms.xml" />
    <javacache-config path="../../../javacache/admin/javacache.xml" />
    <log>
    <file path="../log/server.log" />
    </log>
    <transaction-config timeout="30000" />
    <java-compiler name="javac" in-process="false" extdirs="/home/oracle/jupiter_mid/jdk/jre/lib/ext" />
    <global-application name="default" path="application.xml" />
    <application name="BC4J" path="../applications/BC4J.ear" auto-start="true" />
    <application name="BC4JManager" path="../applications/BC4JManager.ear" auto-start="true" />
    <application name="IsWebCacheWorking" path="../applications/IsWebCacheWorking.ear" auto-start="true" />
    <application name="jdev_test2" path="../applications/jdev_test2.ear" auto-start="true" />
    <global-web-app-config path="global-web-application.xml" />
    <web-site default="true" path="./default-web-site.xml" />
    <cluster id="1214162165" />
    </application-server>
    server.xml looks ok, and I've tried tweaking it to no avail. Anyone know what could cause this?

    Could you make sure you don't have any extra Apache libraries hanging around in your global classpath, i.e. ensure there is nothing extra in <J2SE Home>/jre/lib/extThere's a xercesImp.jar under mid/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/lib/xercesImpl.jar, but there's also one under jwsdp-1.2/jaxp/lib/endorsed/xercesImpl.jar. Is that supposed to be in there?
    Neither of these are getting loaded, though; running java -verbose shows that all of org.apache.xalan.* is being loaded from mid/jdk/jre/lib/rt.jar
    FWIW, ../../lib/xmlparserv2.jar does exist, but doesn't look like it's being loaded. :-\

  • Using SSO username/password in java portlet for Database Connection

    Hi all,
    We implemented java portlet with environment Oracle Application server 10.1.2 and Portal 10.1.4
    At present we are picking the database username and password and connect string in properties and our
    java class is reading the properties file and connecting to database to fetch the records.
    Our idea is to not to pick the username/password and connect string from the properties file or
    not to configure the datasource in data_source.xml.
    Our Requirement is who ever login to the Portal(SSO) our java class should pick the sso username/password and
    connect to database to fetch the record(s).
    Because our database users are one to one mapped to sso user(s) of portal.
    We request anyone to guide us how can we do it or suggest any suitable solution for our requirement.
    Thanks
    Dan Tey

    I think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.

  • Passing parameters to a java portlet from pl/sql proc

    hi !
    I try to build a link with a pl/sql procedure to a portal page which contains a java portlet. this link should pass a non qualified parameter to the page ... I try to get this parameter doing so : pr.getParameter("myparam") but nothing's work ...
    Can someone help me??
    thanks

    not exactly what you wanted but ingredients can be found at
    - JPublisher's docuemntation (especially "Type Mapping Support Through PL/SQL Conversion Functions")
    - http://otn.oracle.com/sample_code/tech/java/jsp/Oracle9iJSPSamples.html (Best Hotels PL/SQL Sample )
    - http://otn.oracle.com/tech/xml/xdk_sample/xdksample_093001i.html
    hope this helps
    Kuassi
    I have a Java Stored procedure which takes an instance of a different java object as its parameter.
    I need to do this from a pl/sql package - can anyone point me to a sample etc (looked on the website but don't see one) ?
    Andrew

  • Question: How can I convert Java portlets into iViews? ...

    Hi David,
    Thank you for reading this post.  Currently, I have java portlets and have
    some questions converting them to iViews.  I have the iView conditions
    listed below with my questions:
    <u><b>iView Conditions:</b></u>
    <b>1. Usage of Correct Naming Conventions:</b>  If possible, can you show me a sample of
    the correct naming conventions?
    <b>2. Single Sign On:</b>  If possible, can you please elaborate more on this and possibly provide
    an example?
    <b>3. Session State (During the entire usage of an iView, session state
    and transaction integrity must be maintained)</b>. If possible, can you please elaborate more on this and possibly provide an example?
    <b>4.  Browser Independence (An iView must work with all supported versions of at least one browser type supported by Enterprise Portal).</b>  If possible, can you list supported versions?
    <b>5.  Look and Feel (The iView must present data in the Enterprise Portal
    look and feel and allow for the different personalization options that
    are possible with the SAP Enterprise Portal).</b>  If possible, can you please elaborate more on this and possibly provide an example?
    <b>6. Error Messages (The iView must be implemented in a way that provides
    default/ relevant/ meaningful error messages)</b> If possible, can you please elaborate more on this and possibly provide
    an example?
    <b>7. No Hard-Coded Paths </b> I understand this but just to make sure, can
    you possibly provide an example?
    <b>8. Special Characters (iViews must be able to depict reserved HTML
    characters)</b>
    If possible, can you please elaborate more on this and possibly provide
    an example?
    Thank you so much for your time and look forward to your
    response.
    Thank you,
    Baggett

    Hi, this question is addressed to anyone who could help, my apologies for any confusion.
    Thank you,
    Baggett

  • Creating a web provider for java portlets

    Hi all,
    i'm using
    - Oracle Database Server 8i (Rel3 - 8.1.7.1.1)
    - Oracle 9i Application Server (Rel2 - 1.0.2.2.2)
    - Oracle Portal 3.0.9.8.2
    I'm trying to crate a web provider in order to use java portlets, but there's a problem with:
    "An unexpected error occurred: ORA-29531: no method getPortletList in class oracle/webdb/provider/web/HttpProviderDispatcher"
    Does anyone know why?
    I've searched for the class mentioned above but I can't find it..
    thanks for the reply,
    Alessio ([email protected])

    The problem is probably caused by prohttp.jar becoming invalid or corrupt inside the database. The file is found in <IAS_HOME>/portal/lib (or jlib). Use the following command to reload.
    loadjava -resolve <portal user>/<portal pass> <file path>/prohttp.jar

  • Creating Java Portlets without JDeveloper

    I am using Oracle AS 10g, and Portal. I have looked at the Portal Dev Guide (9.0.4), and have not found any information on how to create and deploy Java portlets without the use of JDeveloper. I was able to do this using earlier versions of Portal and JPDK.
    Does anyone know of any documentation that could help me with this? Thanks.

    I think this is the article you're looking for: Packaging and Deploying Your Providers.
    Peter

  • Java Portlet

    I have application with jsp portlets I am trying to add java portlets to the same
    it throws following error
    <Feb 25, 2004 11:32:20 AM CST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=1
    2663724,name=sales,context-path=/sales)] Servlet failed with Exception
    java.lang.NullPointerException
    at com.bea.netuix.servlets.controls.portlet.JavaPortlet.getPortletInfo(J
    avaPortlet.java:827)
    at com.bea.netuix.servlets.controls.portlet.JavaPortlet.init(JavaPortlet
    .java:168)
    at com.bea.netuix.nf.ControlLifecycle$1.visit(ControlLifecycle.java:149)

    I got that working. My web.xml file is missing some elements.
    Thanks
    "Satish" <[email protected]> wrote:
    >
    Ajit,
    Were you able to get it working ? If so, could you please share it.
    Anyone else knows how to get through this.
    Thanks,
    Satish
    "Ajit Dangal" <[email protected]> wrote:
    I have application with jsp portlets I am trying to add java portlets
    to the same
    it throws following error
    <Feb 25, 2004 11:32:20 AM CST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=1
    2663724,name=sales,context-path=/sales)] Servlet failed with Exception
    java.lang.NullPointerException
    at com.bea.netuix.servlets.controls.portlet.JavaPortlet.getPortletInfo(J
    avaPortlet.java:827)
    at com.bea.netuix.servlets.controls.portlet.JavaPortlet.init(JavaPortlet
    .java:168)
    at com.bea.netuix.nf.ControlLifecycle$1.visit(ControlLifecycle.java:149)

  • Deploying  Jave portlet on Oracle Application Server 10g

    I have installed Oracle 10g Application server, donwloaded and installed JDevleoper 9.0.5.1 and the latest Java Portal Development and as well as the JDeveloper portlet-addin. Now, I followed the instructions from the http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/BUILD.JSR168.PORTLETS.USING.JAVA.PORTLET.WIZARD.9IJDEVELOPER.HTML
    On using JDeveloper addin wizrd to create a java portlet and so far so good. However, I am stuff on the last bit on deployment. It document says "# Now use the URL provided in the log page at the bottom of JDeveloper to get part of your URL (e.g. http://myserver.uk.oracle.com:8888/my-portlet) and complete the URL.
    http://myserver.uk.oracle.com:8888/my-portlet/portlets?WSDL
    Now use this URL to register your portlet with OracleAS Portal.
    But when i deploy my application (just a test thing), from the deployment tab I get:
    ---- Deployment started. ---- 22-Mar-2005 14:11:27
    Target platform is Oracle Application Server 10g (hotseatConnection).
    Wrote WAR file to C:\work\oracle\MyProject\MyPortlet\deploy\hotseat.war
    Wrote EAR file to C:\work\oracle\MyProject\MyPortlet\deploy\hotseat.ear
    Invoking DCM servlet client...
    C:\Java\j2sdk1.4.2_03\jre\bin\javaw.exe -Djava.protocol.handler.pkgs=HTTPClient -jar C:\Java\JDeveloper9.0.5.1\jdev\lib\oc4j_remote_deploy.jar http://194.83.41.114:1811/Oc4jDcmServletAPI/ ias_admin **** redeploy /u01/app/oracle/product/10.1.0/oraMid_904 C:\work\oracle\MyProject\MyPortlet\deploy\hotseat.ear hotseat
    Initializing log
    Servlet interface for OC4J DCM commands
    Command timeout defined at 600 seconds
    Executing DCM command...
    Executing command redeploy /u01/app/oracle/product/10.1.0/oraMid_904 C:\work\oracle\MyProject\MyPortlet\deploy\hotseat.ear hotseat UNDEFINED
    Command = REDEPLOY
    Reading application's ear file
    Ear file was successfully read
    Opening connection to Oc4jDcmServlet
    Setting userName to ias_admin
    Sending command to DCM servlet
    HTTP response code = 200, HTTP response msg = OK
    Command was successfully sent to Oc4jDcmServlet
    Receiving session id from servlet to check command status
    Session id = c253297271317c3f930003c405ea91ff598582f0be0
    Please, wait for command to finish...
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has not finished yet
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c253297271317c3f930003c405ea91ff598582f0be0
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has finished
    Receiving command exit value
    Receiving command output
    **** No output was received from command
    Closing connection to Oc4jDcmServlet
    DCM command completed successfully.
    Output:
    Exit status of DCM servlet client: 0
    Elapsed time for deployment: 1 minute, 45 seconds
    ---- Deployment finished. ---- 22-Mar-2005 14:13:12
    My question is, HOW DO I ACCESS the deployed application, since it didn't specify the URL where it's deployed????
    Many thanks
    P/S
    I have tried:
    http://{myserver}:8888/{my-portlet}/portlets?WSDL but that doesn't work

    Hi FormsEleven,
    When you say you can do this or you have done for demo then considering following directory structure if I have two forms having common form names how it will be resolved?
    Or how the url to access these forms will be?
    As shown in the following structure consider we have Form1 in sub directory1 as well as in sub-directory2 then how the link to access these forms will be?
    - Hosting Directory (formsweb.cfg entry)
      - Sub Directory1
          - Form1
          - Form2 
      - Sub Directory2
          - Form1
          - Form4
      - Sub Directory3
          - Form5
          - Form6

  • Passing value to a dynamic page from a pdk-java portlet

    Hi everyone.
    I'm quite new to portlets, so I'll try to present my problem as well as I can:
    I have a PDK-java portlet in which I read some information (like name, location) about user.It works ok.Now I want to use that infomation in another portlet, which is build as a Dynamic Page ( with portletbuilder). How can I do this? I was thinck at session variables, but....
    Thanks a lot

    have you ever got any response??
    i'm facing the same problem.
    thanks

  • Java Portlets not able to read portlet.xml

    while invoking java portlets context fails to read portlet.xml , any idea
    I am having weblogic 8.1 sp2

    Is the file valid (per the schema)? What kind of exception/error are you
    getting?
    Subbu
    said the following on 02/25/2004 12:47 PM:
    while invoking java portlets context fails to read portlet.xml , any idea
    I am having weblogic 8.1 sp2

  • How to retrieve which user-agent in a java portlet?

    Is there a way to get http user-agent info about which browser requested a page with a portlet from within the java portlet?
    It seems like the request.getHeader() always returns the same value no matter what browser we use.
    Have also tried portletRenderRequest.getOriginalHeader() but this method also returns the same result.
    Does the PPE replace these headers or what..?
    Regards,
    Per A Jorgensen

    Hi Per A Jorgensen,
    I see what you mean. I just deployed a simple portlet which displays the user-agent header property.
    Here are my observations:
    1. If you access the page as user1 from Mozilla, I see the following:
    Browser Agent:      Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    2. If I now access this page from IE, as user1, then I still see my browser agent as:
    Browser Agent:      Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    3. If I now access this page from IE, as user2, then i see the following details:
    Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    4. Now I access the same page from Mozilla (after logging out of user1) as user2, I see the following:
    Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    Hmm.. interesting.. it looks like, whoever access the provider first, fixes the user-agent. I need to investigate more into it to find out information as to why this is happening.
    In the mean-time, you can be rest assured that as long as you dont have multiple user's accessing the portlet as the same user, you will get the correct information.
    thanks,
    Harsha

  • Passing Parameters between Java Portlets

    i hava java portlet and it does a search... the search result appears within the portlet region.... but i want to be able to click on the search button and take it to another portal page and have a portlet that contains the result of the porltet... how is that acheivable...

    Well i've done this with java pdk portlets, but I guess the principle is the same everywhere.
    Where are 2 types of parameters, qualified and unqualified ones. In your case you have to
    use unqualified ones, so that your other portlet can read a parameter which is set by your search portlet.
    Also add <passAllUrlParams>true</passAllUrlParams> to your provider.xml, inside a portlet tagof the result portlet, so yo are able to read unqualified params aswell.
    Othee options are using sessions or a persistant datastore, eg database

Maybe you are looking for