webtier@glassfish.java.net

Navigation to Servlets No Longer Working

From: <webtier_at_javadesktop.org>
Date: Wed, 20 Jan 2010 10:56:10 PST

Hi all,

I am attempting to migrate a JSF 1.2 and Woodstock project to JSF 2.0 (and ExtJs). When I replace the jsf-api and jsf-impl jars, update the web.xml and faces-config.xml files, navigation to a servlet (rather than a page) no longer works: I get a 404 response, servlet not found.

Here, for example, is what used to work:

In the web.xml file:

...
<servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>com.mycompany.servlets.LoginServlet</servlet-class>
</servlet>
...
<servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
...

And in the faces-config.xml:

...
<navigation-rule>
    <from-view-id>/Login.jsp</from-view-id>
    <navigation-case>
        <from-outcome>case_login</from-outcome>
        <to-view-id>/LoginServlet</to-view-id>
    </navigation-case>
</navigation-rule>
...

Navigating to pages defined in navigation rules works fine; so that proves that the action methods are properly feeding strings to the NavigationHandler and that the later is working.

Does anyone have any suggestions as to what the problem might be? I want to migrate the application piece by piece from the older technology it is currently using to Mojarra and a snazzy JavaScript library.

Thanks much in advance,

ks
[Message sent by forum member 'kevinscott' (skhealy_at_charter.net)]

http://forums.java.net/jive/thread.jspa?messageID=382007