JSF facelet parm into bean

Hi,
I am having one requirement. I need to pass the param value to the backing bean like
<ui:include src="/template/common/commonHeader.xhtml">
                         <ui:param name="tagLine" value="JSF value"></ui:param>
                    </ui:include>
I need to pass the param value to some backing bean. How can we do this?
I am able to pass to other xhtml... like
<ui:composition>
               <h1>This is default header</h1>
               <h2>Tag Line : #{tagLine}</h2>
     </ui:composition>

I got from some forum like
<ui:insert>
<ui:include src="#{PopUpBean.includeUrl}">
<ui:param name="includeParam" id="includeParam" value="HalloWert!" />
</ui:include>
</ui:insert>
HtmlOutputLabel ob = (HtmlOutputLabel) UiTreeWalker.findComponent(FacesContext.getCurrentInstance().getViewRoot(), "hiddenValue");
ValueExpression vb = ob.getValueExpression("value");
Object value = vb.getValue(FacesContext.getCurrentInstance().getELContext());
But I don't know how to put and where to put?

Similar Messages

  • JSF CDI : Conversation scope bean[s] best practice

    *JSF CDI : Conversation scope bean[s] best practice*
    Hello, im currently learning about JSF 2.0 and im so glad for the existence of this conversation scope feature, which is very helpful in opening a new tab or a new window on the same page and having separate resources, not overriding one another.
    But im curious on how to implement this in a good way, about when to start the conversation and when to close it.
    In my case, i have each CDI bean for each JSF page. And let's say that i have a menu, and when it's clicked, this will lead to page A, and from A, could lead to B, B could lead to C, C could lead to D, all these 4 pages are connected in one chain.
    Accessing A's bean properties from B or C or D beans is possible, accessing B's properties is also possible from C or D beans and so forth.
    Now im quite confused about :
    * whether all these A B C D should be in conversation scope or not, or perhaps just A ? Because i think sometimes from another page that is outside the ABCD chain, like a page F, it could navigate to page B, although i dont know how to supply the data to the bean B yet.
    * whether all these A B C D should be combined into one bean
    * where and when to start the conversation, im thinking about the constructor, but i dont think it's a good idea, because i prefer starting the conversation when first accessing the page, not the bean
    * where and when to stop the conversation, so that there wont be unused resources hanging around
    Regards,
    Albert Kam

    There are also some commandButtons on the view page, which performs actions on Product object, fetched by passed ID.

  • How to get the current JSF phase in backing bean?

    How to get the current JSF phase in backing bean?
    Edited by: jimmy6 on Nov 27, 2007 7:27 AM

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • Intigrate JSF 2.0 into JDev 11.1.2.1 Application

    My WLS 10.3 administrator called with a request. He asked if I could ingetrate the JSF 2.0 library into my JDev 11.1.2.1 application so that he would not have to install JSF 2.0 on the WLS (a new WLS maching that he will soon be setting up). He said that WLS comes with JSF 1.2 and that he would need to install JSF 2.0 and that it is very painful.
    Can I integrate JSF 2.0 into my application and avoid having to install JSF 2.0 in the new WLS being set up?
    Would it make any since to do so?
    Why does WLS come with JSF 1.2 rather than JSF 2.0?
    Thank you, Steve

    JSF 2.0 is only one part of the adf framework. You need a lot more. All this is done when you (or your admin) installs the adf runtime needed for your version. Let me say it again:
    To run an ADF Application on a wls server without the adf runtime installed will not work!
    Putting all adf libs in the ear isn't a solution either! Ear would grow too big and you still have to to some wiring to make it work.
    Installing the adf runtime is done with an installer. How hard is it to execute an installer?
    In case of 11.1.2.1 your admin first needs to install the adf runtime 11.1.1.6, then you need two patches which you get via support, and install the patches.Installing all this should not take longer than a couple of hours for a simple WebLogic server. IF you are running a whole farm with many servers it takes longer.
    Again, if you want to run adf application on a wls you must install the adf runtime on the wls!
    Keep in mind that there is a strong relationship between wls version, jdev version and adf runtime version. They must match, otherwise you get errors at some point. For a list of these version refer to my blog http://tompeez.wordpress.com/2011/09/14/jdeveloper-versions-vs-weblogic-server-versions/
    Timo

  • Html check box pass more than one value into bean

    Hi all'
    I have group of check box in html , I need to pass more than one value
    into bean an ddisplay in jsp
    what do i do wrong
    private Vector select =new Vector();
      private String mybox =null;
      public download() {
         again(); 
      /* Accessor Methods */
    private void addmybox(String name){
        select.addElement(name);}
    public void setMybox(String name) {
         mybox = name;
    public String[] getMybox() {
         String[] s = new String[select.size()];
         select.copyInto(s);
         return s;
            in my htmli have <%
         String[] mybox= format.getMybox();
         for (int i=0; i<Mybox.length; i++) {
             <%= format.getMybox%>
    %>
    i got error at <%= format.getMybox[i]%>

    Hi ram,
    thank you, I don't have ideal in my mide .
    in my jsp I have
    <td>  <input type=checkbox name=mybox value=<%= link.getNewNum()%>></td>in my servlet I have something like
    String[] checked = request.getParameterValues("mybox");
            try {
            conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433","A#$","RE@89");
            conn.setCatalog("sequences");  
          stmt = conn.createStatement();  
           for(int i=0; i<checked.length; i++){
                   String select=checked;
    String Sql=" select NewNum, Name, Length, Segment, Sequence";
    Sql+=" from Sec04";
    Sql+=" where NewNum='"+select+"'";
    Sql+=" union";
    Sql+=" select NewNum, Name, Length, Segment, Sequence";
    Sql+=" from MySec";
    Sql+=" where NewNum='"+select+"'";
    Sql+=" union";
    Sql+=" select NewNum, Name, Length, Segment, Sequence";
    Sql+=" from Sec03";
    Sql+=" where NewNum='"+select+"'";
    Sql+=" union";
    Sql+=" select NewNum, Name, Length, Segment, Sequence";
    Sql+=" from Sec02";
    Sql+=" where NewNum='"+select+"'";
    Sql+=" union";
    Sql+=" select NewNum, Name, Length, Segment, Sequence";
    Sql+=" from Sec01";
    Sql+=" where NewNum='"+select+"'";
    rs = stmt.executeQuery (Sql);
    while(rs.next()) {              
    String Name = rs.getString("Name");
    String Segment =rs.getString("Segment");
    String Length = rs.getString("Length");
    String Sequence = storeSequenceData(rs.getString("Sequence"));
    String SContent = Name + " ," Segment ", "+ Length + "\n" +Sequence  ;
    now I want
    String SContent = Name + " ," +Segment + ", "+ Length +  "\n" +Sequence  +"\n" + Name+"Segment+","+length+"+"\n" +Name......untill the end
    it sees like I need to look st on shipp car. is that right??
    Thank you !!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • [HOWTO] JSF + Session Facade + Entity Bean (EJB3)

    I'm trying to find a tutorial that shows the advisable way to use JSF with EJB 3 entity beans using the Session Facade pattern (?), but the only tutorials around show very basic usage of JSF (validation, conversions etc.).
    The only thing that is close is this: http://forum.java.sun.com/thread.jspa?threadID=5122284 but still not what I'm looking for.
    Is there any documentation available out there..?
    Message was edited by:
    HakelRausd

    Hi,
    I updated the online doc in blueprints solutions catalog with a small explanation of using JSF with EJB Session Bean at https://blueprints.dev.java.net/bpcatalog/ee5/persistence/ejbfacade.html
    I will add an image soon too. The basic idea for JSF and EJB3 programming model is
    JSF Page --> JSF Managed Bean(backing bean) --> Session Bean --> Java Persistence Object.
    In general, ther would be several JSF pages,and several JSF Managed Beans, and several Java Persistence Objects, but fewer Session Beans. The Session Bean would be expected to be shared and accessed by several managed beans with with Session Bean serving as a facade to the Java Persistence Objects, so there would be few Session Beans.
    The Session Bean would usually be a local Session bean and would only be remote if-and-only-if you wanted RMI-IIOP access. Usually web components like Servlets and JSF Managed Beans use local access to the Session Beans and the access is within the same VM, no remoteness.
    Most of the time, the Session Bean would be a Stateless Session Bean, and would not be a Stateful Session Bean.
    hth,
    Sean

  • Possible to aggregate multiple JSF custom actions into a single action?

    I'm wondering if it's possible to aggregate multiple JSF custom actions into a single action? For example, I have a JSF custom tag/renderer named selectOneMenuStateAbbreviation that displays a drop down list of state abbreviations. This tag allows a user to select a state abbrevation from the list.
    What I want to do is create another custom tag/renderer and call it inputAddress. The inputAddress tag, will consist of text boxes for street address, city, and zip code. I want to make it so that the state abbreviation custom tag that I already wrote is imbedded in this tag/renderer as well.
    Does anyone know if this is possible? Or, would I have to just duplicate the code that I already have in my other custom action?

    I would assume so, but, I don't know how. Can I do it using just tags and renderers, or, would I need to create a custom UI component as well? One tag would have to be a child of the other correct? I don't know how to do this in Java code. Does anyone know of example code that shows how to do this?
    Jon

  • JSF Facelets tutorials

    hi,
    I am learning JSF technologies currently and my project is JSF Facelets technology. I searched in the web for online facelets tutorials but found a little resources.
    I will be highly appreciated if any of you provide me some good tutorial links with examples...
    many thanks,
    Sudheesh K S
    I

    Please go through the following links:
    http://www.ibm.com/developerworks/java/library/j-facelets/
    http://www.ibm.com/developerworks/opensource/library/os-ad-derbymyfaces/
    https://facelets.dev.java.net/nonav/docs/dev/docbook.html

  • Problem with default converter in JSF facelet

    Hello,
    I stuck with strange JSF java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer, when I try to use abstract class with generic. My code:
    ObjectClass.java
    public abstract class ObjectClass<T> {
        public abstract T getFieldValue();
        public abstract void setFieldValue(T fieldValue);
    }IntClass.java
    public class IntClass extends ObjectClass<Integer> {
        private Integer fieldValue;
        public Integer getFieldValue() {
            return fieldValue;
        public void setFieldValue(Integer fieldValue) {
            this.fieldValue = fieldValue;
    }TestBean.java
    @ManagedBean(name = "TestBean")
    public class TestBean {
        private IntClass intClass = new IntClass();
        public IntClass getIntClass() {
            return intClass;
    }test.xhtml
            <h:form>
                <h:outputLabel value="Integer value:" />
                <h:inputText value="#{TestBean.intClass.fieldValue}" />
                <h:commandButton type="submit"  value="Set" />
            </h:form>When I try to enter numeric value into a field and submit, I get java.lang.ClassCastException error:
    javax.faces.component.UpdateModelException: javax.el.ELException: /test.xhtml @16,68 value="#{TestBean.intClass.fieldValue}": java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
         at javax.faces.component.UIInput.updateModel(UIInput.java:839)
         at javax.faces.component.UIInput.processUpdates(UIInput.java:722)
         at javax.faces.component.UIForm.processUpdates(UIForm.java:270)
         at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1108)
         at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1108)
         at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1239)
         at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
         at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
         at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.el.ELException: /test.xhtml @16,68 value="#{TestBean.intClass.fieldValue}": java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
         at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:132)
         at javax.faces.component.UIInput.updateModel(UIInput.java:805)
         ... 33 more
    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
         at test.IntClass.setFieldValue(IntClass.java:3)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at javax.el.BeanELResolver.setValue(BeanELResolver.java:381)
         at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:386)
         at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:100)
         at com.sun.el.parser.AstValue.setValue(AstValue.java:197)
         at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:286)
         at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:124)
         ... 34 moreWhen I remove [extends ObjectClass<Integer>] from class IntClass, or when I explicitly add IntegerConverter to inputText component, everything works fine. Can someone tell me, what's the problem here? Thanks.
    vide

    That looks like a doozy. My first thought is that it has something to do with reflection but that doesn't tell me what to do about it. I would consider taking it to the Mojarra development mailing list or even filing a bug report.

  • Can I install JSF 1.2 into Glassfish 3.0?

    Glassfish v3 was released today!!! YAY! Servlet 3.0!
    However our company is heavy into JSF 1.2 (via Facelets and Richfaces) and we cannot migrate to JSF 2.0 for a couple months. And before we can really use JSF 2.0 we need Richfaces 4.0 to be released as well.
    So what we basically need is Glassfish v3 with the previous version of JSF.
    Any help on how to do this?
    Thanks
    Ravi

    Yes, you can use JSF 1.2 with V3, but you have to do some extra work to do so.
    First, each 1.2-based application that you wish to deploy to V3 will need to include the
    JSF 1.2 libraries (i.e. you can't install them globally).
    Secondly, each 1.2-based application will need to include a sun-web.xml in
    the WEB-INF directory of said application. The contents of the sun-web.xml
    should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD GlassFish
    Application Server 3.0 Servlet 3.0//EN"
    "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
    <sun-web-app>
    <class-loader delegate="false"/>
    <property name="useBundledJsf" value="true"/>
    </sun-web-app>/

  • 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.

  • To add components in JSF page from backing bean

    I am trying to display list of available files under a directory using HtmlSelectOneMenu. In constructor of backing bean i have the following code
    directory = new File("C:\\files");
        files = directory.list();
        String[] fileList = this.getFiles();
        List valueList = new ArrayList();
        for (int i=0; i < fileList.length; i++) {
            SelectItem item = new SelectItem(fileList);
    valueList.add(item);
    UISelectItems items = new UISelectItems();
    items.setId("items"+sessionVariable);
    items.setValue(valueList);
    listbox = new HtmlSelectOneMenu();
    listbox.setId("listbox"+sessionVariable);
    listbox.getChildren().add(items);
    getPanelGrid1().getChildren().add(listbox);
    and my jsf looks like this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Employee</title>
    <link type="text/css" rel="stylesheet" href="resources.css"/>
    <style type="text/css">
    body {
    background-color: #ffffff;
    a:link { color: #000000; }
    </style>
    </head>
    <body><h:form binding="#{backing_SampleEdit.form1}" id="form1">
    <h:panelGrid columns="2" binding="#{backing_SampleEdit.panelGrid1}"
    id="panelGrid1" >
    <h:outputLabel value="Template Name"
    binding="#{backing_SampleEdit.outputLabel1}"
    id="outputLabel1"/>
    </h:panelGrid>
    </h:form></body>
    </html>
    </f:view>
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_SampleEdit--%>
    I am getting an exception like "Cant instantiate the class exception"..
    please help me out in this..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The Stacktrace looks like this
    SEVERE: Managedbean backing_SampleEdit could not be created Can't instantiate class: 'com.backing.SampleEdit'.. class com.backing.SampleEdit : java.lang.NullPointerException
    javax.faces.FacesException: Can't instantiate class: 'com.backing.SampleEdit'.. class com.backing.SampleEdit : java.lang.NullPointerException
         at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:229)
         at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:282)
         at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:97)
         at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:145)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:166)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:406)
         at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1019)
         at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1046)
         at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:761)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:451)
         at com.sun.faces.taglib.html_basic.FormTag.doStartTag(FormTag.java:345)
         at SampleEdit.jspService(_SampleEdit.java:60)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
    Caused by: java.lang.ClassNotFoundException: class com.backing.SampleEdit : java.lang.NullPointerException
         at java.beans.Beans.instantiate(Beans.java:208)
         at java.beans.Beans.instantiate(Beans.java:48)
         at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:223)
         ... 45 more
    Caused by: java.lang.NullPointerException
         at com.backing.SampleEdit.<init>(SampleEdit.java:53)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at java.beans.Beans.instantiate(Beans.java:204)
         ... 47 more

  • JSF + Facelets + Tomahawk: ExtensionsFilter not correctly configured.

    Hello,
    I want to use JSF with facelets and tomahawk...
    I have a standard facelets configuration like the demo on their website...
    But at the moment, there is a tomahawk component in one of the pages I get the following error:
    java.lang.IllegalStateException: ExtensionsFilter not correctly configured. Resource mapping missing. Resources cant be delivered. Please see: http://myfaces.apache.org/tomahawk/extensionsFilter.html
    I googled the entire internet (two times), but nothing helps...
    I'm using Glassfish v2.1
    My web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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"
             version="2.5">
        <welcome-file-list>
            <welcome-file>welcome.jsp</welcome-file>
        </welcome-file-list>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</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>*.jsf</url-pattern>
        </servlet-mapping>
        <filter>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>maxFileSize</param-name>
                <param-value>20m</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
        </filter-mapping>
        <error-page>
            <error-code>500</error-code>
            <location>/errors/fatal.jsf</location>
        </error-page>
    </web-app>It didn't work with the JSF RI or MyFaces.
    Hoping, somebody could help me.

    I think you need the following additional mapping:
        <filter-mapping>
            <filter-name>MyFacesExtensionFilter</filter-name>
            <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
        </filter-mapping>

  • WebLogic 12.1.2 fails when injecting extension in jar into bean in same jar

    WebLogic 12.1.2 fails when deploying a web application that contains a jar in which an extension is injected into a bean that resides within that same jar. The following exception is thrown:
    "weblogic.management.DeploymentException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]"
    weblogic.management.DeploymentException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]
      at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:260)
      at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      Truncated. see log file for complete stacktrace
    Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
      at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
      at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
      at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
    The problem can be easily reproduced by a minimal case with the following structure:
    war-root
         WEB-INF
             beans.xml
             lib
                somejar.jar
    And with somejar.jar having the following structure:
    test
        ApplicationBean.java
        SampleExtension.java
    META-INF
        services
            javax.enterprise.inject.spi.Extension
        beans.xml
    ApplicationBean can looks as follows:
    @Named
    @ApplicationScoped
    public class ApplicationBean {
        @Inject
        private SampleExtension extension;
        @Inject
        private BeanManager manager;
        public void myMethod() {
            System.out.println("Extension:" + extension + " Manager:" + manager);
    And SampleExtension can be:
    public class SampleExtension implements Extension {
        public void onBeanDiscovery(@Observes AfterBeanDiscovery beanDiscovery, BeanManager beanManager) {
            out.println("Extension called");
    I published a minimal web application (as Maven multi-module project) that reproduces the case here: https://github.com/arjantijms/inject-extension
    This application runs fine on basically every other Java EE server (tried specifically JBoss EAP 6.1, GlassFish 4.0 and TomEE 1.5.2), but not on WebLogic 12.1.2.
    Note that I'm not really a WebLogic user. I'm an open source library writer who's trying to make our library (OmniFaces) to run on all Java EE implementations. This case is part of a functionality in our upcoming release.

    Hi,
    If it is war then try to apply following  Patch 13893259.
    Regards,
    Kal

  • Can existing JSF apps import into JSC

    I have a a number of existing JSF applications that were manually created (JSP,code, etc)musing JSF 1.0 FCS. I have tried to import these into the visual designer JSC to look at how they would display but it seems that the JSF tags are aways stripped out of the html. Does the JSC allow for maintaining exising JSF 1.0 apps using the JSC toolset?
    Some things that suggest that this is not the case are:
    1) JSC uses CSS-P rather than tables for page layout
    2) JSC uses xhtml rather than html/jsp
    So it seems that the choices are either use the JSC or manually write your app using an html editor and a java editor.
    Is this true???

    I would like to confirm if this is a known issue in JSF:
    I have a JSF project, that used to run perfectly, but now,
    java.lang.StackOverflowError javax.faces.el.EvaluationException: java.lang.StackOverflowError at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154) at javax.faces.component.UIOutput.getValue(UIOutput.java:147) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443) at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435) at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:440) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435) at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:600) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:537) at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460) at jsp_servlet._templates.__toplayout._jspService(__toplayout.java:483) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at jsp_servlet._navigation.__nav_mainmenu._jspService(__nav_mainmenu.java:194) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.lang.StackOverflowError
    My Project environment uses Weblogic 8.1, used Eclipse3.0 as the IDE and MyEclispe 3.8.2.
    After spending hours on trying to figure out the problem, I created a new weblogic domain and now it works fine..... On another forum I saw a posting by another person with a similar problem, but the app server used was Sun One.
    Can you please answer the following questions:
    Has this problem been identified before?
    Is there a reason as to why this is happening?
    If so what is the solution (besides creating new domains).
    Thanks,
    Vindya

Maybe you are looking for

  • APPLE = Fix iCal in Leopard!!!!!

    Hi, What did Apple do to iCal in Leopard? They broke it somehow. I had hard drive failure in powerbook. Replaced Hard drive, did new install of Leopard. Then installed Palm desktop 4.2 (newest from site). Setup Palm Treo 650 conduit in isync. It will

  • Multiple accounts, multiple devices, same computer

    I am so confused I don't even know how to ask this question. Please bear with me. My wife and i have an iMac OS X. She has an iPhone, iTouch, and MacBook. I have an iPod Classic and iTouch. Her MacBook is her home computer for devices. The iMac is my

  • Strange display fonts in Safari...

    What would account for fonts not displaying correctly in Safari? Sometimes sections of a web page appear as jumbled, random characters. Often, it will only be headlines, while the body copy displays correctly. I have my display fonts set to Helvetica

  • Mac DVD player plays all DVDs but this one

    A commercial DVD from Netflix will play on my tv, my MacBook Pro, and my old power Mac, but not on my intel Mac.  All other DVDs play on this Mac without a hitch.  Netflix has sent me 2 copies of this and neither works, yet all others work.  There ar

  • Parameter mapping for an action

    can anybody help me with this parameter mapping. how we can pass a parameter for an action. and how to use that parameter in the implemented coding.