Calling a method in AbstractPortalComponent from JSP without htmlb

Hi,
I am trying to trigger an event in a java method in an AbstractPortalComponent from a jsp.
The event is caught in method doContent:
IPageContext myContext = PageContextFactory.createPageContext(request, response);
Event lastEvent = myContext.getCurrentEvent();
if ((lastEvent != null) && (lastEvent.getComponentName().equals("Compute"))) {
  response.write("Compute");
The problem is that I cannot trigger it from my jsp. In the jsp is used:
<%
IPortalComponentURI uri = componentRequest.createPortalComponentURI();
uri.setPortalRequestEvent(componentRequest.createRequestEvent("Compute"));
String linkEvent = uri.toString();
%>
and
<.a href="<%=linkEvent%>">click</a.>     
(i put some dots because otherwise the editor sees it as html)
Please help.
Raymond

Hi Praveen,
It still does not work. presentEvent is null.
In line: if (null != event && "Compute".equalsIgnoreCase(presentEvent.getAction())) you wrote "event" Shouldn't that be presentEvent. I changed it to presentEvent.
I think the problem is in the jsp. It seems to me that the jsp is not sending a correct event.
Please keep in mind that I am not using htmlb in my jsp.
Raymond

Similar Messages

  • Calling a method in AbstractPortalComponent from JSP

    Hi,
    I have an abstract portal component with 2 methods:
    1. doContent - in this, I specify the name of the jsp to be included in the response - umlogonPage, and am setting a portal event named 'fireCRMRFC'.
    2. dofireCRMRFC - in this, I specify the code to connect to the backend crm and get back some value.
    In my umLogonPage.jsp, how can I trigger the method 'doFireCRMRFC'? Is it possible at all?
    Thanks
    OJ

    Hi Praveen
    I understand you partially...I have implemented this:
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
              IResource jspResource = request.getResource("jsp", "/umLogonPage.jsp");
              response.include(request, jspResource);
              IPortalComponentURI rfcURI = request.createPortalComponentURI();
              rfcURI.setPortalRequestEvent(request.createRequestEvent("fireCRMRFC"));
    and
    public void dofireCRMRFC(IPortalComponentRequest portalReq, IEvent event){
    <Connectivity code to backend.>
    And I read in another thread and help site that I can raise an event from the jsp to this method (maybe through the doCOntent), but it said this is possible. Can you give me an example of a code that I would have to use in my jsp?
    I am trying to understand how this works so I really appreciate your willingness to help.
    Thanks
    oj

  • Calling a Method in Bean from JSP

    Is there a defined jsp tag for calling a method in a Bean? Right now, in a bean named "bean", I would use: <% bean.doSomething(); %>. Is there a tag for this?

    I've wondered this too, the getProperty and setProperty tags only allow you call setters and getters. What if you've got a method called doSomething()?

  • Anyone know the way to call SQLLoader utility or similar from JSP/Servlet?

    Anyone know the way to call SQLLoader utility or similar from JSP or Servlet?
    i would like to make a big data load from web interface, using SQL Loader or similar, because this utility allows a great performance.
    I think that i can make a JSP or Servlet to open file, and create insert statement into a loop, but the performance is very bad for 30000 inpuits.
    Help me please
    Thanks
    Note: my english is very bad. Sorry.

    Hi there,
    I tried this codes into a Bean like this:
    package com.tuxedo.beans;
    import java.io.*;
    public class TuxTest
         public void RunTest()
              try{
                   Runtime rt = Runtime.getRuntime();
                   Process pr = rt.exec("command /k c:\test.bat");
              } catch (IOException e) {
                   System.err.println("Error: " + e.getMessage());
    }and call it with a JSP like this:
    <html>
    <head><title>Tuxedo Test</title></head>
    <body>
    To run a test on local batch file
    <jsp:useBean id="test1 " class="com.tuxedo.beans.TuxTest"/>
    <jsp: RunTest name="test1"/>
    </body>
    </html>i had created folder %tomcat%\webapps\ROOT\WEB-INF\classes\com\tuxedo\beans to store the bean.
    Yet the JSP file executed, but i dun see any response by calling the batch file, anyone have any idea?
    the batch file is like this:
    @echo off
    echo
    echo Hello World!
    echo
    pausePlease help!

  • How to call a class file in a jsp without deploying anything in j2ee

    Hi,
    I am new in J2EE. I have some jsps, which I configured using web.properties(documentroot=c:/jsp/). I am able to get
    those pages by the web browser. I have some import statements in some jsps, now I
    am trying to access those page but it is failing, it says
    org.apache.jasper.JasperException: Unable to compile class for
    JSPD:\j2sdkee1.3\repository\pradip\web\_0002fLogin_0002ejspLogin_jsp_0.java:1:
    Class com.gui.UPMGuiGlobalConstants not found in import.
    import com.gui.UPMGuiGlobalConstants;
    Actually I have not deployed any class file or jsps.. Now my question is can I access
    these jsps without deploying anything, like can I put my .jar file in any j2ee
    directory(like lib or anywhere else, I already tried after putting in /lib) and restart the
    j2ee and use it. So how can I call a class file from a jsp without any kind of
    deployment?
    Please send me the reply as soon as possible.
    Regds,
    Pradip

    After you put the jar containing the class to import into the WEB-INF/lib directory, you still need to include it in the jsp.
    Putting the jar into the lib dir, will make it available to the vm, but as in any other java class, you still need to import it into the class, that the jsp will be compiled into.
    And you do that by putting
    <%@page import="com.gui.UPMGuiGlobalConstants" %>somewhere near the top of your jsp. (well you don't need to put it there, but it good style ;)
    That should do it.

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • Calling a method in Class from webdynpro

    Hi All,
    I have to perform some action when i click the button created in my webdynpro screen.
    However I must not write the code for the button action inside the button event. But I have to create a class and inside the class i have to create the method for this button event.
    Can anyone tell me how to call a method in a class created in SE24 from webdynpro on clicking the button.
    Thanks in advance.

    hi..
    When you want to perform some action after clicking a Button, then you have to write the code only in 'Events' - 'On Action' event. From your question, i assume that, you wanna use Assistance class in your webdynpro so as to increase better performance. Here is the link which will guide yuo with screen shot for using assistance class in WD-ABAP.
    http://wiki.sdn.sap.com/wiki/display/WDABAP/AssistanceclassfunctionalityinWDA
    thanks,
    Padma

  • Calling a method in view from component controller?

    Hi,
    Is it posible to call a method that is defined in the Component Controller in the View?
    If it is posible please give some sample code how to call the method?
    Regards,
    Padmalatha.K

    Padmalatha, all the methods defined in a controller from 'Methods' tab are instance methods. An instance method defined in a component controller is callable from any view controller that holds a reference to the component controller.
    Defining methods between the tags
    //@@begin others
    //@@end
    is useful if you want to declare static methods.

  • How to call a method in bean from application module Impl?

    i have to call a method which is in a bean from AppmoduleImpl class. Is it possible ?

    The model layer should never depend on a specific view layer - this breaks reusability.
    What you need to do is expose a service method on your AM. Then your view can call this method and pass a parameter into the model layer.

  • How to call a method in Viewimpl from transient attributes value

    Hai,
    I have a method in ViewImpl say validate().I need to call this method from an transient attributes value where value type is expression.i used adf.object.validate() but its not working.
    Can any one help me
    Thanks in advance

    Hai,
    Jabr i read these in a pdf where it explains about Introduction to Groovy support in JDeveloper and Oracle ADF 11g
    Referencing custom methods in the EntityImpl class
    If you have defined a method in your EntityImpl class, then this can be called as part of your
    expression for an attribute default:
    adf.object.getDefaultSalaryForGrade()
    Unlike when referencing an attribute of the entity object, which can be done by simply
    referencing the attribute name, when referencing a method, you are required to prefix the
    method name with adf.object.
    So is there a way?
    regards

  • Calling PL/SQL stored procedure from JSP tag

    Hello,
    I need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    Thank you
    Syed

    need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    regards
    Indira Rani Bandi

  • Is it possible to call the SQL Server DB from jsp to java?

    im doing a configurable system where you can create your own table using the system. i can do the creation of table by running the statement CREATE TABLE...........(with attributes) in java.
    Let's say i have created tblST1 with attributes st_ID, st_Name, st_Description.
    My problem is i dont know if it's possible to retrieve all the attributes from jsp to java.

    jverd: i need your help. Iv read all the links u posted but im having a hard time in understanding them.
    For the site http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html , there's a code there which is...
    ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    boolean b = rsmd.isSearchable(1);
    what i did was, i inserted it in my java code which is :
    public boolean checkFieldTable2()
              boolean checked = false;
              try
                   IRMS_DBConnect db = new IRMS_DBConnect();
                   db.openCon();
                   ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
              ResultSetMetaData rsmd = rs.getMetaData();
              int numberOfColumns = rsmd.getColumnCount();
              boolean b = rsmd.isSearchable(1);
                   db.closeCon();
                   checked = true;
              catch (Exception ex)
                   System.out.println("Error on Execution: " + ex);
              return checked;
    and i compiled it and there was an error that the variable stmt was not initialized. Am i doing the right way?
    Can anyone help me pls? pls pls pls

  • How to call class file from jsp without creating packages

    i m using tomcat 5.5
    i stored my class file into WEB-INF\Class directory
    how to call that class file. from my jsp page.
    i got some error.
    i used package concept,that works fine.

    i m using tomcat 5.5
    i stored my class file into WEB-INF\Class directory
    how to call that class file. from my jsp page.
    i got some error.
    i used package concept,that works fine.Then use packages.
    As of Java1.4, you can no longer import classes from the default package (no package declared) into classes that are packaged.
    All Tomcat classes are in packages, including the compiled JSP.
    Therefore: Your classes need to be in a package inorder to be imported and used by the JSP.
    Why the problem? If you know it works with packages, why try not to use them?

  • Error when I call a method of AppModule from a backing bean.

    I use Jdeveloper 10.1.3.0.3 EA.
    In my application I have created ApplModule and UsrView(for my table USR).
    I have a login page (login.jsp and the backing login.java) with 2 fields userName and password and an ADF Faces Core command button (cmdCheckPass) and the method cmdCheckPass _action() for the click event .
    The problem is that I can’t call method testPassword(userName, password) which is written in AppModule. (I get error:
    javax.faces.FacesException: #{backing_login.cmdCheckPass_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException) from line:
    answer = app.testPass(st1,st2);
    The code is as follows:
    public String cmdCheckPass_action() {
    String answer="";
    String mes = "";
    String st1=this.getInputText1().getValue().toString();
    String st2=this.getInputText2().getValue().toString();
    AppModuleImpl app = new AppModuleImpl();
    answer = app.testPass(st1,st2);
    if (answer == "OK") {
    return "toMain";
    } else {
    answer = "";
    mes="Invalid username, password !!!";
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(mes));
    return answer;}
    I don’t know if theoretically is right to call, from a backing bean, a custom method of AppModule.
    Can I have any help on this?
    Thanks in advance,
    Panos

    Some quick ideas:
    Is the clip the same NTSC/PAL standard as the project you are importing it to?
    Have you tried to rename the offending clip (do NOT rename any clips inside the iMovie /Media folder!!).
    How much free space do you have on the iMovie project volume -- what is the size of the imported clip?

  • Import a servlet from JSP without the use of a .JAR

    Migrating web app from NT / iPlanet 4.1 to Solaris / iPlanet 4.1.
    I've created a Web app in which JSPs utilize Servlets stored in a JAR file. I am now moving the app to a server that I do not control. I wish to configure the app in such a way that I will be able to modify the servlets and not have to restart the Web server to see the changes. I assume the only way to do this is to remove them from the JAR file.
    I'm familiar with how to package servlets in JAR files and use them in JSPs, but can't figure out how to import (my own) servlets from outside the JAR file. Is there any way to do this without specifying the servlet in the CLASSPATH?
    ...sorry if it's a stupid question, I'm not a Java programmer. Thanks in advance. Please let me know if I have not given enough detail.

    I've created a Web app in which JSPs utilize Servlets
    stored in a JAR file. I am now moving the app to a
    server that I do not control. I wish to configure the
    app in such a way that I will be able to modify the
    servlets and not have to restart the Web server to see
    the changes. I assume the only way to do this is to
    remove them from the JAR file.Bad assumption! This will have no impact on reloading the servlets!
    What you are asking for is called 'hot deployment'. Not all servers do that.
    Tomcat 4 does for instance, but you have to configure it for your specific webapp to be able to use it.
    Hot deployment just reloads all the classes in its classpath, it doesn't matter if they're in jars or just .class

Maybe you are looking for

  • PS...Collective PR indicator Functionality

    Hi, I am using collective PR functionality in projects. When I upload the material from external Excel sheet and transfer the BOM, single PR is getting created in the system, however the item nos in PR are not identical with the sr. nos. given in exc

  • Insert row using db_link

    Hi All, I am trying to insert data from one DB to another DB via db_link between them. insert into table@xyz select col 1, col2 , ... coln from table wher id = 123; the error is : ORA-02019: connection description for remote database not found But i

  • I've downloaded a book from i-tunes. How do I open it?

    Im new to itunes. I registered with a payment form and downloaded a book. It says it is downloaded. How do I open it?

  • Responsive videos will not work

    In Captivate 8 I have inserted two video files both mp4 format.  It is a responsive format and the videos will not load on iPad.  What am I doing wrong????

  • Adding an entity with a COA that is not compatible with the existing one

    Hi guys, I'm facing quite a challenge right now. I'm working in a client who sells car, so they have several stores that consolidate in one parent. The current application has more than 5000 accounts (BS and P&L). They also have a bank who was left o