How to open a jsf page on a link with a record . Link is in email

Respected Friends ,
I am facing a need for sending a email link to users for opening a form for processing a record . I have created a servlet for forwarding the user to the desired page on which we need to render a perticualr record. The servlet forwards the user to the required page but when the page is rendered it gives
java.lang.NullPointerException     at iffco.wf.view.servlets.UserLinkRedirectServelt.getApplicationModule(UserLinkRedirectServelt.java:143)     at iffco.wf.view.servlets.UserLinkRedirectServelt.doPost(UserLinkRedirectServelt.java:125)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)
Please help me ,
I want to know how i can load a page from a link with a perticular record .
I am using jdeveloper 10.1.3 . Also when i acess the current application module from the servlet it gives me the null pointer exception.
Thanks in advance

HI FRANK THANKS FOR THE QUICK REPLY I AM PASTING THE CODE OF MY SERVLET..
frank can you please provide me how to pass parametres along with jspx link and how to acess them in the managed bean .this will also solve my problem.
package iffco.wf.view.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
import iffco.wf.view.backing.LoginPageBean;
import iffco.wf.view.utils.ADFJSFUtils;
import oracle.jbo.ApplicationModule;
import oracle.jbo.ViewObject;
import oracle.jbo.client.Configuration;
import iffco.wf.model.wf_servicesImpl;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import oracle.adf.controller.v2.context.LifecycleContext;
import oracle.adf.controller.v2.lifecycle.PageController;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
public class UserLinkRedirectServelt extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    /**Process the HTTP doGet request.
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws ServletException,
                                                           IOException {
        String var0 = "";
        String var1 = "";
        String var2 = "";
        response.setContentType(CONTENT_TYPE);
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>UserLinkRedirectServelt</title></head>");
        out.println("<body>");
        out.println("<p>The servlet has received a GET. This is the reply.</p>");
        out.println("</body></html>");
        out.close();
        System.out.println("Inside doget method of servlet");
        LoginPageBean LoginBeanInstance = new LoginPageBean();
        System.out.println("Login bean initiated--->" + LoginBeanInstance );
        String nextJSP = "/faces/LoginPage.jspx";
        RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
        dispatcher.forward(request,response);
    /**Process the HTTP doPost request.
    public void doPost(HttpServletRequest request,
                       HttpServletResponse response) throws ServletException,
                                                            IOException {
        String var0 = "";
        String var1 = "";
        String var2 = "";
        response.setContentType(CONTENT_TYPE);
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>UserLinkRedirectServelt</title></head>");
        out.println("<body>");
        out.println("<p>The servlet has received a POST. This is the reply.</p>");
        out.println("</body></html>");
        out.close();
        System.out.println("Inside post method of servlet");
        LoginPageBean LoginBeanInstance = new LoginPageBean();
        System.out.println("Login bean initiated--->" + LoginBeanInstance );
        String        amDef = "iffco.wf.model.wf_services";
        String        config = "wf_servicesLocal";
        wf_servicesImpl service = (wf_servicesImpl)Configuration.createRootApplicationModule(amDef,config);
        System.out.println("service created --> "+ service);
        ViewObject vo=service.getLoginVO();
        System.out.println(vo);
        vo.setNamedWhereClauseParam("p_personal_no","109128");
        vo.setNamedWhereClauseParam("p_password","abc");
        vo.executeQuery();
        System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
        ADFJSFUtils newHelperClass = new ADFJSFUtils();
        System.out.println("New Helper Class Initated -->"+newHelperClass);
        ApplicationModule currentAM = newHelperClass.getDataControlApplicationModule("wf_servicesDataControl");
        System.out.println("Current AM is -->"+currentAM);
        ViewObject vo = currentAM.findViewObject("LoginVO");
        System.out.println(vo);
        vo.setNamedWhereClauseParam("p_personal_No","109128");
        vo.setNamedWhereClauseParam("p_password","abc");
        vo.executeQuery();
        System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
        System.out.println("Before method");
        wf_servicesImpl wfser=getApplicationModule();
        System.out.println("after method value got-->"+wfser);
        String nextJSP = "/faces/LoginPage.jspx";
        RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
        dispatcher.forward(request,response);
    public wf_servicesImpl getApplicationModule() { 
             FacesContext context = FacesContext.getCurrentInstance(); 
             System.out.println("context --"+context);
             ValueBinding vb = context.getApplication().createValueBinding("#{data}"); 
             BindingContext bc = (BindingContext) vb.getValue(context); 
             DCDataControl dc  = bc.findDataControl("wf_servicesDataControl"); 
             return (wf_servicesImpl) dc.getDataProvider(); 
    private void redirect(
        ResponsePage aDestinationPage, HttpServletResponse aResponse
      ) throws IOException {
        String urlWithSessionID = aResponse.encodeRedirectURL(aDestinationPage.toString());
        aResponse.sendRedirect( urlWithSessionID );
      private void forward(
        ResponsePage aResponsePage, HttpServletRequest aRequest, HttpServletResponse aResponse
      ) throws ServletException, IOException {
        RequestDispatcher dispatcher = aRequest.getRequestDispatcher(aResponsePage.toString());
        dispatcher.forward(aRequest, aResponse);
}

Similar Messages

  • [ADF Faces] How to open a jsf page in a new window.

    I need to open in a new window a page....
    I have used the Dialog Framework, but it does not work, because the objects is never reseteds, the frameworks was saving the states of it.....
    Then I need only to open the page in a new window, a pop up.
    The CommandButton has not the Target property :(
    thanks

    I discovered it
    private String goPohecamp() {
            FacesContext context = FacesContext.getCurrentInstance();
            // Create the dialog UIViewRoot
                ViewHandler viewHandler = context.getApplication().getViewHandler();
                UIViewRoot dialog = viewHandler.createView(context, "/access/ecamp.jsp");
                HashMap properties = new HashMap();
                //properties.put("width", new Integer(250));
                //properties.put("height", new Integer(150));
                AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
                afContext.launchDialog(dialog,
                                        null, // not launched from any component
                                        null, // no particular parameters
                                        true, //show in dialog
                                        properties);
            //return "goPohecamp";
            return null;
        }Like this is better to me

  • 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 open a web page in JFrame.

    Please let me know how to open a web page in the Java Frame.

    HTML code can be viewed in any Swing component you want.

  • How to open all the pages of a file PDF in Photoshop?

    Hi,
    How to open all the pages of a file PDF in Photoshop?
    Or
    I need to know the amount of Pages in PDF.
    Example:
    >Set MyPhotoshop = CreateObject("Photoshop.PDFOpenOptions")
    Set MyOpenPref = CreateObject("Photoshop.PDFOpenOptions")
    sFileName = "C:\Temp\Myfile.pdf"
    >With MyOpenPref
    .AntiAlias = True
    .Mode = psOpenCMYK
    .Resolution = 72
    .BitsPerChannel = psDocument8Bits
    .CropPage = psBoundingBox
    .Page = 4
    .SuppressWarnings = True
    End With
    >MyPhotoshop.Open sFileName, MyOpenPref
    I need help.
    Thanks

    http://www.ps-scripts.com/bb/viewtopic.php?t=1882
    Have a look at this thread, the last entry has the full code and has everything you need there.
    The answer to knowing how many pages is, you don't need to know!
    You use SL code and no error and no page is opened. Thats the crux of the code.

  • How to pre-compile JSF pages?

    Hi,
    I am new to JSF and would appriciate if any one can help me find out how to pre-compile JSF pages?
    Thanks in advance
    satsdn

    The same way you pre-compile JSP pages: Set it up in your faces-config.xml file.
    Here's how I do it:
         <servlet>
              <servlet-name>AcctID</servlet-name>
              <display-name>AcctID</display-name>
              <jsp-file>/AcctID.jsp</jsp-file>
              <load-on-startup>-1</load-on-startup>
         </servlet>Put one of these tags for each JSP you want to pre-compile. The -1 load-on-startup value is important.
    CowKing

  • Firefox does not know how to open this address because the protocol (Sims3) with any program connects

    Firefox does not know how to open this address because the protocol (Sims3) with any program connects
    can you help me plz

    Was the message sent from Microsoft Outlook? When you embed an image in a message in Outlook (at least up to version 2003), it creates a hidden attachment for the image and then inserts a "cid" reference to it. If the attachment gets stripped for any reason then the "cid" reference is useless: Outlook does not store the original URL or path to the image.
    Edit: By the way, which webmail site has this problem?

  • How to display a double page of a magazine with ibooks

    how to display a double page of a magazine with ibooks ?
    Thanks

    oiram osurac wrote:
    how to display a double page of a magazine with ibooks ?
    What is the title of the magazine you are talking about?

  • How can I view 2 pages on Ipad 3 with retina?

    How can I view 2 pages on Ipad 3 with retina?

    For viewing PDF I use PDF Pen. It's awesome though some consider the app pricey. PDF expert is another one.
    Sometimes it depends on the book you are viewing. If its a PDF it will not show 2 pages that I am aware of.

  • IPad- on Yahoo pages the mail icon with the red number indication shows email.  When I tap, it asks me to sign in again. I do. It takes me to yahoo mail but there is nothing.  All the folders are emptied. All mail is either read, trash, or deleted.

    iPad- on all Yahoo pages the mail icon with the red number indication shows email.  When I tap, it asks me to sign in again. I do. It takes me to yahoo mail but there is nothing.  All the folders are emptied. All my mail is either read, trash, or deleted. Also, when I tap on the mail app on iPad home page, gmail is no problem but for yahoo I get error: no password for yahoo. Go to Mail Account Settings and enter password.  I'm stuck. Suggestions?  Thank you.

    Ask and you shell receive.....lol
    Go to your Gmail account in the browser.
    Hit the folder icon that brings up the folder selection.
    Scroll down to the bottom and select desktop version.
    The broswer will refresh and bring up your gmail account as though you were looking on it on the computer.
    The go to the upper right corner and select settings.
    Then go to forwarding and pop/imap
    Go look at pop download
    There you'll find 3 numbered lines
    Go to 1. Status
    And select enable pop for all mail
    Then save the settings
    Once you have done that you can go back to BlackBerry device settings and sync your mail or wait for it to sync it's self.
    Let me know how it works out.
    I just did it and it sync within minutes.

  • How to open a jsp page inside a portlet directly ,Cannot find FacesContext

    Hi
    Thank you for reading my post.
    I have a portlet (a jsf portlet build by JSC) , now i need to open a window that
    will show some information , i managed to open the pop-up and pass some parameters to popup
    but right now , i do not know what is my jsp file url
    as you know portlets are deployed diffrent than plain web jsf application.
    I find that if i use
    http://localhost:28080/Adv/viewMessageDetails.jsp?messageID=10
    it will open the page , but unfortunetly it return an error like :
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: javax.servlet.jsp.JspException
    Cannot find FacesContext
    Possible Source of Error:
    Class Name: javax.faces.webapp.UIComponentTag
    File Name: UIComponentTag.java
    Method Name: doStartTag
    Line Number: 405
    Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
    and some stack trace.
    how i can fix this problem ?
    thank you

    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

  • Need HOW-TO on dynamic JSF pages

    How can we change a page dynamically? For example, I want to create an image tag but I do not know the name of the image until runtime. In fact it is a temporary file name that is geneated by a servlet .
    If this was a standard JSP page I would create a JSP tag with a "name" property . Can JSP tags be used on JSP pages and if so where do they show up in the Creator IDE?

    A technique that I have achieved in my app is to set the image url dynamically through the image url like this...
    THIS ONLY WORKS IF YOU HAVE USERNAME OR SIMILIAR FOR CLIENT SET IN SESSIONBEAN1 (JDBC/LDAP, Login, etc...)
    1. Close Creator locate an example jpeg that you want to bind dynamically.
    2. Open your Projects directory (outside of Creator is how I did) navigate to web/resources make an images directory inside of resources.
    3.Rename your example image something like...
    template1username.jpg
    (Hope I don't have to say that above username will correspond to whatever username you would like to bind the url to so when they are logged into your app they will have dynamic image just for them)
    4. Paste the renamed jpeg into the newly created images directory.
    5. Go back into Creator open your app and drop an image component onto the page.
    6. Make sure it is selected and go to properties pane -- url -- click the ellipses.
    7. NOTE I tried to use property binding and Creator wouldn't retain my url.
    8. Go to Use Value and then navigate to the images directory to the example renamed jpeg and select it so the url displays on top.
    9. Now all you have to do is manually add the binding in the url this way Creator doesn't seem to complain and the JSF Tag remains in the url
    10. To add the binding manually just replace username with the necessary binding expression for me it was...
    /resources/images/template1#{SessionBean1.loginBean.username}.jpg
    now run the project once logged in navigate to page with bound image and voila! It should be there and now all you have to do is add the images properly renamed to the images folder and anybody with a username and corresponding image in the directory gets a personalized image when they are logged in. This is probably not the best way to do this, but for what I was trying to achieve coupled with the fact that I am a NOOB it works pretty darn good.

  • OBIEE Guided Navigation Link - How to open in New page.

    Hi,
    I am using Guided navigation links in OBIEE dashboards to link some of my reports.
    When i click on the Link it opens the report on the same page. Instead i have to open the report in a new page. This Option is available in 'Link OR Image' section, not in 'Guided Nav. Link' section. Please suggest me if there is any way to achieve this.
    Thanks
    Swami

    Hi
    We have the same need: from within a report we have guided navigation to a detail report, that uses the values of the record in the master report as filterparameters. When clicking a row in the master report , we should open the detail report in a new window, while leaving the master report in the dashboard open. How can we achieve this?
    Swami just mentioned the Link or Image object to indicate that this possibility of choosing the same or a new window is present there, and asked where to find the same choosing option for guided navigation.
    Frits

  • OBIEE 11G - Navigation:How to open in New page/new tab.

    Hi All,
    When I click on a link in report it opens another report on the same page. Instead I have to open the report in a new page/new tab. Is this feature available in obiee 11g version? If yes, could you please tell me how to make it possible?
    Thanks in advance,
    Sunita

    hi
    Use Action Link...to open link in New Window
    1.Go to edit Dashboard...
    2.Select Action Link from Dashboard Objects.
    3.Click the Action Link Properties and Type your Report Name in Link Text Box.
    4.Select New Action Button and Go to Navigate to BI Content
    5.Choose your Report from your path and click ok button
    6.Enable Open Link in New Window(IMP) and click ok.
    7.save and check your dashboard page...
    thanks,
    kavi
    Edited by: Kavitha on Jul 12, 2011 12:11 PM
    Edited by: Kavitha on Jul 12, 2011 12:12 PM

  • How to open NEW PORTAL PAGE from current portal page ?

    I'm very confuse with my problem.
    I have 2 portal page.
    portal page I has 2 portlet : portlet A & portlet C.
    portal page II has 2 portlet : portlet B & portlet C.
    Now my customer want : start with portal page I, when i submit portlet A, program will open portal page II.
    I don't know the way to call new portal page from current portal page. Help me, please.
    Thanks.
    Edited by: young_hero on Oct 30, 2008 1:12 AM

    Could you please help me how to call a .html page
    from a Pl/Sql procedure or trigger ?
    Thanks & Regards
    Kalyani KothaKalyani,
    Could you explain a little more exactly what you're trying to acheive? I'm not quite sure what it is you're asking for. Are you asking: "how would you/can you open a browser and direct it to a URL with PL/SQL?"
    Earl

Maybe you are looking for