Building JSF tag using existing Tags

Hi all
I wonder if it's possible to create a new JSF tag using existing JSF Tags?
For example, I have a JSF tag which renders a lable and a textinputfield, let's call it <f:field>
Now I want to build a new JSF tag, which will re-use the existing tag <f:field>. IS it possible?
Thanks in advance

Did you have a chance to look at facelets solution. Facelets provide several approach how to create composition components.
Sergey : https://ajax4jsf.dev.java.net

Similar Messages

  • I want to build android application using existing desktop dimension fla files. so for this I am resizing existing desktop dimension fla files to mobile dimension files but during resizing some files are resizing properly but most of the files the content

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

  • Can i use JSF tags and HTML tages Together

    i am trying to use html and JSf tages together. i hope it should owrk. but for me html tags are not working.
    can any one help me

    thanks
    its working but i have one more clarification
    can we wuse jsf tags in javascript
    for examp
    this my javascript using html
    newQuotCell1[0].innerHTML='<input type=text class=TextField name="nameofEmployer'+count1+'">';
    if i want to write a jsf tage there . does it allow
    i want to bind the textfield with bean value . Is it possibel.
    please let me know.
    thansk in advance

  • How we can use jsf tags in included jsp enclosed in subview tags

    Hello everybody,
    I am developing web app by using jsf. I am including a jsp page "header.jsp" into another jsp page "main.jsp". The header.jsp page is enclosed in jsf subview tag on main.jsp page. The header.jsp contains some static html code and some jsf tags like "outputText". When i added tag library url in header.jsp then my app was not even not initiating and i was getting following exception
    ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    16:22:16,890 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
    ....Now i removed jsf tag library url from included jsp "header.jsp" so now my app is running but only static html data is being displayed but the value in the jsf tag "outputText" is not being printed in the browser
    kindly help me. i would be very thankful....

    Your question has nothing to do with Sun Java System Directory Server.
    Please use the right forum(s).
    Thanks

  • Using JSP scriplets in the JSF tags

    Hi,
    I haven't done that much JSP development using various tag libraries prior to looking at JSF, hence this very basic question:
    I am declaring and manipulating Java variables in my JSP. Is there a way to access those in my JSF tags? It seems that something like:
    <%
    String myString="MyLabel";
    %>
    <h:view>
    <h:outputText id="myID" value="<%=myString%>" />
    </h:view>
    blows up in the JSF processor.
    I am porting some stuff to JSF and hence do not use backing beans in all cases.
    Any suggestions/ideas/pointers are greatly appreciated.
    Thanks in advance,
    Vadim.

    JSF action element attributes take JSF EL expressions, not Java expressions. A JSF EL expression has access to objects in one of request, session or application scope only, not to scripting variables. One way to get your example to work is by putting the String in one of these scopes within the scriptlet, e.g.:
    <%
      String myString="MyLabel";
      request.setAttribute("myString", myString);
    %>
    <h:view>
      <h:outputText id="myID" value="#{myString}" />
    </h:view>But, if you're porting a JSP-based application to JSF, I strongly recommend that you move all scriptlet code into beans; otherwise it's kind of pointless to migrate to JSF. The strength of JSF is its separation of UI layout and application logic.
    Even though JSP happens to be one way to wire up a JSF view with JSF components, JSF has very little to do with JSP. You need to understand the basic JSF component model, event-driven development, and use JavaBeans to really gain any benefits. Don't be fooled into believing that JSF is "just a new JSP tag library" by the support for JSP as the default presentation layer; it's far more than that, and I personally believe that using JSP as the presentation layer makes using JSF a lot harder than it should be. In fact, most of the issues posted in this forum are issues with the JSP layer, not with the core JSF components or the infrastructure classes.
    Hans Bergsten (EG member)

  • Using expressions in jsf tags

    I have a problem with using expressions in jsf tags! I know this
    topic was discussed before but it doesn`t work.
    I want to use the following jsf-code:
    <h:panel_data id="tab" var="vari" modelReference="Bean.varis">
    <h:output_text id="Id" modelReference="vari.id"/>
    <h:command_hyperlink id="hyper" href="next.jsp" label="Detail">
    <f:parameter id="Param1" name="id" value="vari.id"/>
    </h:command_hyperlink>
    </h:panel_data>
    The value of the parameter should have the value of vari.id!! Why doesn`t it work?? I also tried to use value="${vari.id}" and value=<%= vari.id %>.
    I have also changed the jsf_core.tld from
         <rtexprvalue>false</rtexprvalue>
    to
         <rtexprvalue>true</rtexprvalue>
    Does anybody know what to do? Where should the .tld-files be localized when i deploy the webapplication??

    On May 19th, 2003 HydraD == "HD" wrote:
    HD> I have a problem with using expressions in jsf tags! I
    HD> know this
    HD> topic was discussed before but it doesn`t work.
    HD>
    HD> I want to use the following jsf-code:
    HD>
    HD> <h:panel_data id="tab" var="vari" modelReference="Bean.varis">
    HD> <h:output_text id="Id" modelReference="vari.id"/>
    HD> ...
    HD> <h:command_hyperlink id="hyper" href="next.jsp" label="Detail">
    HD> <f:parameter id="Param1" name="id" value="vari.id"/>
    HD> </h:command_hyperlink>
    HD> </h:panel_data>
    HD>
    HD> The value of the parameter should have the value of
    HD> vari.id!! Why doesn`t it work?? I also tried to use
    HD> value="${vari.id}" and value=<%= vari.id %>.
    HD>
    HD> I have also changed the jsf_core.tld from
    HD>      <rtexprvalue>false</rtexprvalue>
    HD> to
    HD>      <rtexprvalue>true</rtexprvalue>
    HD>
    HD> Does anybody know what to do? Where should the
    HD> .tld-files be localized when i deploy the
    HD> webapplication??
    If you want your parameter's value to be pulled from the model, you must
    use modelReference instead of value. Try that and see if it works.
    Ed

  • Hiding conditional logic using JSF tags

    Hi
    I'm trying to encapsulate some logic which, dependent on a true / false validation, outputs either one component or another containing a value.
    For example...
    when the validation is true, output <h:selectOneMenu... containing all available values with selected value highlighted.
    when the validation is false, output <h:outputText... containing selected value.
    I've tried custom tags but I'm using this to write out very basic tags and I'd prefer to use the JSF HTML tags.
    The only option I can see is to write conditional logic in the JSPs to say:
    if valid = true
    <h:selectOneMenu...
    else
    <h:outputText...
    endif
    ...but this means the developers must do this for every occurrence and the pages contain lots of conditional logic.
    Is there any way to create a custom JSF tag which outputs JSF HTML tags as this seems to be what we want to do?
    Thanks D

    There is no tag for this, but every HTML component has a 'rendered' attribute which accepts a boolean expression. If it's outcome is true, then the component will be rendered, otherwise it will be hidden.
    Here are some basic examples:
    <h:someComponent rendered="#{myBean.booleanValue}" />
    <h:someComponent rendered="#{myBean.intValue > 10}" />
    <h:someComponent rendered="#{myBean.objectValue == null}" />
    <h:someComponent rendered="#{myBean.stringValue != 'someValue'}" />
    <h:someComponent rendered="#{!empty myBean.collectionValue}" />
    <h:someComponent rendered="#{!myBean.booleanValue && myBean.intValue != 0}" />
    <h:someComponent rendered="#{myBean.stringValue == 'oneValue' || myBean.stringValue == 'anotherValue'}" />

  • JSF Tags value and valueRef

    Hey
    Does anybody know if these two attributes (value and valueRef) mean the same thing in the JSF tag libraries???
    I am the JWSDP tutorial and some of the examples use value but this does not exist as an attribute for that tag for example
    <f:selectitem itemLabel="Pear"
    value="#{currentFruits.pearSelected}" >
    The tag selectitem does not have a value attribute! it has valueRef and itemValue.
    Ta.

    Hi
    in 1.0_final there is only value-attribute
    cheers,

  • JSP ${} expressions in JSF tag attributes

    Does anyone know why the expert group decided not to allow ${} style expressions within JSF tag attributes? I understand that a different syntax is needed to implement the 'late binding' #{} expressions used to link input controls to form beans, but not why the JSF tags actually prevent the use of immediately evaluated ${} expressions for accessing variables in the page scope in JSP 2.0.
    I know there has been a lot of discussion about this and other threads mention a security loophole that would be opened up by allowing expressions like #{blah.${someProperty}}, but I'm not sure why this sort of thing would cause a problem. Is there any way to enable this behaviour, such as editing the JSF tag library descriptors to allow runtime expressions (horrible though that sounds)? Or perhaps another JSF implementation that supports both immediately evaluated and late-binding expressions? It seems a rather unnecessary restriction that is going to cause much confusion and mistyping for all...
    Thanks in advance,
    Keith.

    Thanks Adam, I see the problem now. It's a fairly obscure loophole but serious nonetheless. Of course, this problem could also be avoided by not using request parameters within JSF tags as it doesn't affect the majority of legitimate uses for expressions.
    I have to disagree with you about mixing ${} and #{} expressions though. The majority of developers will be used to writing ${} expressions in JSTL and JSP text and so will expect them to do work the same in JSF tags. Judging by the number of posts in this forum about being unable to use page scope variables in JSF tags this issue is already confusing a lot of people.
    As a rule of thumb, "use ${} for expressions that are output to the page and #{} for binding controls to backing beans and invoking methods" (which perform clearly distinct functions) is a lot simpler and easier to learn IMHO than the current one, which is "use ${} for expressions that are output to the page except within a JSF tag, where you use #{} for the same thing and also to update form values and invoke action methods"! (OK, I'm exaggerating a little for effect, but you get the point... :-)
    I agree that mixing both types of expression in the same attribute might be a little confusing, but this is an unlikely edge case that should probably be prevented in value binding or action attributes anyway. It's more of an issue for label values where mistyping one for the other is already very common and, although not especially difficult to debug, is just another pitfall awaiting the unwary JSP developer. I'm not sure that JSP expressions would be much more difficult to debug anyway as the value and method bindings will simply not work, which is pretty obvious as soon as you try and test the thing.
    Is this something that the EG would be prepared to reconsider for the next release of JSF, or perhaps getting the security loophole addressed in the next JSP spec? In the meantime, is there any reason that developers shouldn't enable runtime expressions in the TLD file provided that they're willing to live with the consequences?
    (Sorry to harp on about it, but I've already had several complaints about this after recommending JavaServer Faces for a major development project at ingenta.com.)
    Many thanks,
    Keith.

  • Exception when running JSF Tags

    Hi,
    I am using MyEclipse 5.0.1 GA and jboss-4.0.3SP1. I am trying out a small JSF tag where the command button is not getting displayed and if i click the refresh button three i am getting this error. could anyone tell me what exactly the problem is.
    Exception
    org.apache.jasper.JasperException: /one.jsp(11,4) No tag "form" defined in tag library imported with prefix "f"
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:196)
         org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1308)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         org.apache.jasper.compiler.Parser.parseBody(Parser.java:1793)
         org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
         org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    one.jsp
    <%@ page contentType="text/html" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <body>
    This is my JSF page. <br>
    <f:view>
    <f:form>
         <h:commandButton id="cmd" action="" value="Submit" />
    </f:form>
         </f:view>
    </body>
    </html>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config >
         <application></application></faces-config>

    No tag "form" defined in tag library imported with prefix "f"This error is clear and correct: the tag library defined with the prefix f does not have a tag named form. So you cannot use <f:form>. Likely you intended <h:form>.

  • JSF tags are not rendered in error page

    I have configured error page for HTTP 404 error in web.xml like this
    <error-page>
    <error-code>404</error-code>
    <location>/Common/error.jspx</location>
    </error-page>
    Faces Servlet is configured as follows
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    My error page (error.jspx) looks like this
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html" xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:tr="http://myfaces.apache.org/trinidad" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <html>
    <head>
    <title>Error Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </head>
    <body id="b1">
    <h4 style="color:red">An Error Occured. Please click Back button or Signout.</h4>
    <input type="button" value="Back" onclick="history.back()"/>
    <tr:commandButton id="cb1" text="SIGN OUT" action="exit" actionListener="#{Login.LogOut}"/>
    </body>
    </html>
    </jsp:root>
    When I deploy application and run into 404 error, page displays error message with only Back button. I don't see SingOut button. I have checked url and it follows /faces/* pattern. Still to double check, I made a change and configured servlet mapping in web.xml as
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>
    Still commandButton is not rendered. I understand that my error page don't have access to FacesContext or not going through Faces Servlet. I know this is a small issue, but couldn't figure out what can be done. I have also tried using .xhtml and .jsf as per googled suggestion. But no luck
    I have tried different solutions to my problem and googled for solutions. But I couldn't get it resolved.
    So can you please provide any suggestions...
    Edited by: user1818355 on May 22, 2013 2:29 PM

    I think my faces servlet is configured to handle URLs having /faces/* pattern. I don't have any folder named with faces but I can access all my web pages which have /faces/ in their url. All jspx pages in application are configured in task flows. So I think they have access in FacesContext. But error page is configured in only web.xml and some how it is missing access to FacesContext and not rendering JSF tags. Any help?

  • Replace JSF tag by an own tag

    Hi,
    I'm trying to replace a <h:inputText> by my own tag. The used HtmlInputText component should not be replaced.
    The reason is, that i want to pass permissions to the tag and map them to readonly and rendered attributes. My Problem is, that my own tag doesn't reolv bean values. If i use the <h:inputText> the bean values show up correctly. If i use my own tag, the input text shows "#{myBean.value}".
    What could be the problem?
    Thx in advance
    Henrik
    Here is my tag:
    import javax.faces.component.UIComponent;
    import javax.faces.component.html.HtmlInputText;
    import javax.faces.context.FacesContext;
    import javax.faces.webapp.UIComponentTag;
    import com.arvato.jsf.security.JSFSecurity;
    import com.arvato.jsf.security.Permissions;
    import com.sun.faces.taglib.html_basic.InputTextTag;
    public class ArvatoTextFieldTag extends InputTextTag {
        private String role;
        private String onkeypress;
        private String id;
        private String value;
        public String getRole() {
            return role;
        public void setRole(String permissions) {
            this.role = permissions;
        protected void setProperties(UIComponent component) {
            super.setProperties(component);
            if(id != null) {
                component.getAttributes().put("id", id);
            if(onkeypress != null) {
                component.getAttributes().put("onkeypress", onkeypress);
            if(value != null) {
                component.getAttributes().put("value", value);
            if(role != null) {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Permissions p = JSFSecurity.getInstance().getPermissionsForRole(role, facesContext);
                if(!p.isWritable()) {
                    component.getAttributes().put("readonly", true);
                if(!p.isReadable()) {
                    component.getAttributes().put("rendered", false);
            } else {
                component.getAttributes().put("readonly", false);
                component.getAttributes().put("rendered", true);
        @Override
        public String getComponentType() {
            return "javax.faces.HtmlInputText";
        @Override
        public String getRendererType() {
            return null; // no standalone renderer
        @Override
        public void release() {
            super.release();
            role = null;
        public String getValue() {
            return value;
        public void setValue(String value) {
            this.value = value;
        public String getOnkeypress() {
            return onkeypress;
        public void setOnkeypress(String onkeypress) {
            this.onkeypress = onkeypress;
        public String getId() {
            return id;
        public void setId(String id) {
            this.id = id;
    }and my tld definition:
    <taglib>
       <tlib-version>0.03</tlib-version>
       <jsp-version>1.2</jsp-version>
       <short-name>arvato-jsf</short-name>
       <uri>http://arvato.com/jsf/component/tags</uri>
       <description>Arvato JSF tags</description>
       <tag>
          <name>textfield</name>
          <tag-class>com.arvato.jsf.tag.ArvatoTextFieldTag</tag-class>
          <attribute>
             <name>id</name>
          </attribute>
          <attribute>
             <name>role</name>
          </attribute>
          <attribute>
             <name>value</name>
          </attribute>
          <attribute>
             <name>onkeypress</name>
          </attribute>
       </tag>
    </taglib>

    In the setProperties method, you've got to resolve the valuebinding (#{blah.whatever}) to get the actual value. But you only want to do that if the attribute is set to a valuebinding.
    Here's an example:
          * @see javax.faces.webapp.UIComponentTag#setProperties(UIComponent)
         protected void setProperties(UIComponent component) {
              super.setProperties(component);
              //Set the field reference property
              if (fieldRef != null) {
                   if (UIComponentTag.isValueReference(fieldRef)) {
                        ValueBinding vb = getFacesContext().getApplication().
                             createValueBinding(fieldRef);
                        component.setValueBinding("fieldRef", vb);
                   } else {
                        component.getAttributes().put("fieldRef", fieldRef);
         }This example shows how to determine if the "fieldRef" attribute is a value binding, and extracts the value accordingly. But there's one more step. In your component class, or anywhere you access the attributes of your custom tag, use the following code:
         public String getFieldRef() {
              if (fieldRef != null)
                   return fieldRef;
              ValueBinding vb = getValueBinding("fieldRef");
              if (vb != null)
                   return (String)vb.getValue(getFacesContext());
              else
                   return null;
         }The above snippet is what you would put in your custom component getter method.
    JSF is open source. Something I found very helpful while learning how to create custom components was looking at how the JSF developers created theirs. You should go ahead and download the JSF source code.
    CowKing

  • Horizontal line with jsf tag

    Hi,
    i need following pattern:
    text (horizontal line)
    text (horizontal line)
    and so on....
    i use
    <h:outputText value="Text"/><h:outputText value="___" style="vertical-align:super;"/>it works, but now i need the line thicker.
    can i expand this code with some css?
    or is there any other solution with jsf-tag?

    Use the CSS border property. This has not much to do with JSF, but just with basic HTML/CSS knowledge.

  • How to run generated JSF tags ?

    I am beginner in JSF. I would like execute JSF tags generated dynamically by XSLT, but in the JSP page,
    these tags are not interpreted. Does anyone has the solution ? Thanks a lot.
    Example below is only a simple test,
    ResearchBean.java :
    public String researchAction() {
        // Actually, htmlResponse is the output string after the XSLT transformation, and it contains JSF tags
        htmlResponse = "<h:outputText value=\"Text\"/>";
        return "response";
    }response.xhtml :
    <f:view xmlns:f="http://java.sun.com/jsf/core
    xmlns:h="http://java.sun.com/jsf/html
    <html>
    #{researchBean.htmlResponse}
    </html>
    </f:view>In the page received by the browser, <h:outputText value="Text"/> isn't replaced by the html code.
    Edited by: wondergarance on Jul 2, 2009 1:24 PM

    The JSF tags are apparently generated after the FacesServlet has done its work. You in fact need to pass the generated output through the FacesServlet again. If you're using a servlet/filter to run XSLT, you need to run it before the FacesServlet kicks in. You can control the servlet/filter invocation order in the web.xml.

  • Jsf 1s phase of life cycle how knows ths components of the jsp with jsf tag

    i wish to know how faces servlet knows the jsp s view components while creaTI NG component tree at first request to input jsp which may have jsf tags.in the first phase faces servlet doesnot know input jsp with jsf tags what componnets it has. it is actually atthe response send or forward time which is the final phase when the tag ge executed and output is sent to client.i did understandin jsf life cycle in 1 st phase component tree is created at first request in 1 st phase .

    Hi,
    though a FacesContext holds the values used by a request, it doesn't mean it lives for as long as the request. The best explanation I found is from the JavaDocs
    release
    public abstract void release()
    +Release any resources associated with this FacesContext instance. Faces implementations may choose to pool instances in the associated FacesContextFactory to avoid repeated object creation and garbage collection. After release() is called on a FacesContext instance (until the FacesContext instance has been recycled by the implementation for re-use), calling any other methods will cause an IllegalStateException to be thrown.+
    The implementation must call setCurrentInstance(javax.faces.context.FacesContext) passing null to remove the association between this thread and this dead FacesContext instance.
    Throws:
    java.lang.IllegalStateException - if this method is called after this instance has been released
    Frank

Maybe you are looking for