Java Portlet - Passing control to object outside renderBody

Is there a problem passing control outside renderBody in a Java Servlet portlet.
I get an error using the below, the portlet just stops. Its fine when I put the code inside renderBody:
public class ObtainMap extends BaseManagedRenderer {
public void renderBody(PortletRenderRequest pr) throws PortletException {
pProcessMapRequest pPMR = new pProcessMapRequest();
//Pass in the portal renderer
pPMR.pr = pr;
//call the main function
pPMR.pProcessRequest();
class pProcessMapRequest extends Object{
Thanks...
etc

Does the log say which class can not be found?
How have you added the pProcessMapRequest class to the CLASSPATH?

Similar Messages

  • Is it possible in java to pass reference of object in Java?

    Hello,
    I'm relativily new to Java but I have "solid" knowledge in C+ and C# .NET+.
    Is it possible in java to pass reference of object in Java? I read some articles about weakreferences, softreferences, etc. but it seems that it's not what I'm looking for.
    Here is a little piece of code I wrote:
    package Software;
    import java.util.Random;
    * @author Rodrigue
    public class RandomText
        private Random rand = new Random();
        private Thread t;
        private String rText = "Rodrigue";
        public RandomText()
            t = new Thread()
                @Override
                public void run()
                    try
                        while(true)
                            UpdateText();
                            sleep(100);
                    catch(InterruptedException ex)
            t.start();
        private void UpdateText()
            int i = rand.nextInt();
            synchronized (rText)
                rText = String.valueOf(i);
        public String GetText()
            return rText;
    }It's just a class which start a thread. This class updates a text with a random integer 10 times per second.
    I would like to get a reference on the String rText (like in C++ ;) yes I know, I must think in Java :D). So, like that, I could get one time the reference, thanks to the GetText function, and update the text when my application will repaint. Otherwise, I always have to call the GetText method ... which is slow, no?
    Are objects passed by reference in java? Or, my string is duplicated each time?
    Thank you very much in advance!
    Rodrigue

    disturbedRod wrote:
    Ok, "Everything in Java is passed by value. Objects, however, are never passed at all.". Reference of object is passed by value too.
    But, how to solve my problem in Java_? I have an object which is continually modified in a thread. From an another side, this object is continually repainted in a form.I'm not sure I totally understand your problem. If you pass a reference to an object, then both the caller and the method point to the same object. Changing the internal state of the object (e.g. by calling a setter method) through one reference will be observed through both references, since they both point to the same object.
    No, calling a method is not particularly slow. Especially if it's just a simple getter method that returns the value of a member variable.
    If this is happening in a multithreaded context, you'll have to use proper synchronization to ensure that each thread sees the others' changes.

  • 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

  • URGENT:How to pass parameter to page from java portlet

    Hi,
    All i need to do is to pass a parameter from my custom java portlet to an omniportlet. Is it achievable? If so, please point me direction!
    Thanks,
    Ceren

    Hmm yeah or else you could use java.net.URLEncoder.encode(String s) to encode it automatically.
    (java.net.URLDecoder.decode(String s) decodes btw)

  • PDK-Java Security manager: controlling portlet appearance in portlet list

    Hi,
    The Understanding PDK-Java Portlet Security article says: "Portlet security is handled at two main points in Oracle9iAS Portal. It is used when a user view the list of portlets available from a provider. It is also used when rendering the portlet on a portal page."
    I don't see how a portlet can control its appearance in the list of available portlets. Is the article inaccurate, or am I overlooking something?
    Thanks,
    Peter

    The article is correct.
    Before showing a portlet in the portlet repository, the provider is contacted by the portal to determine if the current user should be able to see the portlet. This is the isRunnable call.
    In release 3.0.9, a feature was added allowing a provider to instruct the portal to cache the results of this call. There are 2 portlet properties associated with this feature:
    <portlet>
    <callIsRunnable>true/false</callIsRunnable>
    <callGetPortlet>true/false</callGetPortlet>
    </portlet>
    The second property affects whether a call to get a portlet's metadata is made before displaying it in the portlet repository.

  • How can java control window object?

    Client side controlling like window.open(), window.close() and window.opener.reload() make me headacid. I have java class to handle controlling. Is there any way java can control window object. like closing/openning popup window?
    Thanks.

    that looks like Javascript not Java
    Java has possibilities to manipulate windows but in the JSP context all that manipulating is nonsense because JSP run at server.

  • 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

  • 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

  • Set and read page parameter using a java portlet

    I created a portlet that takes a parameter. I wantt his parameter to be set by the admin in the page parameter section. The portlet that I crated has a parameter. In the providers it has the following:
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>param</name>
    <displayName>displayParam</displayName>
    </inputParameter>
    However, when I go to the page propertie/parameter, I can "bind" a parameter. How can I do that?
    Thanks,
    Marcelo

    Marcelo,
    This was what I've given you above...
    From 7.1.3 Passing Parameters and Submitting Events jump to Section 2.12, "Public Portlet Parameters Support".
    Public portlet parameters:
    You can use a public portlet parameter to pass a value to a portlet. Using portlet parameters, the information that is displayed in a portlet can be specific to a particular page or a user. Portlet parameters are created by the portlet developer and are exposed to the page designer, through the user interface. After adding a portlet to a page, page designers can assign values to the public portlet parameters to make the information displayed in the portlet specific to the page.
    Page designers can assign values to public portlet parameters by providing a specific value (constant), a system variable (for example, the portal user name), or a page parameter. At run time, the portlet receives the values from the sources specified. In this way, page designers have complete control over the source of the parameter, whereas you have complete control over how the data is used after it is transmitted to the portlet.
    ...and in 7.1.3 Passing Parameters and Submitting Events as assumption is "You have followed through and understood Section 6.3.2, "Building PDK-Java Portlets".
    This why I've said to read it carefully... I hope this helps you further...
    Cheers,
    Pedro.

  • Getting error while passing implicit request object from JSP to JavaBean

    Hi,
    I am getting error while passing implicit object ie( request object)
    from within JSP to JavaBean.
    Following is source for JSP, JavaBean and Error message I am getting.
    vaLookup.jsp Source
    <jsp:useBean id="db" class="advisorinsight.javabeans.DisplayPages"
    scope="request">
    <jsp:setProperty name="db" property="request" value="<%= request %>"
    />
    </jsp:useBean>
    <jsp:getProperty name="db" property="totalrecords" />
    JAVABEAN DisplayPages.java source
    package javabeans;
    import java.io.Serializable;
    import javax.servlet.http.HttpServletRequest;
    public final class DisplayPages implements Serializable {
    private String totalrecords;
    private HttpServletRequest request;
    public void setRequest(HttpServletRequest req){
    this.request = req;
    public java.lang.String getTotalrecords()
    this.totalrecords =
    this.request.getParameter("totalrecords");
    return this.totalrecords;
    public DisplayPages(){
    totalrecords = "";
    request = null;
    error after executing vaLookup.jsp
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service JavaExtData successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service LockManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service RLOPManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:7] info: ENGINE-ready: ready: 10819
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:46:0] info: JSPRunnerSticky: init
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:51:7] error: Exception: SERVLET-compile_failed:
    Failed in compiling template: /va/valookup.jsp, javac error:
    c:\iplanet\ias6\ias\APPS\variabl
    S\va\valookup.java:76: Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    Exception Stack Trace:
    java.lang.Exception: javac error:
    c:\iplanet\ias6\ias\APPS\variableannuity\va\WEB-INF\compiled_jsp\jsp\APPS\va\valookup.java:76:
    Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJspCompiler(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
    Source)
    at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown
    Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)

    The only thing that I see that looks funny to me is when you pass the request object into the method using <%=request%>, Im not sure whats going to happen here because that is suppose to print the results. Have you tried simply using <%request%>?

  • How to pass a locale object into another function?

    Greetings,
    i like to pass a locale object into another function. These are my code below
    import java.util.*;
    public class Locales{
         public static void main(String[] args){
              Locale locale= new Locale("EN", "US");
              convert(locale);
    public void convert(Locale convert)
         String language = convert.getDisplayLanguage();
         System.out.println(language);          
    }I got this error:
    Locales.java:6: non-static method convert(java.util.Locale) cannot be referenced from a static content
                    convert(locale);
                    ^How do i correct it?
    Thanks

    Did you bother to do a search?
    Did you bother to read any of the material that the search would have linked you to?
    If you had then you would be able to understand where you are going wrong and how to fix it yourself. Instead of being spoonfed by us.

  • Passing a Vector object as a parameter to a method

    Hi,
    How can I pass a Vector object as a parameter to a method?
      void buttonAdd_actionPerformed(ActionEvent e) {
        Vector studentHobbies = new Vector();
          String[] items = listHobbies.getSelectedItems();
          for (int i=0; i<items.length; i++) {
            studentHobbies.addElement(items);
    newStudent = new Student(Name,StudentNumber,studentHobbies);
    studentenlist.addTo(newStudent);
    So I want to pass the Vector object 'studentHobbies'  to a method.
    Would I do something like this :import java.util.Vector;
    public Student(String Name, int StudentenNumber, Vector studentHobbies){
    this.Name = Name;
    this.StudentNumber = StudentNumber;
    this.studentHobbies = StudentenHobbies;

    yes, thats how you do it.
    maybe you should first try your idea and then ask people questions?
    also, use ArrayList instead of Vector, its better - google as to why if you care.

  • How to pass arraylist of object from action class to jsp and display in jsp

    I need to do the following using struts
    I have input jsp, action class and action form associated to that. In the action class I will generate the sql based on the input from jsp page/action form, create a result set. The result set is stored as java objects in a ArrayList object.
    Now I need to pass the arraylist object to another jsp to display. Can I put the ArrayList object in the request object and pass to the success page defined for the action? If this approach is not apprpriate, please let me know correct approach.
    if this method is okay, how can I access the objects from arraylist in jsp and display their property in jsp. This java object is a java bean ( getter and setter methods on it).
    ( need jsp code)
    Can I do like this:
    <% ArrayList objList = (ArrayList)request.getattribute("lookupdata"): %> in jsp
    (***I have done request.setattribute("lookupdata", arraylistobj); in action class. ***)
    Assuming the java object has two properties, can I do the following
    <% for (iint i=0. i<objList.size;I++){ %>
    <td> what should i do here to get the first property of the object </td>
    <td> what should i do here to get the first property of the object </td>
    <% }
    %>
    if this approach is not proper, how can I pass the list of objects and parse in jsp?
    I am not sure what will be the name of the object. I can find out how many are there but i am not sure I can find out the name
    thanks a lot

    Double post:
    http://forum.java.sun.com/thread.jspa?threadID=5233144&tstart=0

  • Passing a Flex object to CFC

    I have no problem passing a query object to my Flex app and
    use it to populate a datagrid (arraycollection).... however, I want
    to use this same data to update the database when the user clicks
    on save, and instead of looping through each row (calling my
    remoteobject each time) is there a way I can format this
    information into an array, array collection or some other form of
    flex object and pass ti back to another cfc function to do the
    update?????
    I've read elsewhere that its possible to do with a
    remoteobject, however, my attempts were futile and I cannot find an
    example anywhere.
    I cant find a solution anywhere so and help would be
    appreciated.

    Here is a simple example I just wrote real quick. This is how
    I normally go about passing something an array of items to
    Coldfusion. Hope this helps.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.managers.CursorManager;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    [Bindable] private var apples:Array = new Array(
    {name:"Normal Apple", color:"Red"},
    {name:"Sweet Apple", color:"Ged"},
    {name:"Rotten Apple", color:"Brown"});
    private function createApples():void {
    AppleManager.Create_Apples(apples);
    private function createApplesResult(event:ResultEvent):void
    Alert.show("You have successfully added some apples into our
    system.", "System Notice");
    ]]>
    </mx:Script>
    <mx:RemoteObject
    id="AppleManager"
    destination="ColdFusion"
    source="cfc.AppleManager"
    endpoint="Your endpoint here"
    showBusyCursor="true"
    fault="CursorManager.removeBusyCursor();Alert.show(event.fault.message,
    'System Notice')">
    <mx:method name="Create_Apples"
    result="createApplesResult(event)"/>
    </mx:RemoteObject>
    <mx:Button x="10" y="10" label="Create Apples"
    click="createApples()"/>
    <mx:DataGrid left="10" right="10" top="40" bottom="10"
    dataProvider="{apples}">
    <mx:columns>
    <mx:DataGridColumn headerText="Apple Name"
    dataField="name"/>
    <mx:DataGridColumn headerText="Apple Color"
    dataField="color"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • 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

Maybe you are looking for

  • Polymorphic VI editor bug

    When you add a VI to a polymorphic VI, the highlighted VI in the "Instance VIs" is not the one you just added (unless the polymorphic VI has only one instance VI).  To recreate issue: create a polymorphic VI, add two instance VIs to it, now add a thi

  • Does the DV8T support 6Gb's sata drives?

    I am curious about this model since I was considering buying one if it supports the new 6Gb sata drives. Thanks!

  • XMLAGG - Problem using Order By (version 10.1.0.2.0)

    Hi. Below is a function I am having a problem compiling when I include the order by parameter on the XMLAGG. If I remove the order by, it compiles fine. I can run the Select statement in SQL Plus (without it being a part of the function) and it works

  • Wireless network unstable/broken N500

    My WiFi is really messed up, It works for about 20 minutes after a fresh reboot but then it goes down and is seen as inaktive and it can´t be aktivated by either the fysical button or any windows/lenovo function in the OS. I've installed the latested

  • How do I install...

    Just purchased Topaz Clearview software, how do I install it's Plug-in to Lightroom Plug-in Manager, please help..?? Also when, exported file from Lightroom dng to Photoshop CS 2, I am getting 240 dpi resolution , despite in Lightroom Preferences> I