Customer JSF Component Value Expression not work

why my customer tag not work,
in my jsp
<q:my formatString="yyyy/mm/dd" current="#{LoginBean.date}"></q:my>the isLiteralText() always return true, and I can't get the correct value, #{LoginBean.date} is returned.
bellow is my tag source.
can anyone help me.
package jsf;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentELTag;
public class MyCustomerTag extends UIComponentELTag {
    private String formatString;
    @Override
    public String getComponentType() {
        return "COMPONENT_TYPE";
    @Override
    public String getRendererType() {
        return "COMPONENT_TYPE";
    @Override
    public void release() {
        super.release();
        setFormatString(null);
    @Override
    protected void setProperties(UIComponent component)  {
        if (!(component instanceof UIDatePicker))
            throw new IllegalArgumentException("Component "+
                component.getClass().getName() +" is no UIDatePicker");
        component.setValueExpression("current", current);
        System.out.println(current.getExpressionString());
        System.out.println(current.isLiteralText());
        System.out.println((String) component.getAttributes().get("current"));
     * @return the formatString
    public String getFormatString() {
        return formatString;
     * @param formatString the formatString to set
    public void setFormatString(String formatString) {
        this.formatString = formatString;
    private ValueExpression current;
     * @return the value
    public ValueExpression getCurrent() {
        return current;
     * @param value the value to set
    public void setCurrent(ValueExpression current) {
        this.current = current;
}

I do not know what your native is, but there's quite a huge difference between "custom" and "customer". Look it up in your dictionary.

Similar Messages

  • Custom JSF component with custom value datatype

    I've created a simple custom JSF component with a decode, encodeBegin as follows:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        setSubmittedValue(value);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        String value = (String) getValue();
        if (null != value) {
             response.writeAttribute("value", value, "value");
        response.endElement("input");
    }With also:
    setRendererType(null);as part of the constructor.
    This component works just fine both inside and outside of a dataTable component, as expected.
    What I would like to do now is to replace the String value datatype with a custom class, for example MyDataType. For this I do:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        MyDataType myData = (MyDataType) getValue();
        MyDataType newData = (MyDataType) myData.clone();
        newData.setValue(value);
        // copy old object and only update the changed field of this object
        setSubmittedValue(newData);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        MyDataType value = (MyDataType) getValue();
        if (null != value) {
             response.writeAttribute("value", value.getValue(), "value");
        response.endElement("input");
    }Now this works perfect outside of a dataTable component, but inside it fails to update the property on the BB.
    Are there somewhere examples on how to properly use custom datatypes as values for UIInput components? Also how to only partially update the value (like I do, I only want to update the value field of the MyDataType object)

    Even if I encode the entire MyDataType via hidden input elements and decode it again (i.e. not using a cloned getValue) it's still not working side a dataTable.
    Could it have to do something with me using Facelets?

  • How to add properties to a custom JSF component?

    Hello, everybody!
    I've just developed my first custom JSF component. It's a data pager and it is working pretty well. But now I want to be able to use some of it attributes in my backing beans at runtime. I mean, I want to bind it to component in the JSF page. It already has a binding attribute in the tld file, but I want to be able to accesss two values that the renderer of my custom component calculate inside it, which would relieve me from calculating these values manually in the backing beans. So, I would like to know how to make these values external to the component.
    By now this is my custom pager class:
    import javax.faces.component.UICommand;
    public class UIPaginadorDados extends UICommand
    }You can see that it has no logic because all the logic is in the renderer class:
    import javax.faces.render.Renderer;
    public class PaginadorDadosRenderer extends Renderer
        // logic here
    }As I said I want to be able to do the following in my backing beans:
    private UIPaginadorDados pager = new UIPaginadorDados();
    // and later...
    pager.getCurrentPage();
    pager.getPageCount();In the JSF page:
    // I already can do this, because I have a binding attribute
    <urca:paginadorDados binding="#{backingBean.pager}" />I suppose that I'll have to create the properties getCurrentPage() and getPageCount() in the component class, UIPaginadorDados, but I don't know how to get the values to the properties from the renderer class. I don't even know if this is how I should do it.
    So I would appreciate a lot your help about this subject.
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    RaymondDeCampo wrote:
    I neglected to mention: do not forget to implement the methods in StateHolder to preserve the properties you added to your component.Hello, Raymond. Could you elaborate a little more on that? If you could give a short example, it would be helpful.
    MarcosNo problem. I have already found out how.
    Thank you very much, Raymond.
    Marcos

  • Creating a custom JSF Component

    Hi,
    I am trying to create a custom JSF Component. My ultimate goal is to pass a bean to my custom component and have the component render some HTML output based on the info contained in the bean. Before I attempt that I am trying to get a simple custom component to just work. This component is based on the tutorial found here: http://www.jsftutorials.net/components/index.html
    This tutorial just creates a component that outputs a <div> tag around the body contents of the custom component.
    To keep this short I have done the following items from the tutorial link above:
    1) I have created the tld file defining the tag class, name, uri and shortname
    2) I have also created the tag class called TickerTag.java along with the component class UITicker.java. These classes are straight copy-and-paste jobs from the tutorial link and compile fine.
    3)My faces-config.xml file has the proper component definition of
    <component>
    <component-type>ticker</component-type>
    <component-class>ticker.UITicker</component-class>
    </component>
    This was the easy part. The example then goes on to use the custom component in a JSP page. I managed to get the custom component to work in a JSP page BUT my problem is getting the custom component to work in an XHTML file.
    I thought all I had to do was define an xml namespace using the uri from my tld file like so:
    Note: My uri is www.fubar.com/tags and is defined in the tld file.
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:t="http://myfaces.apache.org/tomahawk"
    xmlns:u="http://www.fubar.com/tags">
    I then try to use the tag like so <u:ticker> <f:verbatim>Hello JSF Component</f:verbatim></u:ticker>
    I am expecting the following output: <div>Hello JSF Component
    </div>
    but instead I get
    <u:ticker>Hello JSF Component</u:ticker>
    It seems the tag is not even processed. This is my first jump into custom components. I have done custom JSP tags in the past but I never tried to display them on an XHTML page.
    If you are wondering why I am using XHTML pages, this was setup a while back by a previous developer. Changing everything to a JSP would take a long time and probably break some stuff I am not aware of yet. As such the web.xml file of this JSF web app has the following:
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    So all *.jsf files are processed and sent to the corresponding .xhtml file.
    I have looked up creating custom components on google and every last example uses their newly created components in a jsp file. No XHTML uses so far.
    Below are my tld files and xhtml file if that helps:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>u</short-name>
    <uri>http://www.fubar.com/tags</uri>
    <tag>
    <name>ticker</name>
    <tag-class>ticker.TickerTag</tag-class>
    <body-content>JSP</body-content>
    </tag>
    </taglib>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:t="http://myfaces.apache.org/tomahawk"
    xmlns:u="http://www.fubar.com/tags">
    <html>
    <head>
    <title>Show Custom Component</title>
    </head>
    <body>
    <f:view>
    <u:ticker> <f:verbatim>Hello JSF Component</f:verbatim></u:ticker>
    </f:view>
    </body>
    </html>
    Any suggestions/help are much appreciated,
    Nick
    </div>

    Thanks Ray. I'll take a look at that site.
    I managed to figure out my problem. I never created a .taglib.xml file that reference the component I defined in the faces-config.xml file. Once I did that everything work perfectly.
    I managed to use this forum post as a guide.
    http://osdir.com/ml/java.facelets.user/2006-12/msg00042.html
    I hope this helps anyone else.
    Nick

  • Create a custom JSF component

    Hi,
    I want to create a custom JSF component. I've setup a new application containing 2 projects:
    - a 'components' project, containing all the custom components
    - a 'view' project, to test the created custom components.
    There is dependency between the components project and the view project. In the view project, I added the
    the Tld, in order to use my components in the project.
    From the component palette, I can drop a component onto a .jspx page but after running the page, no output
    is printed onto the screen. The HTML source code only contains my 'tag-name' (eg: <ctb:mytag/>)
    Am I doing something wrong?
    UIComponent:
    import java.io.IOException;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    public class BasicComponent extends UIComponentBase {
        public String getFamily() {
            return "BasicComponent";
        public void encodeBegin(FacesContext context) throws IOException {
            ResponseWriter out = context.getResponseWriter();
            out.write("Hello World");
    }Tag
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentTag;
    public class BasicComponentTag extends UIComponentTag {
        public String getComponentType() {
            return "BasicComponent";
        public String getRendererType() {
            return null;
    }Tld entry:
      <tag>
        <name>BasicComponent</name>
        <tag-class>BasicComponentTag</tag-class>
        <body-content>JSP</body-content>
      </tag>Thanks in advance,
    Koen Verhulst

    The body tag should be as follows
    <bodycontent>JSP</bodycontent>
    but the JSP will not work. Here is the file:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
    xmlns:cf="/WEB_INF/helloWorldLib.tld">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>List of Values</title>
    </head>
    <body><h:form>
    <cf:jsfhello hellomsg="This is it" />
    </h:form></body>
    </html>
    </f:view>
    </jsp:root>
    Edited by: bongo2 on Oct 28, 2008 2:58 PM

  • Custom JSF Component tags ignored after converting to Facelets layout

    I am currently using JDeveloper 10.1.3.3.
    I have a project consisting of .jspx pages. These pages mainly use components from ADF faces core. I also created my own custom JSF component that I use in several of these pages.
    Then, I needed to use Facelets so that I could apply a standard layout to all my .jspx pages. I looked at all the tutorials, and I created a layout.xhtml for my .jspx pages to use. This worked great for my .jspx pages that don't have my custom JSF component.
    Now, when I run my page with my custom component <img:newimage ...etc >
    the tag is ignored and it appears in the page's source as is when it should render as <img.src=...etc>. Attributes of newimage are changed on the page appropriately like width and height, but my component's tag, component, and servlet java files are never accessed.
    How can I fix this? Please help!
    Thanks.

    Hi,
    did you post this issue to the Facelets open source site ? Sounds like an issue with using Facelets
    Frank

  • Value mapping not working properly

    Hi All,
    I am using value mapping twice in same mapping program. But only 1 field is coming with value and other is taking same value from source payload, can you please tell me what can be issue here?
    Value mapping 1 -
    Context - http://sap.com/xi/XI
    SenderParty- SenderSchema
    ReceiverParty- ReceiverSchema
    Value Mapping table in ID -
    Value mapping at field 2 -
    Context - http://sap.com/xi/XI
    SenderParty1- SenderSchema1
    ReceiverParty2- ReceiverSchema2
    Value Mapping table in ID -
    Source payload -
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_VM_Send xmlns:ns0="http://xyz.com/Rashmi_CollectPatternDemo">
       <Record>
          <Emp_ID>123</Emp_ID>
          <Name>rash</Name>
          <Surname>sumit</Surname>
          <Gender>Male</Gender>
         <Grade>E2</Grade>
      </Record>
    </ns0:MT_VM_Send>
    Target Payload -
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_VM_Receiver xmlns:ns0="http://xyz.com/Rashmi_CollectPatternDemo">
    <Record>
    <Emp_ID>123</Emp_ID>
    <Full_Name>rash sumit</Full_Name>
    <Designation>E2</Designation>
    <Gender>M</Gender>
    <Travel_Mode>Train</Travel_Mode>
    </Record>
    </ns0:MT_VM_Receiver>
    Here travel_mode is coming perfect, but designation is same as defined in source payload. Why here Value mapping not working???
    Thanks & regards,
    Rashmi Joshi

    Hi Rashmi,
    The problem would either be in cache update or your mapping. Please provide the sceenshot of mapping (after clicking the value mapping function).
    you can also choose the option to throw error in value mapping function, so it will throw error when value not found.
    regards,
    Harish

  • Component monitoring is not working sap pi 7.31

    hi friends,
    we are using PI 7.31. after restarting the system suddenly component monitoring in (NWA--PImon) stopped working and even RWB -->component monitor is not working. No users are locked(RWBUSER,AFUSER)...and remaining all webpages are opening except this.Inside Exchange Profile we have user FQDN as well. SLDCHECK working fine and SM59 Destinations also working fine,
    i am getting HTTP 500 connection timed out error.
    please suggest me.
    thank you
    regards,
    loordh.

    hi Iñaki Vila and Jannus Botha,
    thanks for your replies.
    i am getting  below error when i checked NWA logs and OS level logs
    Exception caught by adapter framework: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
    and regarding notes, i verified all and settings were OK and after PI restart as well no issues.
    please tell me some more places where i can see.
    regards,
    Loordh.

  • Airport express not working since today's itunes update

    Since updating iTunes today, Airport Express not working. More specifically, the Airport software will recognise the device exists, but iTunes cannot connect to it, just getting error message.

    Ray Dio wrote:
    Since updating iTunes today, Airport Express not working.
    try this:
    go system preferences > network > airport > advanced > TCP/IP and set *configure IPv6* to off. click on apply.
    now have iTunes connect to the remote speaker again.
    JGG

  • Customized strings in iPad viewer not working?

    Hello,
    per request of client i've tried to change one string in viewer for iPad. So i've created template in DSP App Builder, modified this template on my computer, choose this file in App Builder and prepared another build (V28). Unfortunately, i still see old original string (i've double tested that i'm downloading new version of app). When i now check DPS App Builder, it just says "Asset stored on server", so i asume, that everything goes smoothly on this side.
    Any similar experience with customized strings?
    Thanks
    Martin

    Everything was done from scratch with V28.
    1. 10. 2013 v 16:14, Bob Bringhurst <[email protected]>:
    Re: Customized strings in iPad viewer not working?
    created by Bob Bringhurst in Digital Publishing Suite - View the full discussion
    That's odd. It worked for me when I tested it. Perhaps you should try moving the current xml file to a different folder, downloading a new version, copying and pasting, and rebuilding.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5728130#5728130
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5728130#5728130
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5728130#5728130. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • JSF RI  1.1_01: UIInput component value was not set during render response

    I've just started to learn JSF, read corresponding chapters in J2EE guide and spec and tried to play little bit with JSF RI 1.1_01. I found very strange (at least for me) behaviour of regular input component (corresponds to inputText tag).
    I have very simple example form (contains "select one", input component and command button). Corresponding backing bean has request scope. I set breakpoints in backing bean getters and during debug found:
    1. On initial request both getters were called during rendering phase.
    2. On form submit request getter for property bound to input component was called again (this looks strange for me) but getter for property bound to select box was not called (it looks as I've expected). This strange call occurs during validation phase. As far as I understand it was the following flow:
    a) During initial request rendering response input box value wwas not stored in component state (I even may suggest that it was not set on component, just corresponding HTML tag with initial value was rendered).
    b) On submit form submitted string value of input component was decoded from request parameters but local value was set to null (see above).
    c) During validation phase submitted value was successfully converted and validated.
    d) Then implementation had to detect component value change and called getValue() in order to obtain old value.
    e) Implementation of getValue() first looked for local value field - it is null, then it should request for bound value from model.
    I tried different ways to store state (client or server) but it was the same. Sadly MyFaces 1.1.1 implementation did even worse - local value of select was also null during first postback.
    I wonder why it was implemented this way...
    Thank you

    I've just started to learn JSF, read corresponding chapters in J2EE guide and spec and tried to play little bit with JSF RI 1.1_01. I found very strange (at least for me) behaviour of regular input component (corresponds to inputText tag).
    I have very simple example form (contains "select one", input component and command button). Corresponding backing bean has request scope. I set breakpoints in backing bean getters and during debug found:
    1. On initial request both getters were called during rendering phase.
    2. On form submit request getter for property bound to input component was called again (this looks strange for me) but getter for property bound to select box was not called (it looks as I've expected). This strange call occurs during validation phase. As far as I understand it was the following flow:
    a) During initial request rendering response input box value wwas not stored in component state (I even may suggest that it was not set on component, just corresponding HTML tag with initial value was rendered).
    b) On submit form submitted string value of input component was decoded from request parameters but local value was set to null (see above).
    c) During validation phase submitted value was successfully converted and validated.
    d) Then implementation had to detect component value change and called getValue() in order to obtain old value.
    e) Implementation of getValue() first looked for local value field - it is null, then it should request for bound value from model.
    I tried different ways to store state (client or server) but it was the same. Sadly MyFaces 1.1.1 implementation did even worse - local value of select was also null during first postback.
    I wonder why it was implemented this way...
    Thank you

  • Value binding not working with rendered attribute

    In my jsf page i'm encountering problem with value binding it is not working for a h:inputText with rendered condition even when the rendered condition evaluates to true & the component is rendered.While trying to retrieve the value of the components with conditional rendering on submit i'm unable to retreive the value while on removing rendered condition the value binding is working perfectly
    <h:selectOneMenu id="DropDown" value="#pc_GeneralRequestInfo.objInfoDTO.State}" rendered="#pc_GeneralRequestInfo.objAddressRequestDetailsDTO.selectedAddressType == 'HOME'}">                    
    <f:selectItems value="#{pc_GeneralRequestInfo.statesList}" />
    </h:selectOneMenu>

    There is a { missing from the value attribute in the code you posted.                                                                                                                                                                                           

  • IPhone 4 and Apple Component Cables do not work

    I have an iPhone 4 and my Apple Component Cables no longer work.
    I have had an iPhone 3G since July 2008, and a first gen iPod Touch. They both have and continue to work with the cables.
    I have the Component cables hooked up to an Apple universal dock... it's been a great way to watch movies and TV shows on my bedroom TV, as the remote control works through the dock. I've become so accustomed to using it, I no longer even use a DVD player (all my media is digital). That's the main reason I upgraded to a 32Gb ip4. I have tried plugging the cables directly into my phone, rather than going through the dock, to no avail.
    I am now on my second replacement iPhone 4, and the Genius at the Apple Store had the same issue with his demo unit. Oddly, the ip4 appears to work fine with the lower quality composite cables, but not at all with the HD compatible component cables. My question is, have any of you experienced the same problem? How is this not a bigger issue? (I can't find any threads about this issue), Am I the only person who uses his iPhone this way?
    I have been in contact with Applecare. A nice rep has been trying to help me, but as of yet, has not been able to offer an answer. On the Apple Store, you can clearly see iPhone 4 listed as a compatible device for the cables.
    http://store.apple.com/us/product/MB128LL/B?fnode=MTY1NDAzOQ&mco=MTA4NDc4Njc
    Any help or insight would be greatly appreciated

    I know this is of absolutely no use to you at all but...
    Same here!
    Paid nearly 40 quid (GBP) for the component video cable from apple, same for the universal dock!
    Nothing, nada, nought... through my theatre system or direct into the TV.
    Shame really, iPhone 4 latest patches, really BIG TV (latest, greatest everything input's) fairly simple theatre system (again, everything inputs) but no joy at all getting a picture (video) out of the component cable.
    Bah...
    I read somewhere there could be a fault in the iPhone 4 OS, but I'd have thought that they would have fixed this by now!
    NOTHING WORKS!!!
    This is not a good 40 quid value !!!
    Is there a solution?

  • JSF Design Time View Not working correctly for ADF/JSF components

    My project is not using any external tag libraries. It is based purely on ADF core/html and JSF core/html components. The design time view does not show the appropriate presentation, everything is shown as nexted frame containers (I suppose how you would show a component that does not have a visual representation).
    If I create a new project and copy my jsp (jsf) pages over they show perfectly. I did this activity and all was going well in the new project and then I lost the design time view again. I cannot tell you what I did to cause the issue, maybe it was a modification to the web.xml as has been suggested in some other threads. Can anyone tell me what I should be looking for that causes this problem, what corrective actions I might take to eliminate the issues

    Ok I have isolated this issue. In my phase listener I had this line of code:
    private static final Logger _logger =  Logger.getLogger(EigRequest.class.getPackage().getName());
    and I changed it to
    private static final Logger _logger =
    Logger.getLogger(EigRequest.class.getName());
    and design mode started to work. I guess either of the above works for me although I do not understand why the line works when you run the application but not in design mode.
    Moral to the story is if something fails in any one of these types of decorators you will drop into a raw view mode. The question I have is if errors are occuring how do I figure out where they may be. There is no indication that anything is wrong with the exception that you lose most of the design mode functionality.
    This was not a compile issue, this was not a runtime issue. It took me quite a few hours of writing a test program to validate that it was not just writing a phase-listener issue; then launching, editing, relaunching the application to find the problem. I will say that a good portion of the code came from a Eclipse project. If you add the offending lines of code while using JDeveloper you do not loose design mode immediately. You only see the problem the next time you start JDeveloper which complicates finding the problem.

  • JSF Getting Started Example not Working

    I've installed and configured JSF according to CoreJSF 1st Chapter example "A simple JSF Application" (available at http://horstmann.com/corejsf/). The only different thing i've done is to put the jsp pages in a separate folder within the root web application folder. The JSF seems to be properly configured, since i'm able to see the UI components in the login page. However, once I click login button, the application takes me once more to the login page (same page that put the request). I figure it is a problem with the navigation file, I've changed the faces-config.xml including "jsf/welcome.jsp" as target since "jsf" is the separate directory I created for JSP files. I does not work (not getting exceptions though). Any prompt help will be highly appreciated.
    These are the files:
    webapproot/jsf/index.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>Please enter your name and password.</h3>
    <table>
    <tr>
    <td>Name:</td>
    <td>
    <h:inputText value="#{user.name}"/>
    </td>
    </tr>
    <tr>
    <td>Password:</td>
    <td>
    <h:inputSecret value="#{user.password}"/>
    </td>
    </tr>
    </table>
    <p>
    <h:commandButton value="Login" action="login"/>
    </p>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/jsf/welcome.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>
    Welcome to Java Server Faces,
    <h:outputText value="#{user.name}"/>!
    </h3>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/WEB-INF/faces-config.xml
    <faces-config>
         <navigation-rule>
         <from-view-id>jsf/index.jsp</from-view-id>
         <navigation-case>
         <from-outcome>login</from-outcome>
         <to-view-id>jsf/welcome.jsp</to-view-id>
         </navigation-case>
         </navigation-rule>
         <managed-bean>
         <managed-bean-name>user</managed-bean-name>
         <managed-bean-class>co.edu.unal.dnic.licapa.capa.UserBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>
    webapproot/WEB-INF/web.xml
    <web-app>
         <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>
         <welcome-file-list>
         <welcome-file>/index.html</welcome-file>
         </welcome-file-list>
         <display-name>DNIC - Capacitaci�n 1.0.1</display-name>
         <description>
         DNIC - Capacitaci�n 1.0.1
    </description>
    </web-app>
    Since I'm not getting any java exceptions I figure the UserBean class is working properly.
    Thank you......
    Julian

    try to put / at the beginning of the from-view-id and to-view-id

Maybe you are looking for