troubleshooting Question

JSF Navigation problem from my welcome page

Avatar of demchris
demchrisFlag for Canada asked on
Java EEAutomotive
11 Comments1 Solution706 ViewsLast Modified:
I got problem with my JSF project when trying to submit a form that is in my welcome page. I developed small web for which I only have one page with tabPanel into it, for one of my tab, I have a form with submit button, now, whe I click on the submit button, my action listener is never call and I am redirect to

If I access the web site not using the welcome-file mechanisms but directly access my page (http://localhost:8080/ everything works fine.

I try either with the jsp-forward strategy and the dummy file on my root, both of them give me same result.

I'm using jsf 1.2, Facelets 1.1.14, RichFaces 3.3.1.GA


It looks like the naviation handler isn't properly initialize when we're forwarding to the with welcome mechanism.
I built small sample to reproduce the problem, here is the code :
Here is my web.xml
<web-app xmlns:xsi="" xmlns="" xmlns:web="" xsi:schemaLocation="" version="2.5">
    <display-name>Ajax4jsf Filter</display-name>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>
Here is my faces=config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns=""
 xmlns:xsi="" xsi:schemaLocation="">
And here is the Index.xhtml :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""
	<ui:composition template="/template/common.xhtml">
		<ui:define name="pageTitle">Welcome</ui:define>
		<ui:define name="content">
			<rich:tabPanel switchType="ajax">
				<rich:tab label="One">
					<h:outputText value="Bla Bla" />
				<rich:tab label="Two">
					<h:outputText value="Bla Bla" />
				<rich:tab label="Contact">
					<h:form id="contactForm">
						<div class="required">
							<h:outputLabel value="Nom :" for="name"/>
							<h:inputText id="name" value="#{}" required="true"/>
							<h:message for="name"/>
						<div class="required">
							<h:outputLabel value="Courriel :" for="email" />
							<h:inputText id="email" value="#{}" required="true">
							</h:inputText><h:message for="email"/>
							<h:outputLabel value="Numéro de téléphone :" for="phone" />
							<h:inputText id="phone" value="#{}">
							</h:inputText><h:message for="phone"/>
							<h:outputLabel value="Détail :" for="detail" styleClass="labelTextArea"/>
							<h:inputTextarea id="detail" value="#{contact.detail}" rows="5" cols="60"/>
						<div align="center">
							<h:commandButton action="#{contact.contactService}" value="Envoyer"/>

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros