Navigation does not work properly, does anybody know why?

Hi,
I am trying to make the http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html example work in a NetBeans project. It is a simple Input name -> Greetings example. However, when I enter my name in the input page and click on the 'Say Hello' button, my browser stays on the same page and I don't know why !!!
My faces-config.xml is the following:
<?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">
    <navigation-rule>
        <from-view-id>inputname.jsp</from-view-id>
        <navigation-case>
            <from-outcome>greeting</from-outcome>
            <to-view-id>greeting.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <managed-bean>
        <managed-bean-name>personBean</managed-bean-name>
        <managed-bean-class>jsfks.PersonBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
</faces-config>My inputname.jsp:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:loadBundle basename="jsfks.bundle.messages" var="msg"/>
<html>
<head>
  <title>Enter your name page</title>
</head>
<body>
   <f:view>
     <h1>
      <h:outputText value="#{msg.inputname_header}"/>
     </h1>
     <h:form id="helloForm">
      <h:outputText value="#{msg.prompt}"/>
      <h:inputText value="#{personBean.personName}" />
      <h:commandButton action="greeting" value="#{msg.button_text}" />
     </h:form>
   </f:view>
</body>
</html>  and my greeting.jsp is:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:loadBundle basename="jsfks.bundle.messages" var="msg"/>
<html>
  <head>
   <title>Greeting page</title>
  </head>   
  <body>
     <f:view>
          <h3>
      <h:outputText value="#{msg.greeting_text}" />,
      <h:outputText value="#{personBean.personName}" />
         <h:outputText value="#{msg.sign}" />
         </h3>
     </f:view>
</body>     
</html> The example also includes an index.jsp page:
<html>
<body>
  <jsp:forward page="inputname.jsf" />
</body>
</html>My web.xml is the following:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
</web-app>I am a newbie to JSF, so I may be missing something obvious !!!
Thanks for your input,
J.

In the faces config file, the view ID string must start with a "/" fix the code from:
    <navigation-rule>
        <from-view-id>inputname.jsp</from-view-id>
        <navigation-case>
            <from-outcome>greeting</from-outcome>
            <to-view-id>greeting.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>to something like:
    <navigation-rule>
        <from-view-id>/inputname.jsp</from-view-id>
        <navigation-case>
            <from-outcome>greeting</from-outcome>
            <to-view-id>/greeting.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>** Use the appropriate path inside your web application

Similar Messages

  • Calendar does not work properly!!! Why? Please help...

    Hello everybody!
    I'm getting problems with calendar and I don't know what to do...
    I'm in Brazil, Sao Paulo and I instantiate the Calendar class like this:
    Calendar cal = Calendar.getInstance();
    System.out.println(cal.getTime());
    when i do this the time that is shown is one hour ahead the current time here in Brazil... So I tried to take the time from my Operating System like this
    Date t = new Date();
    t.setTime(System.currentTimeMillis());
    cal.setTime(t);
    System.out.println(cal.getTime());
    and... The same thing happens! What I know is that the summer time in Brazil has changed and I can't even take the time from my OS...
    Please... It's causing inconsistencies in our Database... Does anybody know how to solve this?
    Thanks a lot...

    Run this and see what you get:
    (I'm not formatting this code so that it will copy with line breaks)
    import java.util.*;
    public class TimezoneDefault {
    public static void main(String[] args) {
    int hoursToMillisec = 3600 * 1000;
    TimeZone tz = TimeZone.getDefault();
    System.out.println("Default time zone id: " + tz.getID());
    System.out.println("Default time zone: " + tz.getDisplayName());
    System.out.println("Offset from GMT: " + (double)tz.getRawOffset() / hoursToMillisec);
    System.out.println((tz.useDaylightTime()) ? "uses DST": "no DST");
    System.out.println("DST value: " + (double)tz.getDSTSavings() / hoursToMillisec);

  • HT1338 My Java does not work and I dont know why

    I have updated the version of my Macbook , and now I can not open Java it tells me I need to install it. When I try to it doesnt work.

    See if  JavaPreferences.app in Utilities will open. I keep mine disabled. You must check the applicable boxes.

  • Some software are not working properly,don't know why?

    I can't convert video files to mp3. I tried with different software;real player, format factory, etc. But every time pop up msg shows "RealConverter or format factory has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I have not faces that problems before. But I can watch video with real player.
    So how can I solve this problems? Another problem is there is no Restore factory settings. The Reinstall windows, which I have, requires installation disk.

    Satellite L655D-S5050 
    ..there is no Restore factory settings. The Reinstall windows, which I have, requires installation disk.
    See the section Recovering the Internal Storage Drive, which begins on p. 59 of the User's Guide.
       Satellite L640/L650 Series User’s Guide
    -Jerry

  • Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applica

    Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applications.

    I received no error message. The application was just trying to find applications unsuccessfully.
    I am using MAC OS 10.10.1
    I tried to uninstall the application  but it seems that a kind of deamon is still installed thus providing me to reinstall properly. Do you know where are the elements to remove in order to get my machine just like before ?
    Otherwise I would have to reinstall everything and this would be a pain.
    Thanks for your help.

  • Flash player does not work properly on Windows 7 32 bits

    Hello,
    My flash player does not work properly on Windows 7 32 bits with Firfox and IE8 (lasts versions).
    My Flash player version : 10.0.45.2, but I tried with version 9 too, with same problems.
    I have tried to uninstall, reboot, reinstall several times, ... witch did not worked.
    In fact, it works correctly on some sites, like youtube, but not on some others like :
    http://www.dailymotion.com/ => black screen instead of videos, right click gives flash context menu
    http://www.canalplus.fr/ => videos does not load, right click gives flash context menu
    http://www.myspace.com/ => no audio player, right click gives flash context menu
    some games in http://www.kongregate.com/ => black screen instead of games, right click gives flash context menu
    I have no problem with shockwave in http://www.adobe.com/shockwave/welcome/
    No problem too with flash player on http://www.adobe.com/software/flash/about/
    But in the Global Privacy Settings panel (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.htm l), I cannot change any settings :
    I cannot check boxes,
    My changes are not saved.
    In most of flash animations, videos, ...,
    when I click on parameters, I cannot do anything, even closing.
    when I am in full screen mode, the message "press escape to exit...." does not disappear.
    Last thing, all those problems was not there when I was on Windows XP, few weeks ago, and appear with my registered Windows 7 premium familly edition, with the same hardware configuration...
    Thank you for your help

    Hi eidnolb
    Thanks for your answer.
    This is what I have :
    Verify user permissions
    I have an administrator account.
    I tried (uninstall, install and run) with super-administrator account for same results
    Install the most current version.
    I am running the latest version (10.0.45.2)
    Run the Clean Installer to Fix 3rd Party Flash Player Cleaners
    I did not "clean" my computer.
    Troubleshoot Pop-up blockers
    I have no Pop-up or esle blocker  software.
    Ensure that Internet utilities do not block Flash Player
    I tried (uninstall, install and run) without Avast.
    I have windows 7 firewall. I do not know where I can allow ActiveX  controls and Flash (SWF) content. I do not see anything relative to ActiveX an Flash in allowed program list.
    Fix machine crashes when displaying Flash content
    I have no freez or crash.
    Using IE, Shockwave Flash Object is Enabled and vs 10.0.45.2
    Using FF, I have SWF vs  10.0.45.2 and it is Enabled
    I really do not understand !!
    Thanks,
    Ju'

  • My Iphoto does not work properly, after downloading Mavericks.  How can I fix it ?  loading Mavericks

    My Iphoto does not work properly after downloading Maverick. How can I fix it ?

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    what do you mean by not working properly? Explain in detail.
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    OT

  • HTML Editor in HTMLDB Does Not Work Properly

    Dear Developer,
    The HTML Editor provided in the Build 1.5.0.00.33 (9i) does not work properly. The problems are:
    1. When you press Enter Key in HTML Editor <P> tag is
    added instead of <BR> tag. This causes inconvenience to the end user while editing & displaying the fields formatted by HTML Editor.
    2. Similar problems occur when Bullets are used.
    3. Maximum field width for varchar is only 4000 & there is no other field provided by HTML DB which can store more than 4000 characters information.
    I would like to know whether:
    1. The problem is fixed in the newest buid ?
    2. Is there any workaround or am I missing something, please comment.
    I am using HTML Editor so that user can write long free flowing HTML text, but end users have inconvenience.
    Thanks.

    Hi Ayush,
    The answer to your question 3 is increase the size of the Maximum width on the item. I increased it to 32767 and was able to insert into a clob. I think the limit is 32767.
    Vivek

  • I am new to mac air. Today i installed (unsuccessfully!) MAPLE16 on my mac book air. Now since it does not work properly (it also does not appear in  applications) i decide to delete it. I could not remove it from launchpad . i need urgent help

    i am new to mac air. Today i installed (unsuccessfully!) MAPLE16 on my mac book air. Now since it does not work properly (it also does not appear in  applications) i decide to delete it. I could not remove it from launchpad . i need urgent help from your side.

    Any third-party software that doesn't install by drag-and-drop into the Applications folder, and uninstall by drag-and-drop to the Trash, is a system modification.
    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    I never install system modifications myself, and I don't know how to uninstall them. You'll have to do your own research to find that information.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickMyMac” (a hypothetical example.) First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickmyrmac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickMyMac.dmg and open it. There may be an application in there such as “Uninstall BrickMyMac.” If not, open “BrickMyMac.pkg” and look for an Uninstall button.
    You generally have to reboot in order to complete an uninstallation.
    If you can’t remove software in any other way, you’ll have to erase and install OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    You may be advised by others to try to remove complex system modifications by hunting for files by name, or by running "utilities" that purport to remove software. I don't give such advice. Those tactics often will not work and maymake the problem worse.

  • My iphone 5 does not work properly with Ford Sync,

    Hi, My iphone 5 does not work properly with Ford Sync, everytime I pair the phone, Ford sync navigation system freezes and does not work !
    Can someone help.

    Hi M3MB3R,
    Thanks for visiting Apple Support Communities.
    You may find the troubleshooting tips in this article helpful:
    iPhone: Sound muffled or low from the speaker or when speaking into the mic
    http://support.apple.com/kb/TS1631
    Cheers,
    Jeremy

  • I have just downloaded Yosemite but I find that Photoshop Elements 11 does not work properly. If I use a tool like a paint brush or spot healer I cannot paint a full stroke?

    I have just downloaded Yosemite but I find that Photoshop Elements 11 does not work properly. If I use a tool like a paint brush or spot healer I cannot paint a full stroke does anyone else have this issue or know a solution?

    Many thanks that does work. But it now leads to another question is this simply a trackpad issue and if so will it be fixed? I use Elements every day and was thinking I would have to go back to Mavericks.

  • TS1702 When I update to IOS6 on my 4S Facebook does not work properly, the news feed never updates it only says no new storeys and shows a picture of an antenna. When I reset my phone and go back to IOS5 Facebook works fine. What's up with IOS6 ????

    When I update my iPhone 4S to iOS six Facebook does not work properly the newsfeed doesn't load properly and I can never see what's going on all I see is a picture of an antenna and a little thing underneath it says no new stories when I reset my phone back to iOS 5 then it works just fine and I don't have any issues so there must be something wrong with iOS six that isn't letting Facebook load properly

    No I did not use any unauthorized methods for anything, I simply reset my phone back to factory.
    <Edited By Host>

  • Image display control scrolling does not work properly when zoomed in

    I am using a ROI on an image in the image display control. When zooming into the image to fine-adjust the positioning of the ROI, the image scrolling does not work properly. As far as I understand, the image should scroll automatically when the ROI is leaving the visible area. However, the scrolling behaviour seems to depend on the origin of the Labview panel, not the origin of the image display control, which might require to move the ROI way out of the visible area before the scrolling takes place. In other words: the coordinate system of the image display control is shifted with respect to the true visible image area, depending on where you place it on the front panel. As a consequence, when clicking on a ROI which is in the visible area, but is outside of what Labview thinks is the visible area, it might immediately jump to the left border of the image, making the positioning of the ROI really difficult.
    Has anyone noticed this behaviour, and what would be a reliable solution to avoid this? 
    Dirk

    Hello,
    no, I am not talking about the tools palette. Just place an image control with some image in it on a new VI front panel. Then, use the rectangle from the tools and select a ROI in the image. If you zoom in (using the magnification glass), and then grab the ROI and move it around, the image scroll with the ROI. So far, so good. If you now place the image control elsewhere on the panel, or add new control above it, resize the panel, etc. , this scrolling when moving the ROI will not work correctly if the origin (0,0) of the panel is far away from the image control.
    I have attached a VI for simplicity (although there is hardly any code in it).
    If you make a ROI and try to move it down, you will notice that scrolling starts if you move the mouse out to about 10cms below the image (depens on your screen, of course). After that, if you click on the ROI, the scroll bars and ROI might jump up to the upper end of the image. Imagine how annoying this is if you try to finely adjust the ROI position. 
    I think it is a bug in the implementation of the image display control.
    Thanks,
    Dirk
    Attachments:
    scrolling.vi ‏818 KB

  • Subvi does not work properly when called inside a vi

    Hello Every body
    thanks for your help. i am using a sub vi for sine signal generation. as a vi it works fine. but when i called this subvi inside another VI it gives some problems. for example timer indicator works properly.it reinitializes as well in the sub vi, but in the main VI it does not work properly. means does not count the time.in the sub vi on the fly i can change the values of frequency and amplitude in real time, but when i use as sub vi, it does not reponse as i change the values in the control arrays.similarly pause and continue works properly in the sub vi, but once again in the main VI, it does not work properly.graph indicator also work properly in the sub vi. but here once again it does not work properly in the main VI.the pause resume indicator also does not blink, when it is continue. in the subvi it blinks very well.generally why the sub vi does not work properly inside the VI?i am sending my VI and sub vis.
    any tips would be highly appreciated.
    thanks
    Regards
    Attachments:
    vi.zip ‏87 KB

    I just want to add some more details to Dan's answer. The subVI is acting exactly like you've coded it. The mistake is in understanding how subVIs work. When you call a subVI (or a function in any other language), you pass some parameters to it, the subVI does it's thing and returns values. the subVI does not accept new parameters from the calling VI until it returns to the caller and the caller runs the subVI again. In your case, you have a subVI with a while loop. You have some front panel control wired to the subVI's stop terminal. When first called, the value is false. So the subVI will keep running until the subVI's stop button becomes true but you cannot change it from main until the subVI finishes and returns so the subVI will never stop. As Dan says, the solution is pass references of front panel controls to the subVI and have the subVI monitor those references for changes and to update references to indicators on Main. You subVI does not need any front panel controls or indicators of it's own.

  • My Mac App Store on my MacBook Pro does not work properly.

    My Mac App Store on my MacBook Pro 15 inch does not work properly. When i go on to the app store, my wi-fi resets and then my app store quits. Why is this? How can i fix this problem? Please Help

    Back up all your files, on boot up when you first press the power button, press CMd and r and keep pressing until you get something apart from a apple logo. Then click reinstall Mac OS X or something like that. You may be prompted to insert your disk.
    Good luck

Maybe you are looking for

  • HTTP receiver adaptor

    Hi all,    I am using HTTP receiver adaptor to connect to an external system.Here I have to pass an Idoc from SAP to one folder in the target host where the application is installed.      My question is without using FTP adaptor(only with HTTP) can i

  • OIM 9102: the Scheduler has been shutdown

    Hi, I am updating the Ad connector task for groups lookup reconciliation after a fresh installation of the connector. I get always this message: The Scheduler has been shutdown. How can I get rid of this problem? The connector works fine, I can provi

  • Error when trying to open or deinstall skype

    Hi, I get this error message when I try to open or deinstall or install skype: Error: unfortunately the Skype executable is corrupted. Please re-install.  The same message come up when i install so what can I do to make it work? 

  • I start firefox and all my settings are gone. Why?

    Firefox reset all my settings. For example the toolbar layout.

  • Iphone bluetooth device driver for windows 7 os

    My laptop says it cannot connect via bluetooth because it doesn't have the the device driver for my windows 7 os - can someone point me to it as I am having difficulty finding it - thanks