How can I access to an EJB from a JSP, using a taglib?

I'm trying to access to an EJB from a JSP using a taglib,
          and I get the example in
          http://java.sun.com/j2ee/j2sdkee/techdocs/guides/ejb/html/Advanced5.html.
          But I colund't run this example because in the weblogic Log appears many
          errors when I run the JSP.
          Can you help me?
          

Backing files is an option. If you need to do it from the controller, you
could use the Forward object. The forward object constructor can take a URL
object as a parameter. This should do the trick.
Regards,
Kunal
"Panji Aryaputra" <[email protected]> wrote in message
news:[email protected]..
Hi, you have to use backing file to get what you want. In my case, I am
using a page backing file. Perhaps a portlet backing file can do thatalso.
Cmiiw, the redirect header makes the page redirected only if the httpheader
has not been sent to client. In your case, the header has been sent (i.e.
the portal header.jsp has been displayed, etc). So the header need to be
sent before anything else sent to client browser. This is where thebacking
file comes handy.
hth
panji.a
"A Hagen" <[email protected]> wrote in message
news:[email protected]..
I'm using Bea Workshop 8.1 and trying to perform a redirect from inside
a
portlet
using HTTPServletResponse.sendRedirect(String url)... but nothing
happens
I tryed the same trick with a simple JSP, and that's ok, but portal
pages
obviously
catch the redirect somehow.
Please could you tell the correct way of redirecting the whole browser
to
another
page from inside portlets?
Thanks!!!

Similar Messages

  • How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?

    How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?
    Reason I ask is I keep getting this error:
    javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    Note: I am using <bpelx:exec> as a way to execute some java program.
    Essentially my java client (essentially an EJB client hosted on Oc4J) needs access to wlclient.jar since it needs access to weblogic.jndi.WLInitialContextFactory. I have a EJB client running on BPEL server hosted on Oc4J that needs to access some EJBs hosted on weblogic.
    Where do I place this wlclient.jar so that BPEL PM can start peacefully and at runtime discover the InitialContextFactory classes?
    Placing it in the j2ee/home/applib doesn't solve the problem. The server fails to start up if I do this
    I tried placing it in BPEL-INF\lib directory ...
    I still get the same exception...see below for exception dump
    I verified the BPEL suitcase, and it in fact does contain the jar file wlclient.jar
    integration\orabpel\domains\default\deploy contains the bpel_BPELProcess2_1.0.jar file and snapshot of that is as follows:
    <PRE>
    &#9474; bpel.xml
    &#9474; BPELProcess2.bpel
    &#9474; BPELProcess2.jpr
    &#9474; BPELProcess2.wsdl
    &#9474; bpel_BPELProcess2_1.0.jar
    &#9474; build.xml
    &#9474; buildxml.copy
    &#9474; graphics.xml
    &#9474;
    &#9500;&#9472;&#9472;&#9472;BPEL-INF
    &#9474; &#9492;&#9472;&#9472;&#9472;lib
    &#9474; myEJB.jar
    &#9474; wlclient.jar
    &#9474;
    &#9500;&#9472;&#9472;&#9472;META-INF
    &#9474; MANIFEST.MF
    &#9474;
    &#9492;&#9472;&#9472;&#9472;output
    bpel_BPELProcess2_1.0.jar
    </PRE>
    I tried using the BPEL-INF\jar directory...Is this something the obant automatically detects? or do I have to modify the build.xml? I created this directory and let Jdev deploy to local BPEL server->default domain handle it
    #####################3
    I even tried copying the wlclient.jar to
    integration\orabpel\system\classes but this doesn't help since the BPEL PM fails to start if I explode this jar into this directory.
    In short,where do I place the wlclient.jar so that this exception can be contained.
    I edited the build.xml to point to the jar, that too didn't work, unless I made some mistake in the file
    <bpelc classpath="${basedir}/BPEL-INF/classes;${home}/system/classes;${home}/lib/j2ee_1.3.01.jar;${basedir}/BPEL-INF/jar/wlclient.jar" input="${basedir}/bpel.xml" rev="${rev}" deploy="${deploy}" />
    </target>
    </project>
    DETAILS on ERROR
    I get the following error
    Process "BPELProcess2" (revision "1.0") successfully compiled.
    <2005-12-14 09:17:55,770> <INFO> <default.collaxa.cube.engine.deployment> Proces
    s "BPELProcess2" (revision "1.0") successfully loaded.
    05/12/14 09:18:36 weblogic.jndi.WLInitialContextFactory
    javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    05/12/14 09:18:36 at javax.naming.spi.NamingManager.getInitialContext(Nami
    ngManager.java:652)
    05/12/14 09:18:36 at javax.naming.InitialContext.getDefaultInitCtx(Initial
    Context.java:243)
    05/12/14 09:18:36 at javax.naming.InitialContext.init(InitialContext.java:
    219)
    05/12/14 09:18:36 at javax.naming.InitialContext.<init>(InitialContext.jav
    a:195)
    05/12/14 09:18:36 at com.ejb.test.MapFinder.getDefaultMapName(Map
    Finder.java:37)
    ##################3
    with the bpelx all I have is two lines of code that creates a java object and calls a method on it.
    The method does this:
        private String initialContextFactory = "weblogic.jndi.WLInitialContextFactory";
        private String providerUrl = "t3://localhost:7001";
        private String urlPkgPrefixes = "";
        private String mapEjbJndiName = "ejb/mycompany/Redlands";
        public String getDefaultMapName() {
          try {
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
              env.put(Context.PROVIDER_URL, getProviderUrl());
              if (getUrlPkgPrefixes() != null && !getUrlPkgPrefixes().equals(""))
                  env.put(Context.URL_PKG_PREFIXES, getUrlPkgPrefixes());
              System.out.println("    " + getInitialContextFactory());
              System.out.println("    " + getProviderUrl());
              System.out.println("    " + getUrlPkgPrefixes());
              System.out.println("    " + getEjbName());
              // Get a naming context
              context = new InitialContext(env);
               Object ms  = context.lookup(getEjbName());
              MyEJBHome home = (MyEJBHome ) PortableRemoteObject.narrow(ms, MyEJBHome.class);
              myEjb = home.create();
              return myEjb.getDefaultName();
          } catch (RemoteException re){
              System.out.println(re.getCause().getMessage());
          catch (Exception ex) {
              ex.printStackTrace();
          return null; //if unable to resolve the context factory etc...
        }

    I did exactly as you suggested. I edited the application.xml and added this
    <library path="C:\ArcGIS\test\bea\wlclient.jar"/>
    I didn't add weblogic because the needed classes were all in wlclient.jar
    I also edited the BASE_OB_CLASSPATH to include this jar.
    Here is the result when I just start BPEL PM Server. Somehow BPEL PM doesn't like to have wlclient.jar in its classpath during startup.
    Failed to create "worker" bean; exception reported is: "javax.naming.NameNotFoun
    dException: remaining name: env
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:49)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.ejbCreate(WorkerBean.java
    :49)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.evermind.server.ejb.MessageDrivenHome.getInstance(MessageDrivenHo
    me.java:1235)
    at com.evermind.server.ejb.MessageDrivenHome$2.run(MessageDrivenHome.jav
    a:1150)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)
    <2005-12-29 13:39:05,281> <ERROR> <collaxa> <ServerManager::loadAllDomains>
    ORABPEL START-UP ERROR!!!!!!!!
    OraBPEL run-time system failed to start due to exception:
    Could not initialize jms connection pool.
    Could not initialize connection pool for connection factory "java:comp/env/jms/
    ollaxa/BPELInvokerQueueFactory"; the reason is remaining name: env/jms/collaxa/
    PELInvokerQueueFactory.
    Note: So what I did was to removed the entry from application.xml and tried with just obsetenv.bat having the wlclient.jar added to it. This too failed!!
    Here is a snapshot of the error I got.
    Process "BPELProcess2" (revision "1.0") successfully compiled.
    <2005-12-29 13:53:11,207> <INFO> <default.collaxa.cube.engine.deployment> Proces
    s "BPELProcess2" (revision "1.0") successfully loaded.
    05/12/29 13:53:32 Cannot instantiate class: weblogic.jndi.WLInitialContextFactor
    y
    05/12/29 13:53:32 javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    05/12/29 13:53:32 at javax.naming.spi.NamingManager.getInitialContext(Nami
    ngManager.java:652)
    05/12/29 13:53:32 at javax.naming.InitialContext.getDefaultInitCtx(Initial
    Context.java:243)
    05/12/29 13:53:32 at javax.naming.InitialContext.init(InitialContext.java:
    219)
    05/12/29 13:53:32 at javax.naming.InitialContext.<init>(InitialContext.jav
    a:195)
    05/12/29 13:53:32 at com.esri.adf.ejb.test.MapFinder.getDefaultMapName(Map
    Finder.java:57)
    05/12/29 13:53:32 at bpel.p0.ExecLetBxExe1.execute(ExecLetBxExe1.java:62)
    05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__execut
    eStatements(BPELXExecWMP.java:49)
    05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perfo
    rm(BPELActivityWMP.java:185)
    05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.performActivity(Cu
    beEngine.java:3398)
    05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.handleWorkItem(Cub
    eEngine.java:1905)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.message.instance.Per
    formMessageHandler.handleLocal(PerformMessageHandler.java:75)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.handl
    eLocalMessage(DispatchHelper.java:100)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.sendM

  • I have converted a pdf to word. How can I access the Word file from my online account?

    I have converted a pdf to word. How can I access the Word file from my online account? When it says 'download the converted file' I choose a location on my PC and click, but nothing happens. It seems that it can only save the converted file to my online account. I went to my online account but I see no way to look for the file

    Hey Fabrizio,
    You might need to sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials to convert your PDF file to Word.
    Do you get the 'download' prompt?
    Also, you can find the converted files by clicking at the 'Files' tab. 
    Please try the same using a different browser and check.
    Hope to hear from you.
    Regards,
    Anubha

  • My ipod touch has a huge collection of music that I don't want to lose or replace but my computer has now crashed beyond recovery. How can I access my itunes account from another computer or transfer my playlists to another computer from my ipod?

    My ipod touch has a huge collection of music that I don't want to lose or replace but my computer has now crashed beyond recovery. How can I access my itunes account from another computer or transfer my playlists to another computer from my ipod?

    You can transfer iTunes purchases to your "new" computer by
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    You can transfer other stuff by:
    Best iPod to PC
    How to transfer or sync files from iPod to PC - Windows mac iPhone iPod software reviews - Software Wiki

  • How can I access a calendar backup from my old iPhone?

    How can I access a calendar backup from my old iPhone?
    I recently had to get a replacement iPhone 4. The tech at the Apple Store thought that I might have had a software problem and recommended that I not "restore from backup," but start this phone as a new device and just sync the apps and what-not. My calendar on my computer was different than the one on my old phone, though, and now I need the data from my old iPhone calendar. I did back up my old phone just prior to taking it to the Apple Store.
    HELP!

    Well what you can do is update to ios5 then use icloud to sync your calandar up to your phone then restore your phone as new and when prompted in the new phone setup put in your icloud username and password and you will have your calandar events back.

  • I upgraded to the new IOS, but lost data and apps. When I try and restore the only backup I see is the one made AFTER the lost data. How can I access an older backup from the cloud?

    I upgraded to the new IOS, but lost data and apps. When I try and restore the only backup I see is the one it made AFTER the lost data. How can I access an older backup from the cloud?

    Why don't you talk to apple and find out if backup exists? That conversation with apple will stop your guessing.

  • How can I access my music library from a laptop on the road, as if my PC is not active? I tunes is installed on both PC and Home Sharing is enabled on both devices.

    How can I access my music library from a laptop on the road, as if my PC is not active? I tunes is installed on both PC and Home Sharing is enabled on both devices.

    The key constraint for Home Sharing in this context is that both PCs need to be on the same wifi network. So once you get out of range of the wifi network covering your home PC, the laptop is not going to be able to Home Share.
    Have you considered importing your iTunes music to the laptop? Then you could listen to a local copy of the music on the laptop while you're on the road. (You can do the import via home sharing when both computers are on the same wifi network.)

  • HT2954 How can I access my imac mail from a different computer other than Apple?

    How can i access my imac email from a differnt computer other than
    apple?

    If you are using IMAP mail connection (IMAP keeps the  mail on the server), then you just configure the other computer's mail client to access the same account.
    If you are using a POP mail connection, then the mail is generally downloaded to your Mac and deleted from the server.  That is a much more difficult problem to solve.  NOTE:  Google's gmail does have a POP option that does NOT delete the mail on the server, so it is accessible via the gmail web page.
    A lot depends on what you are using for your mail service and whether you are using IMAP or POP protocols.

  • How can i access mac mini server from iPad?

    how can i access my files in mac mini server using an ipad2? what apps do i need?

    Hi,
    I found an App called iTeleport. Have a look.

  • How can i pass the same parameter from 1 jsp page to many jsp page?

    hello.....
    how can i actually pass a parameter from 1 jsp file to many other jsp files? pls help......
    thanx

    Hi
    Save the information which u want to pass to various JSP's inside Session Object.
    There is an Object called HttpSession and u can store information inside which other jsp pages within the same domain and same browser instance can use it.
    commands which are for ur interests are
    <Session Object>.setAttribute("<object name>", <value>);
    Example
    HttpSession objsession =request.getSession(true); String strName="NEED_HELP":
    objSession.setAttribute("Name", strName);
    And then u can retreive that information in your n pages.
    Read any JSP/Servlet Books and u will know about them
    Bye.

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How can I access Address Book data from an older version of the application to transfer it to a newer version of Mac OS running on a second hard drive on the same MDD G4?

    I installed a hard drive from one PowerPC Dual 1.25 GHz MDD into another one with an older version of the OS X.  all my Address Book data are on the older hard drive, from which I now boot the computer.  When I launch Address Book as an app on the hard drive with the newer version of the OS, I get an error message that says I cannot run the version of Address Book from the older hard drive on the newer OS.  How can I access the data on the older hard drive version of the Address Book app so that I can transfer it to the newer version of the app on the boot drive?  The "Import" functionality will not work. I will be grateful for any help I can get.  I would also like to uninstall the older version of OS X from the older hard drive.

    Boot from the older version of OSX, then in AB use the File>Export>Export vCard after selecting all in AB.
    Then boot from the new OSx & use the new AB to import that VCF file.

  • How can I access my iTunes account from my iPhone.

    1- I can't access my iTunes account from my iPhone.
    Do I have to sync them or can I download the songs I bought without connecting with my macbook?
    Last time i connected the two, all my music got deleted. Must have done something wrong, but have no idea how to prevent that from happening again.
    2- My "preferences" panel in iTunes, only shows apps and books, not music- Why?
    3- I can't save any music on iClod.

    hello. 
    i followed your link on how to delete content from all things Apple, and nothing removes books, movies, music... it just gives said device(s) the iCloud/download icon on top of the book, movie...  not sure what the 'hide' purchase actually does - after X'ing/hide, everything STILL appears across all devices using that account.  could you clarify this any further?
    if i am understanding iTunes correctly, then EVERYTHING we download (free or purchased) will be FOREVER accessible with zero way for us to control what is filling up this mysterious vault called the cloud?  (creepy- apple is keeping EVERYTHING, what happens when the cloud gets full?)
    since we have iCloud.com and it shows our "stuff" that we iCloud sync from our devices such as notes, contacts, calendar... then why doesn't apple provide an iCloud.com tab that shows ALL of our purchases so we as CONSUMERS control/delete what is in our account? 
    we download ALOT of apps to try and then delete them off our devices.  that works fine, but movies and books are always there.  maybe a glitch?

  • How can I access my iCloud account from my computer, when I'm running OSX Leopard?

    I have a Mac Book running Leopard and I don't have the iCloud icon in my settings.. How can I access my iCloud account/back up my computer to the cloud?

    Your signature says you have 10.6.8 which is Snow Leopard, but that is still not compatible with iCloud. You cannot back up your computer to iCloud in any case - it doesn't provide for that, only for iOS backups.
    The minimum requirement for iCloud is Lion 10.7.5 (Mountain Lion preferred): the iCloud Preference Pane does not appear on earlier systems - the MobileMe pane appears on Lion and earlier but is non non-functional - you cannot now open or access a MobileMe account.
    If you have already set up an iCloud account on another Mac or device you can make limited use of it with Snow Leopard - details here.
    To make full use of iCloud you will have to upgrade your Mac to Lion or Mountain Lion, provided it meets the requirements.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    To purchase it you will have to ring Apple at the number given at the bottom left of this page.
    The requirements for Mountain Lion are:
    OS X v10.6.8 or later
    2GB of memory
    8GB of available space
    and the supported models are:
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    Xserve (Early 2009)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    It is available from the Mac App Store (in Applications).
    You should be aware that PPC programs (such as AppleWorks) will not run on Lion or above; and some other applications may not be compatible - there is a useful compatibility checklist at http://roaringapps.com/apps:table
    (If in fact you are running Leopard and it is an Intel Mac you will have to upgrade to Snow Leopard to access the Mac App Store - it's available in the online Apple Store. However if you have a PPC Mac you cannot run Snow Leopard and cannot proceed further.)

  • How can I access an iPhoto library from another account?

    We have 2 user accounts on my iMac.  How can I access another user's iPhoto library when I am logged in?

    move the iPhoto library to a shared folder on your Mac.

Maybe you are looking for