Accessing managed-bean in a JSP (portal theme).

I have a tricky situation where I need to access a managed-bean outside a JSF jsr 168 api portlet. Now I need to reference the bean in the themes jsp (just fyi themes loosely relate to JSP's which control the look and feel, navigation within portal page). I was thinking of a way to set a managed-bean variable in the jsp before the portlet where the managed-bean is declared. Is this possible ? Any ideas ?

You can just access managed beans using JSTL EL.${myBean}or if you strictly want to specify the scope, e.g. session scope${sessionScope.myBean}where "myBean" is the managed bean name. Keep in mind that you cannot use this in input elements, but only in output elements. If you want to use this in input elements, then you should be using JSF components with deferred EL #{myBean.input} and so on.

Similar Messages

  • Accessing Managed Beans from Code

    Hi,
    How can I access managed beans from my code? I am too new to JSF to know if what I am doing is right from a design perspective. But what I am trying to do is to use Actions as sort of a Web Facade that aggregates state from other beans (all of them Managed beans right now) to build up state that is necessary for displaying pages.
    Thanks for you help
    Suhail

    Just answering my own question. The answer was given in a different thread (http://forum.java.sun.com/thread.jsp?forum=427&thread=427057&message=1901909#1901909) . JSF has provided various Factories (look at the FactoryFinder API) that allow one I presume to access the internal state of a FacesContext. One of the factory is ApplicationFactory. This factory from what I can make out essentially gives you access to everything (actionlisteners, navigationhanlder,components etc) in you application. My original question was about accessing something (for some reason) named ValueBinding. I can access the managed beans declared in my faces-config.xml by invoking getValue(facesContext). I can naturally also set the value of a bean by invoking setValue(...). I just needed the getValue and it seems to work.
    Ofcourse keep in mind that the underlying managed bean will not necessarily be initialized when you access it so test for nullness. As a general rule I think its best not to create the beans but access them using this facility. After all its not for nothing these are called Managed Beans.
    Now if only the faces implementation would persist the changes to Navigation hanlders that one makes in the code ;-)

  • Accessing Managed Bean Variables in Entity Impl Class

    How can I access managed bean variables in the entity Impl class .
    While inserting a new record in DB , i want to set few entity properties values . The values of those properties are available in the managed bean .
    How can i access those values from Managed Bean and set them the entity Impl class to override the create method.
    Or is there any better recommended approaches ?
    Jdev - 11.1.1.5

    >
    While inserting a new record in DB , i want to set few entity properties values .
    >
    you can user CreateWithparams
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    http://andrejusb.blogspot.com/2011/02/createwithparams-operation-for-oracle.html

  • Two managed beans in same jsp page

    Hello
    First this could be a stupid question, but i just can't find a solutions on this problem.
    I wondering that could it be a two managed beans in same jsp page, here is a example:
    index.jsp
    <t:commandLink disabled="#{listBean.currentPage == 1}" id="previous2" type="button" immediate="true" style="font-size:small" action="#{listBean.previousPage}">
    <h:outputText value="Edellinen" id="prev"/>
    </t:commandLink>
    <t:commandLink disabled="#{listBean.currentPage == listBean.totalPages}" id="next2" type="button" immediate="true" style="font-size:small;" action="#{listBean.nextPage}">
    <h:outputText value="Seuraava" id="next"/>
    </t:commandLink>
    then i have a dataTable like this:
    <t:dataTable value="#{customerListBean.customerBeans}"
    binding="#{customerListBean.dataTable}" preserveDataModel="true" style="text-align:left">
    My problem is that when i push a commandLink it doesn't refresh a dataTable. Does anyone know a solution here or is this just a impossible way to do it?
    Thanks for help.

    when i push nextPage (commandLink) it's call action
    and count a new range of dataset and after that it's
    calls a method which is declared on subClass and that
    method get a new data of database on given params.
    and put it on DataTable.
    So listBean is upper class and customerListBean
    extends on ListBeanNo, it doesn't work that way as you expected. You have created two independent instances. They doesn't communicate automatically with each other or so. Just use one CustomerListBean instance and call the inherited methods of ListBean on the #{customerListBean} managed bean instance.

  • Can't get JSF to access managed bean methods from web page

    I'm using NetBeans 6.7.1 and Glassfish v2.1
    Having problems here can somebody please help? It is really
    frustrating because I have written apps like this before in fact I
    used one as a model to create an even simpler app and still can't get
    it to work. I ran it through the debugger and it stops in the
    constructor so it looks like the bean object is being created, but the
    setUid method and the testit method are not being entered when I click
    on the enter commandbutton. Can somebody PLEASE give me an idea as to
    what might be going on? I am totally stumped and this is holding up
    some important work I need to get done. Any help would be greatly
    appreciated:
    web.xml:
    - Show quoted text -
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/welcomeJSF.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <managed-bean>
    <managed-bean-name>testbean</managed-bean-name>
    <managed-bean-class>com.lingosys.quoteest.testbean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/go.jsp</from-view-id>
    <navigation-case>
    <from-outcome>correct</from-outcome>
    <to-view-id>/ok.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    go.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
    This file is an entry point for JavaServer Faces application.
    --%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>JSP Page</title>
    </head>
    <body>
    <f:view>
    <h1>JAS Generator</h1>
    <p/>
    <h:form id="testForm" enctype="multipart/form-data" >
    <p/>Both fields are required.
    <p/>Enter Test ID: <h:inputText id="pid"
    value="#{testbean.uid}" required="true"/>
    <p/><h:commandButton value="Enter"
    action="#{testbean.testit}"/>
    </h:form>
    </f:view>
    </body>
    </html>
    testbean.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.lingosys.quoteest;
    * @author mphoenix
    public class testbean {
    private String uid;
    public testbean() {
    int x=0;
    public String getUid() {
    return uid;
    public void setUid(String uid) {
    this.uid = uid;
    public String testit() {
    return "correct";
    }

    MikePhoenix wrote:
    enctype="multipart/form-data"
    Why?
    Oh, in the future please post code in code blocks. Use the CODE button to get them. Use the Preview tab to see if anything went right.

  • Problems with managed beans on included JSPs

    I've got a problem with managed beans within an included JSP
    The included page looks as follows:
    <f:subview id="includedPage" binding="#{testBean.component}">
         <h:outputText value="Hallo from the included page"/>
         <h:outputText value="#{testBean.msg}" />
    </f:subview>The including page is also very simple
    <f:view>
         <html>
              <head>
                   <title>Test include</title>
              </head>
              <body>
                   <h:outputText value="Hello from the including page"/>               
                   <jsp:include page="included.jsp"/>
              </body>
         </html>
    </f:view>The testBean is a managed bean with page scope and looks as follows:
    public class TestBean {
        public UIComponent fComponent;
        public TestBean() {
            System.out.println("TestBean Constructor called " + toString() );
        public String getMsg() {
            return "Component = " + fComponent ;
        public void setComponent(UIComponent component) {
            System.out.println("setComponent called " + component);       
            fComponent = component;
        public UIComponent getComponent() {
            System.out.println("getComponent called " + fComponent);
            return fComponent;
    }The output to the console is:
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@1bc16f0
    getComponent called null
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@18622f3
    setComponent called javax.faces.component.UINamingContainer@160877b
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@5eb489
    and the page displays
    Hello from the include page
    Hello from the included page Component = null
    Can anyone explain this behavior ? What's the reason that the page displays
    Component = null
    and is it possible to display the parent naming container (subview) this way ?
    how ?
    Thanks

    By "page scope" I assume you mean "none"? If so JSF creates a new bean for each place it's referenced. The closest to the behavior you want, once per "page", is really request scope.
    (I'm not sure why the constructor is being called thrice, though. I should look into this.)
    I assume you want a bean-per-subview scenario. This should be doable, and one way that allows a dynamic number of subviews would be as follows:
    --create a "manager" bean in request scope
    --give it get/set methods that retrieves a Map of "TestBean" instances; the idea is that each subview use a different key "s1", "s2", etc
    back the manager method with Map implementation that checks if there's already a TestBean associated with the key returns it if yes, else null.
    If that seems messy, the component solution is hairy :-) See http://forum.java.sun.com/thread.jspa?threadID=568937&messageID=2812561
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Accessing managed-beans property from simple java class

    I have managed bean that is registered in faces-config.xml:
    <managed-bean>
    <managed-bean-name>documentReportsBean</managed-bean-name>
    <managed-bean-class>[myApp].beans.DocumentReportsBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    I want to access property of documentReportsBean from other java class without registering managed-property in faces-config. How can I do that?

    Thank you, what I needed was someone saying the right word. "ValueBinding" in this case.. :)
    Two lines:
    ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{documentReportsBean}");
    DocumentReportsBean pbean = (DocumentReportsBean) vb.getValue(FacesContext.getCurrentInstance());
    gives my full control. Nice

  • Access managed beans in action methods

    Hi,
    I am a newbie in JSF. In my first page, I am getting input from the user and pass it to my business object for processing. My Business Object returns some results and i want to show it in page 2 which has a different backing bean. So I am accessing the bean as follows:
    FacesContext Ctx = FacesContext.getCurrentInstance();
    Map Params = Ctx.getExternalContext().getSessionMap();
    ResultBean rbean = Params.get("MyResultBean");MyResultBean is registered to have session scope in my faces-config file and is the backing-bean for my page 2.
    Then i set the results in rbean and forward to the page 2.
    Is this the right way of doing? Or are there any other way of doing it?
    Need your valuable suggestions.
    - Mani

    This article might be useful: http://balusc.xs4all.nl/srv/dev-jep-com.html
    By the way, why are you using capitalized variabe names? It makes them unreadable .. I am referring to Ctx and Params.
    This is Java, not C# or so ;)

  • Database access by Bean, error in JSP(view)

    Hello,
    I have a web application. All my database connection logic, execution of query is done in my bean. I have verified that the code in my bean is fine and so I have not posted that code.
    My jsp code is as follows:
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <html>
    <head><title>Trial JSP Page</title>
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-STORE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PRIVATE">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    </head>
    <jsp:useBean id="data" class="com.bean.samples.ConnectionBean"/>
    <jsp:setProperty name="data" property="drivername" value="oracle.jdbc.driver.OracleDriver"/>
    <jsp:setProperty name="data" property="url" value="jdbc:oracle:thin:@someurl"/>
    <jsp:setProperty name="data" property="username" value="name"/>
    <jsp:setProperty name="data" property="password" value="passwd"/>
    <jsp:setProperty name="data" property="query" value="SELECT * FROM tablename"/>
    <%
    data.processQuery();
    ResultSet rs = data.getRs();
    ResultSetMetaData rsmd = data.getRsmd();
    %>
    <body text="black">
    The table has <jsp:getProperty name="data" property="count"/> columns and <jsp:getProperty name="data" property="rowcnt"/>
    rows in it.
    The first column name is <%= rsmd.getColumnLabel(1) %>.
    The current row is <%= rs.getRow() %>.
    </pre>
    </body>
    </html>
    Output of browser:
    The table has 2 columns and 6 rows in it. The first column name is ITEMNO. The current row is
    Error: 500
    Location: /schedule/jsp/Trial.jsp
    Internal Servlet Error:
    java.lang.IllegalStateException: Response has already been committed
         java.lang.Throwable(java.lang.String)
         java.lang.Exception(java.lang.String)
         java.lang.RuntimeException(java.lang.String)
         java.lang.IllegalStateException(java.lang.String)
         void org.apache.tomcat.core.HttpServletResponseFacade.sendError(int, java.lang.String)
         void org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.HttpServletResponse, java.lang.Throwable)
         void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
         void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
         void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object [])
         void org.apache.tomcat.service.TcpConnectionThread.run()
         void java.lang.Thread.run()
    Error is being thorwn on the statemnt:
    The current row is <%= rs.getRow() %>.
    Can anyone help with this?
    Thanks in advance.

    Hi beattris,
    No I dont close the rs and conn objects.
    The relevant method of my bean is :
    public void processQuery() throws Exception{
         try{
              Class.forName(getDrivername());
              conn = DriverManager.getConnection(getUrl(),getUsername(),getPassword());
              st = conn.createStatement();
              rs = st.executeQuery(getQuery());
              rsmd = rs.getMetaData();
              int columncount = rsmd.getColumnCount();
              int rowcount = 0;
              setCount(columncount);
              while(rs.next()){
                   rowcount++;
              setRowcnt(rowcount);
         }catch(Exception e){
              throw e;
    I did some searching on the internet for this error and found that it is tricky one and so far I havent found a way to correct it.
    The link i went to were:
    http://developer.java.sun.com/developer/Books/ProJSP/Chap19.pdf
    and
    http://archives2.real-time.com/rte-tomcat/2000/Jun/msg02490.html
    Well, I hope I get some answers soon.
    Thanks.

  • Impossible to access a bean from a JSP in NES 4.0

    We are trying to use a bean in a JSP using the common tag <jsp:useBean id="... /> in a Netscape Enterprise Server 4.0.
    Always we obtain the same error: "JSP compilation error: java.lang.Exception: JSP parse error (line 43) - Incomplete tag ending of /jsp:useBean". Someone can help us?
    Thanks.

    Check NAS4.0 supports jsp 0.92 specs?
    use this tag...
    <USEBEAN name="..." type="..." lifespan="..." >
    </USEBEAN>

  • Can't access a Bean from a JSP page !

    Hello everybody,
    I work with Oracle 8i 8.1.7, it means Oracle HTTP Server + Oracle JSP 1.1.0.0.0. But i don't use the Oracle Servlet Engine.
    In this context, i try to load ` JSP page, which instantiate a Bean. But it is impossible to access to this bean !...
    1) In jserv.properties file, i have mentionned the CLASSPATH to beans directory, as said in the OracleJSP documentation :
    wrapper.classpath=D:\...\myBeansDirectory\
    2) i have copied the .class file of my bean in the bean directory ...
    So did i forget something ?
    Seeking desperatly help !
    Thanks.

    Hi,
    Did you restart the HTTP listener after adding the CLASSPATH to the jserv.properties file? The change in jserv.properties (and in any other configuration files) will take effect only after the listener is restarted.
    Good luck,
    Srinivas.

  • Managed Bean "Name" Access  with in the Managed Bean

    Hi,
    I have faces-config.xml in which I have registered a managed bean
    and I have a base class for all the managed bean.
    The JSP's invoke the action/method defined in the base bean and I want to remove the managed bean from session upon a particular event.
    To remove the managed bean from session, as far as I know - we need to know the managed-bean-name in the faces config.
    I wanted to know if there is any way to get the name of the managed bean in the faces-config.xml at run time?.
    Thanks,

    Thanks for your recommendations. The issue that I get stuck on is how to call this method that retrives employee data. When I had the code in the constructor, it executed when I accessed the view.jsp page. Then I populated the fields from the Employee class fields. But once I create non-constructor method, how do I invoke it from my JSF page.

  • Using BEA Weblogic Portal with Sun Access Manager

    Hello all,
    I am wondering if anyone has had experience with using Weblogic Portal (versions 8.1 or 9.2) with Sun's Access Manager tool (part of the Identity Management suite).
    In particular, I would like to know what access control tasks were performed through access manager, and which were performed portal-side.
    Any information would be appreciated.
    Thanks!

    Hi
    Has any one explored the below question.
    Is WLP 9.2 compatible with Sun Access Manager?
    If yes, please let know the details.
    Thanks

  • Java.lang.ClassCastException in jsp trying to access session bean

    Ok I'm totally stuck on this. I've been able to deploy my session bean facade to a bunch of entities bean with no problem. Now I'm trying to access the bean from a JSP. I can do a lookup ok, I can even do a PortableRemoteObject.narrow() ok, but when I try to actually cast the object I get an error. I can't understand why narrow works if the object is not of the correct type, when I do reflection I can verify that the object implements the interface I am trying to cast to. But when I do an instanceof the object from narrow is not the right type. I'm totally confused by this.
    Here's my jsp,
    <%@taglib uri="/com/sct/socrates/web/jsp/tld/UserAdmin.tld" prefix="UserAdmin" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.naming.*" %>
    <%@ page import="com.sct.socrates.useradmin.model.UserAdminHome" %>
    <%@page import="javax.rmi.PortableRemoteObject"%>
    <html>
    <body>
    <pre>
    <%
    try {
    InitialContext context = new InitialContext();
    Object object1 = context.lookup("com.sct.socrates.useradmin.model.UserAdminHome");
    out.println(object1.getClass().getName());
    Object object2 = PortableRemoteObject.narrow(object1, UserAdminHome.class);
    out.println(object2.getClass().getName());
    if (object2 instanceof UserAdminHome) out.println("is instance");
    Class[] list = object2.getClass().getInterfaces();
    for(int i=0;i<list.length;i++)
    out.println(list.getName());
    UserAdminHome home = (UserAdminHome) object2;
    } catch (Exception e){
    e.printStackTrace();
    %>
    </pre>
    </body>
    </html>
    Here's the output from the JSP,
    com.sct.socrates.useradmin.model._UserAdminHome_Stub
    com.sct.socrates.useradmin.model._UserAdminHome_Stub
    com.sct.socrates.useradmin.model.UserAdminHome
    Here's the server output,
    FINE: for host 127.0.0.1 trying to GET /socrates/jsp/guest/test.jsp, ntrans-j2ee reports: mapped uri "/jsp/guest/test.jsp" in context "/socrates" to resource
    FINE: context = StandardEngine[null].StandardHost[server1].StandardContext[socrates]
    FINE: contextPath = /socrates
    FINE: wrapper = StandardEngine[null].StandardHost[server1].StandardContext[socrates].StandardWrapper[jsp]
    FINE: servletPath = /jsp/guest/test.jsp
    FINE: pathInfo = null
    FINE: SingleSignOn[server1]: Process request for '/socrates/jsp/guest/test.jsp'
    FINE: SingleSignOn[server1]: Checking for SSO cookie
    FINE: SingleSignOn[server1]: SSO cookie is not present
    FINE: Authenticator[socrates]: Security checking request GET /socrates/jsp/guest/test.jsp
    FINE: Authenticator[socrates]: Checking constraint 'SecurityConstraint[community]' against GET /jsp/guest/test.jsp --> false
    FINE: Authenticator[socrates]: Checking constraint 'SecurityConstraint[user]' against GET /jsp/guest/test.jsp --> false
    FINE: Authenticator[socrates]: Checking constraint 'SecurityConstraint[community]' against GET /jsp/guest/test.jsp --> false
    FINE: Authenticator[socrates]: Checking constraint 'SecurityConstraint[moderator]' against GET /jsp/guest/test.jsp --> false
    FINE: Authenticator[socrates]: Checking constraint 'SecurityConstraint[admin]' against GET /jsp/guest/test.jsp --> false
    FINE: Authenticator[socrates]: No applicable constraint located
    FINE: Authenticator[socrates]: Not subject to any constraint
    FINE: JspEngine --> /jsp/guest/test.jsp
    FINE: ServletPath: /jsp/guest/test.jsp
    FINE: PathInfo: null
    FINE: RealPath: E:\dev\app_server\sun\appserv\domains\domain1\server1\applications\j2ee-apps\socrates_3\socrates_war\jsp\guest\test.jsp
    FINE: RequestURI: /socrates/jsp/guest/test.jsp
    FINE: QueryString: null
    FINE: ++++ Entered SecClientRequestInterceptor::send_request()
    FINE: Security context is null (nothing to add to service context)
    FINE: No SAS context element found in service context list
    FINE: ++++ Entered SecClientRequestInterceptor::receive_reply
    FINE: No SAS context element found in service context list
    FINE: Status to be set : 0
    FINE: Invoked receivedReply()
    FINE: ++++ Entered SecClientRequestInterceptor::send_request()
    FINE: Security context is null (nothing to add to service context)
    FINE: No SAS context element found in service context list
    FINE: ++++ Entered SecClientRequestInterceptor::receive_reply
    FINE: No SAS context element found in service context list
    FINE: Status to be set : 0
    FINE: Invoked receivedReply()
    FINE: service-j2ee: name = "com.sct.socrates.useradmin.model._UserAdminHome_Stub", codebase = ""
    FINER: service-j2ee: (thread context class loader: WebappClassLoader
    available:
    delegate: false
    repositories:
    /WEB-INF/classes/
    required:
    ----------> Parent Classloader:
    EJB CL:
    [com.iplanet.ias.loader.EJBClassLoader$URLEntry@e1df6e, com.iplanet.ias.loader.EJBClassLoader$URLEntry@13b9fb]
    FINER: service-j2ee: class "com.sct.socrates.useradmin.model._UserAdminHome_Stub" found via codebase, defined by EJB CL:
    [com.iplanet.ias.loader.EJBClassLoader$URLEntry@e1df6e, com.iplanet.ias.loader.EJBClassLoader$URLEntry@13b9fb]
    FINE: ++++ Entered SecClientRequestInterceptor::send_request()
    FINE: Security context is null (nothing to add to service context)
    FINE: No SAS context element found in service context list
    FINE: ++++ Entered SecClientRequestInterceptor::receive_reply
    FINE: No SAS context element found in service context list
    FINE: Status to be set : 0
    FINE: Invoked receivedReply()
    FINE: service-j2ee: name = "com.sct.socrates.useradmin.model._UserAdminHome_Stub", codebase = ""
    FINER: service-j2ee: (thread context class loader: WebappClassLoader
    available:
    delegate: false
    repositories:
    /WEB-INF/classes/
    required:
    ----------> Parent Classloader:
    EJB CL:
    [com.iplanet.ias.loader.EJBClassLoader$URLEntry@e1df6e, com.iplanet.ias.loader.EJBClassLoader$URLEntry@13b9fb]
    FINER: service-j2ee: class "com.sct.socrates.useradmin.model._UserAdminHome_Stub" found via codebase, defined by EJB CL:
    [com.iplanet.ias.loader.EJBClassLoader$URLEntry@e1df6e, com.iplanet.ias.loader.EJBClassLoader$URLEntry@13b9fb]
    WARNING: CORE3283: stderr: java.lang.ClassCastException: com.sct.socrates.useradmin.model._UserAdminHome_Stub
    WARNING: CORE3283: stderr: at jasper.jsp._guest._test_jsp._jspService(_test_jsp.java:89)
    WARNING: CORE3283: stderr: at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
    WARNING: CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    WARNING: CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(Unknown Source)
    WARNING: CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(Unknown Source)
    WARNING: CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.service(Unknown Source)
    WARNING: CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.access$000(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve$1.run(Unknown Source)
    WARNING: CORE3283: stderr: at java.security.AccessController.doPrivileged(Native Method)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    WARNING: CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(Unknown Source)
    WARNING: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(Unknown Source)

    Please configure the classloader to delegate to the parent loader by specifying the following in WEB-INF/sun-web.xml (the Sun ONE Application Server specific deployment descriptor for web applications)
    <class-loader delegate="true"/>
    More information on this can be found at
    http://docs.sun.com/source/816-7150-10/dwdeploy.html#48102
    Thanks,
    Arvind

  • Managed bean inheritance best practice

    Hi!
    I'm new to JSF so I would like to apologize if my question is trivial, but I haven't been able to find proper solution.
    I'm using JSF 1.2 on WAS CE. I have a page where user can search for some entities, both person and company, which share some data, but have some different properties. Both inherit from entity class, so search results are displayed in dataTable as base entity objects. Each dataTable row has commandLink which should navigate user to specific (person or company) page for editing data. For example, if user clicks on commandLink in person data row, I would like to show personEdit page with all data set to components. I understand that I can use action to set navigation to proper page, and I have done so (following action() method). I have implemented EntityBean, PersonBean and CompanyBean:
    public class EntityBean {
        protected Entity entity;
        public int getId() {
            return entity.getId();
        public void setId(int id) {
            entity.setId(id);
        public String action() {
            // Some code which defines return value for action invoking.
        public void edit(ActionEvent event) {
            // Get entity data for edit.
    public class PersonBean extends EntityBean {
        public String getFirstName() {
            return ((Person)entity).getFirstName();
    public class CompanyBean extends EntityBean {
        public String getName() {
            return ((Company)entity).getName();
    }I tried combining action with actionListener method (+edit(ActionEvent event)+ method) invoked from commandLink, but if it is invoked on mapped entityBean, I get only entity properties set on any other page which is shown after invoked action. If method is invoked on i.e. personBean (same method, not overriden), I get NullPointerException for trying to access property for base entityBean.
    How should I invoke proper data initialization for bean shown on another page?
    Thanks in advance.

    Thank you for your quick reply. Beside the code for managed bean classes, here's the rest of the code for this specific problem.
    In faces-config.xml I have the following configuration:
         <managed-bean>
              <managed-bean-name>entitySearchBean</managed-bean-name>
              <managed-bean-class>entities.EntitySearchBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>personBean</managed-bean-name>
              <managed-bean-class>entities.PersonBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>entityBean</managed-bean-name>
              <managed-bean-class>legalentities.EntityBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>On my JSP, I have a dataTable loaded with entityBean objects, and the following code for showing editPage:
         <h:column>
              <h:commandLink id="editLink" action="#{entitySearchBean.editEntity}" actionListener="#{entityBean.edit}">
                   <h:outputText value="#{bundle.edit}" />
                   <f:param id="editId" name="editId" value="#{entity.id}" />
              </h:commandLink>
         </h:column>
    </h:dataTable>So, what I'm trying to do is to call entityBean.edit which should initialize EntityBean with entity data, and it sets i.e. person data to entity field of EntityBean class. I also call editEntity method on EntitySearchBean class (bean used just for searching entities with some criteria), and pass id property of selected entity in dataTable.
    What I'm expecting is to get personEdit.jsp with loaded personBean data initialized from actionListener on searchPage.jsp. Is it possible or is there some other way to do this?

Maybe you are looking for

  • Tables and structures are used in a standard scripts

    how to find which tables and structures are used in a standard scripts? pls explain step by step process... Edited by: abap on Jun 21, 2008 4:36 PM

  • Error logging problem:

    error logging problem: I would like to implement an error logger that will do the following tasks when a error/exception arrises: - surpress the DacfErrorPopupLogger - alert the user that an error has occured with a simplified popup (create a global

  • Assign PO Condition Type to Purchase Order Type

    Dear Gurus, I'm trying to assign a condition type which is currently not assigned to a specific PO type. Could anyone give me the flow of configuring PO Condition Types. Thank you VM Regards, Jin

  • No-ip dynamic DNS for routers that won't accept no...

    For those of you who have abandoned the hopeless BT hub and have gone for another router that doesn't offer no-ip as a dynamic DNS server (e.g. the Netgear DGN1000 router) there is a simple solution. Go to http://no-ip-duc.software.informer.com/4.0/

  • Grayscale problem

    our company has been having a problem opening certain pdf files in acrobat (8/9 both reader and standard.) we would either get a message that reads 'page out of range' or 'a drawing error occurred.' these files open perfectly fine in foxit pdf reader