How to call a jsp page from oaf and run in jDeveloper

Hi all,
I created sample jsp and then tried.
String temp = "sample.jsp?";
pageContext.setForwardURL(temp,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
It worked.
But when i tried with one of the custom page that i downloaded from server it is giving error.
But now i need to call that page.
Its Code is given on below link:
Re: how to call a jsp page from oaf
Please help me to do this.
Thanks in advance.
Regards,
Raj

Raj,
1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
(i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
4. There is no problem in the way you are calling jsp page from OAF page.
regards,
Anand

Similar Messages

  • How to call a JSP page from Applications menu?

    Hi partners,
    I am still looking for "how to call a JSP page from Applications menu?", I mean instead of calling a form, I want to call a JSP page which is staying in a OC4J repository which is located in another server.
    Any idea will be really appreciated.
    Thanks in advance.
    Frank Mtz.

    Hi Frank,
    if u know the solution please share it with me. i'm looking for the same scenario.
    thanks in advance,
    anish

  • How to open a JSP page from a form ??? plz help

    hi ..
    i want to know how to open a jsp page from a oracle apps form using a button .
    the requirement is that whenever we click on the button created on the form, it opens a jsp page.
    plz help me ..its urgent !! :-(

    In portlet project, to navigate between pages, you should not use the URL property to link to a page. Instead, portlets use navigation via action handling. You use the Page Navigation editor to set up links to pages; that is, the navigation editor sets the action property.
    Here is an example to hyperlink ans button to open a new page:
    # From within the IDE, create a new portlet project. This action creates the project and one page, PortletPage1.jsp.
    # Create a second portlet page, called PortletPage2.jsp, for the project.
    # Drop a Hyperlink component onto the first portlet page, PortletPage1. (You can drop the Hyperlink on the page in the Design window or on the PortletPage1 node in the Outline window.) Change the Hyperlink's text property to Next Page.
    # Drop a Button component (found in the Basic section of the Palette) onto the second portlet page, PortletPage2.
    # Open the Page Navigation Editor. It displays the two pages (PortletPage1.jsp and PortletPage2.jsp) of the application.
    # Click the PortletPage1.jsp icon in the Navigation window to expand it, and then drag a connector from hyperlink1 to PortletPage2.jsp. Change the name of the connector from case1 to Page2.
    # Click the PortletPage2.jsp icon in the Navigation window to expand it, and then drag a connector from button1 to PortletPage1.jsp. Change the name of the connector from case1 to Page1.
    # Run and deploy the portlet. The browser displays PortletPage1 and you should see the Next Page hyperlink. When you click the Next Page hyperlink, the Apache Pluto Portal server displays PortletPage2. Click the Page2 button to return to PortletPage1.
    Sherry
    Creator Team

  • How to invoke a jsp page from java which does not use Servlets?

    Hello,
    I am working in Documentum. I am trying to invoke a jsp page from another java page which does not use Servlets.
    I tried doing this by just instantiating the java class related to the jsp page from my present java class.In my java class related to the jsp page, I have defined onInit() and onRender() methods.
    Now, I am trying to call the jsp page from my present java class by just instantiating the java class related to the jsp page. This throws a java.lang.NullPointerException.
    Any comments or suggestions on this.Any help would be appreciated.
    Thanks,
    Ranjith M.V

    RanjithM.V wrote:
    Hello,
    Thanks for the reply. One important thing I forgot to mention. I am also using xml component.And?
    As this is the standard way used for coding in Documentum, I do not want to use Beans.Well, JSP's should, in and of themselves, contain no functional code. It should all be only display.
    Without that is it not possible?What did I say? I said,
    masijade wrote:
    It is possible, but I very, very, very, much doubt, that it would be worth the effort.And, if you don't know how, a forum is not truely going to be able to help you implement it (at least not in less than a few years time, at which point it would be outdated).
    >
    Appreciate your understanding and help.
    Thanks,
    Ranjith M.V

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to call an HTML page from a JSP

    Hi,
    I am getting problem in calling an html page from a jsp
    The Sample code is
    int rowsAffected = stm.executeQuery("Select * From Table");
    if (rowsAffected == 1)
    {   %>
    <jsp:forward page="xyz.html" />
    <%

    See the other forum where you asked the same question http://forums.java.sun.com/thread.jsp?forum=45&thread=158981
    Please refrain from cross posting.

  • How to call a Request Set from OAF

    How we can call a Request set from OAF page .

    Hi Sumit ,
    Thanx for your responce.
    I tried to call the below code in OAF AM method but i am getting error as : Invalid Column Type.
    Please help me on this.
    IS i am doing it in right way or not?
    public void handleLaunchReconProg()
    String sqlStatement = "BEGIN :1 := FND_SUBMIT.SET_REQUEST_SET (:2,:3); END;";
    OADBTransaction txn = (OADBTransaction)getDBTransaction();
    CallableStatement cStmt = txn.createCallableStatement(sqlStatement,1);
    try
    cStmt.registerOutParameter(1, Types.BOOLEAN);
    cStmt.setString(2,"XXDIS");
    cStmt.setString(3,"XXDIS_RECON_SUPP_BKLG");
    cStmt.execute();
    catch (Exception e)
    throw OAException.wrapperException(e);
    finally
    try
    cStmt.close();
    catch (Exception e)
    throw OAException.wrapperException(e);
    }

  • How to call OA Framework Page from Oracle Forms?

    Hi,
    I have read the OA Guide on "Forms / OA Framework Page Integration" which guide on how to launch OA framework pages from Oracel Applications Forms.
    I would like to perform the same whereby to call the OAF page from Oracle Form itself. However I do not quite understand on the below section:
    To make use of the Oracle Application API - fnd_function.execute.
    Where should I use this function? Should I create a button triggered to link to OA Page?
    Appreciate advise on this.
    Thanks and Regards,
    Shiau Chin

    Hi Ashok,
    You can refer the topic Forms / OA Framework Page Integration in Developers Guide.
    There you can find details about the below :
    Launching Oracle Applications Forms from OA Framework Pages
    Launching OA Framework Pages from Oracle Applications Forms
    Thanks
    Jegan

  • How to Open another jsp page from jsp page

    Hi,
    I am new to JSP. I need help to handle issue given below:
    I have created one JSP Page for Login which contains Username and Password with a Submit Button. Once user inputs UserName and Password and Press Submit Button, It calls another JSP Page "Validate_login"
    Validate_Login JSP does a JDBC call to Databse and validate User Name and Password. Now i want to open a "Employee.jsp" page if Username and Password matches with the one in database.
    Pls advice what function or tag should i use to open this page in If (condition) true section.. I tried Window.open but it return back with error.

    I tried with the function suggested by Doly. But nothing is happening. It doesn't redirect to any page. only a blank page comes.
    here is complete code . pls correct me if i am wrong somewhere.
    this is code of Validate_Login.jsp page which is invoked when user press login button on login.jsp.
    my purpose is to validate username and password from database and redirect to employee.jsp if it is ok else back to login.jsp
    here is source of Validate_login.jsp
    =============================================================
    <%@ page language="java" import="java.sql.*" pageEncoding="ISO-8859-1"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Validate Login</title>
    </head>
    <body>
    <%
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    String viewPATH = "c:/MyData.mdb";
    String dsnPATH = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb); " +
    "DBQ="+viewPATH+"; " +
    "UserCommitSync=Yes; " +
    "Threads=3; " +
    "SafeTransactions=0; " +
    "PageTimeout=5; " +
    "MaxScanRows=8; " +
    "MaxBufferSize=2048; " +
    "DriverId=281; " +
    "DefaultDir=C:/ProgramFiles/CommonFiles/ODBC/DataSources";
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         conn = DriverManager.getConnection(dsnPATH, "", "");
         stmt = conn.createStatement();
    rs= stmt.executeQuery("SELECT * FROM Employee where emp_id='"+username+"'");
    while(rs.next())
    String pass = rs.getString("password");
    if (pass.equals(password))
    { response.sendRedirect("Employee.jsp");}
    else
    { response.sendRedirect("login.jsp");}
    catch(Exception e)
    e.printStackTrace();
    finally
         if(stmt!=null) stmt.close();
         if(conn!=null) conn.close();
    %>
    </body>
    </html>

  • Is it possible to call a JSP page from a badge reader ?

    Hi all,
    a customer of mine asked me something really special.
    He has a badge reader, so when a person pass its badge in the reader it must be triggered an event to call a JSP page.
    The JSP page must contain some personal data of the person who used the badge on the reader.
    Any idea ?
    Cheers.
    warx

    With Adobe Acrobat yes - but not with the free Adobe Reader.

  • HOW TO CALL A JSP METHOD FROM ANOTHER JSP

    Hi all, I have to JSP1 and JSP2 and i would like to call a method of JS1 from JSP2. Is that possible ??
    Example:
    JSP2 Code
    somewhere in the code ...
    String s = JSP1.getName();
    out.println("EL NOMBRE ES " +s );
    thanks in advance for your help

    No, it is not possible. Infact you cannot write your own methods in JSP. What ever you write in a jsp page is part of _jspService() method. Secondly how can you instantiate another class(generated by JSP), until or unless you know the name of the class that resulted from your JSP. Your JSP page is first converted into .java file which is stored in some package e.g.
    pagecompile.jsp._yourJSPfile.
    I couldnot understand why you need to invoke a method of another JSP in your JSP.
    Hope this helps

  • Calling a jsp page from an if statement??

    Hi I am going toexplain what I can do already first then explain what I want to do:
    1) I have an html page that has a form. This form requests a userId and password to be entered. Upon submission of this form a java servlet is called
    2) the java servlet checks the initial inputted values of the form. I check to enusre that the user did enter somthing in both fields. I also check to make sure that the user did not enter just spaces.
    3) I return a error message to the user if the input is invalid ( I do this through a series of if statements)
    What I want to happen: Instead of simply return an error message, I would like to jump out of the java if statement and into a jsp page (or another html form I havent decided yet)
    In this seperate page I would like to display the form again with the incorrect areas highlighted. I am just not sure how to transfer control from the if statement to the new jsp page.
    All help is appreciated!
    Thanks

    If you want to transfer control from servlet(.java file) to JSP file or servlet to servlet than use
    public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException
    if(..)
    res.sendRedirect("http://abc.com/foldername/page1.html");
    }else if(..){
    res.sendRedirect("http://abc.com/foldername/page2.jsp");
    }else if(..){
    res.sendRedirect("servlet3");
    }//end if
    }//end doPost

  • How to call a standard page from a custom BSP-iView by URL

    Dear readers,
    I have to implement a scenario as described in the guide "Administration of the Business Package for SAP CRM 4.0", chapter "Object Links in the Portal" scenario 1 and/or 2 (page 404).
    In my case, a custom iView-BSP lists certain business partners in a tree view as hyperlinks. Which URL do I have to use for these hyperlinks to call the "Accounts" page (within role Account Management (com.sap.pct.crm.AccountManager)) with the selected business partner.
    The guide informs that there exists among others a table CRMC_PRT_ROLE_MO where I can find the ID Page/Servie URL for each Role/CRM Object type/CRM Method.
    My question is if I can use this URL fragment within the URL I have to build, and if yes, how must I construct the full URL to call the account page? If now, which URL must I use to call the account page?
    thank you
    Andreas

    Hi Niladri,
    My requirement was calling the OAF page from standard form (menu), below are the steps that I followed,
    1) Get the OAF page function name
    2) Personalize the form, by calling the OAF page function
    a) Function Code: Give the OAF function code
    b) Parameter: Here pass the parameters
    example: ='contractLineId='||:OKS_LINES.ID
    Note: If you are calling from a custom form you can also try using fnd_function.execute to call the OAF page
    Thanks,
    Bharat

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • How to call pl/sql function from oaf

    Dear  Friends,
    I am trying to call a function from oaf page .but iam getting error like
    java.sql.SQLException: ORA-01861: literal does not match format string
    ORA-06512: at line 1
    THis is my function  ,,callable statement
    FUNCTION CAR_LOAN_VALIDATION(P_PERSON_ID IN NUMBER
                                    ,P_DEDUCTION_START_DATE IN DATE
                                    ,P_DEDUCTION_END_DATE IN DATE
                                    ,P_LOAN_VALUE IN NUMBER
       RETURN VARCHAR2
       IS
          l_message                 VARCHAR2(100);
          l_contract_type           VARCHAR2(50);
          l_loan_eligible_date      DATE;
          l_grade                   VARCHAR2(15);
          l_old_loan_end_date       DATE;
          l_max_loan_end_date       DATE;
          l_remaining_amount        NUMBER;
          l_eligible_amt            NUMBER;
       BEGIN
            BEGIN
                SELECT --papf.person_id,
                       (SELECT meaning
                          FROM hr_lookups
                         WHERE lookup_type = 'ADTC_CONTRACT_TYPE'
                           AND lookup_code = attribute3) contract_type,
                       ADD_MONTHS (papf.original_date_of_hire, 11) loan_eligible_date,
                       DECODE (paaf.ass_attribute2,
                               'Chairman', 'Chairman',
                               SUBSTR (ass_attribute2, INSTR (ass_attribute2, '.', 1, 1) + 1,
                                       3)
                              ) grade,
                       (SELECT nvl(MAX (deduction_end_date),null)
                          FROM xxadtc_car_loan_request
                         WHERE person_id = p_person_id) old_loan_end_date,
                       to_date(ADD_MONTHS (p_deduction_start_date, 47)) max_loan_end_date
                       --to_date(ADD_MONTHS (sysdate, 47)) max_loan_end_date
                  INTO  l_contract_type
                        ,l_loan_eligible_date
                        ,l_grade
                        ,l_old_loan_end_date
                        ,l_max_loan_end_date
                  FROM per_all_people_f papf, per_all_assignments_f paaf
                 WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
                   AND papf.business_group_id = 81
                   AND papf.person_id = paaf.person_id
                   AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
                   AND papf.person_id =P_PERSON_ID;
            EXCEPTION
                WHEN others THEN
                    DBMS_OUTPUT.PUT_LINE('Error ');
            END;
            -- get Previous Car loan amount --
            BEGIN
                SELECT to_number(prrv.result_value)
                  INTO l_remaining_amount
                  FROM per_all_people_f papf,
                       per_all_assignments_f paaf,
                       pay_assignment_actions pac,
                       pay_run_results prr,
                       pay_run_result_values prrv,
                       pay_element_types_f petf,
                       pay_input_values_f pivf,
                       pay_element_classifications pec,
                       pay_payroll_actions ppa,
                       per_time_periods ptp
                 WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
                   AND papf.person_id = paaf.person_id
                   AND papf.business_group_id = 81
                   AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
                   AND paaf.assignment_id = pac.assignment_id
                   AND pac.assignment_action_id = prr.assignment_action_id
                   AND prr.run_result_id = prrv.run_result_id
                   AND prr.element_type_id = petf.element_type_id
                   AND SYSDATE BETWEEN petf.effective_start_date AND petf.effective_end_date
                   AND prrv.input_value_id = pivf.input_value_id
                   AND SYSDATE BETWEEN pivf.effective_start_date AND pivf.effective_end_date
                   AND pivf.NAME = 'Remaining Amount'
                   AND petf.classification_id = pec.classification_id
                   AND pac.payroll_action_id = ppa.payroll_action_id
                   AND ppa.time_period_id = ptp.time_period_id
                   AND TO_CHAR (ptp.pay_advice_date, 'Mon-YYYY') =
                                                                 TO_CHAR (SYSDATE, 'Mon-YYYY')
                   AND petf.element_name = 'Motar Ahlami Loan'
                --and     employee_number='10185'
                   AND papf.person_id = p_person_id;
            EXCEPTION
                WHEN no_data_found THEN
                   --DBMS_OUTPUT.PUT_LINE('ERROR: No data!');
                   l_remaining_amount:=0;
                WHEN others THEN
                    DBMS_OUTPUT.PUT_LINE('Error ');              
            END;
               select   GET_CAR_LOAN_ELIGI_AMT(P_PERSON_ID)
               into     l_eligible_amt
               from     dual;
               IF l_contract_type NOT IN ('Permanent') THEN
                    l_message := 'Contract Type Is not valid';
               END IF;
               IF l_loan_eligible_date < SYSDATE THEN
                    l_message:= 'Date of Join is less then one year';
               END IF;
               IF l_grade IN ('US','00','AUS','EM') THEN
                    l_message:= 'Your are not Eligible Grade';
               END IF;
               IF l_old_loan_end_date < SYSDATE THEN
                    l_message:= 'Previous Loan Duration is not completed';
               END IF;
               IF l_max_loan_end_date > P_DEDUCTION_END_DATE THEN
                    l_message:= 'Maxinum number of monthly payment of 48 month';
               END IF;
               IF l_remaining_amount >0 THEN
                    l_message:= 'Previous Car Loan amount is pending till';
               END IF;
               IF l_eligible_amt < p_loan_value THEN
                    l_message:= 'Please check Eligible Amount ';
               END IF;
          RETURN nvl(l_message,'S');
       EXCEPTION
          WHEN NO_DATA_FOUND
          THEN
             RETURN 'Error';
       END CAR_LOAN_VALIDATION;
    END XX_CAR_LOAN_REQUEST_PKG;
    CALLABLE STATEMENT CODE ---CO CODE
          if(pageContext.getParameter("Submit")!=null) {
             OAViewObject vo2 = (OAViewObject)am.findViewObject("XxadtcCarLoanRequestEOVO1");
                if(vo1!=null){
                   vo1.getCurrentRow().setAttribute("LoanStatus","Pending Approval");
                   int xxpersonId = pageContext.getEmployeeId();
                   String xxDeductionStartDate = vo2.getCurrentRow().getAttribute("DeductionStartDate").toString();//pageContext.getParameter("DeductionStartDate").toString();
    //                SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy/mm/dd");
    //                Date convertedDate1 = dateFormat1.parse("xxDeductionStartDate");
                   String xxDeductionEndDate = vo2.getCurrentRow().getAttribute("DeductionEndDate").toString();//pageContext.getParameter("DeductionEndDate").toString();
    //                SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy/mm/dd");
    //                Date convertedDate2 = dateFormat2.parse("xxDeductionEndDate");
                   String xxLoanValue = vo2.getCurrentRow().getAttribute("LoanValue").toString();//pageContext.getParameter("LoanValue").toString();
                    int iLoanValue = Integer.parseInt(xxLoanValue);
                    System.out.println("Entered into submit loop");
                    System.out.println("xxpersonId id is:"+xxpersonId);
                    System.out.println("xxDeductionStartDate id is:"+xxDeductionStartDate);
                    System.out.println("xxDeductionEndDate id is:"+xxDeductionEndDate);
                    System.out.println("xxLoanValue id is:"+xxLoanValue);
                  OADBTransaction txn = am.getOADBTransaction();
                  String sql ="BEGIN :1 :=XXADTC_CAR_LOAN_REQUEST_PKG.CAR_LOAN_VALIDATION(:2,:3,:4,:5); END;";
                  CallableStatement cs =  txn.createCallableStatement(sql,1);
                  String outputval = null;//  int outputval = 0;
                  try {
                      System.out.println("Entered in try loop of callable funtion validation");
                  cs.setInt(2,xxpersonId);
                        System.out.println("cs setInt(2,xxpersonId);is executed");
                  cs.setString(3,xxDeductionStartDate);
                        System.out.println("cs.setString(3,xxDeductionStartDate is executed);");
                  cs.setString(4,xxDeductionEndDate);
                        System.out.println("cs.setString(4,xxDeductionEndDate is executed);");
    //                              cs.setDate(3,xxDeductionStartDate);
    //                              cs.setDate(4,xxDeductionEndDate);
                  cs.setInt(5,iLoanValue);
                  cs.registerOutParameter(1,Types.VARCHAR);//  cs.registerOutParameter(1,Types.NUMERIC);
                  cs.execute();
                  outputval = cs.getString(1);// txn.commit();
                   System.out.println(outputval);
                        txn.commit();
                            if(outputval.equals("S"))
                            am.invokeMethod("apply");
                            else
                             throw new OAException("Organization name is:"+outputval,OAException.INFORMATION);
                        txn.commit();
                        catch(Exception sqle){
                        try {
                        cs.close();
                        catch (Exception e)
                        throw OAException.wrapperException(e);
                        throw OAException.wrapperException(sqle);
    Please help .where is the error is.
    please help
    let me know for any clarification.
    Thanks
    Aravinda.

    Hi Arvinda,
    Refer Below code.
    // In Controller
    java.sql.Date DeductionSDate; //declare variable
    //In PFR
      String xxDeductionStartDate = vo2.getCurrentRow().getAttribute("DeductionStartDate");
       OADBTransaction txn = am.getOADBTransaction();
         if(xxDeductionStartDate!=null)
                java.sql.Date startDate= txn.getOANLSServices().stringToDate(xxDeductionStartDate);
                DeductionSDate = startDate;
        Set this to cs.setDate(3,DeductionSDate);
    Thanks,
    Dilip

Maybe you are looking for