aspose file tools*
The moose likes JSF and the fly likes JSF Newbie: Faces context not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Newbie: Faces context not found" Watch "JSF Newbie: Faces context not found" New topic
Author

JSF Newbie: Faces context not found

andrew pierce
Ranch Hand

Joined: Jun 18, 2006
Posts: 33
Hello. I am trying to learn JSF and getting pretty frustrated. I am working through JavaServer Faces in Action by Kito Mann. Howver, I can't get the most simple JSF application to work. I am also using MyEclipes and trying to get their JSFLoginDemo working. I can't get it working either. I am deploying to JBoss 4.0.3SP1.

From what I can tell, my web.xml is right and I have diligently worked to make sure my code looks right.

When I run the application, I get this error in server.log:

2006-06-18 10:36:09,906 DEBUG [com.sun.faces.application.ViewHandlerImpl] Found URL pattern mapping to FacesServlet .faces
2006-06-18 10:36:09,906 DEBUG [com.sun.faces.application.ViewHandlerImpl] viewId after appending the context suffix /userLogin.jsp
2006-06-18 10:36:09,921 DEBUG [com.sun.faces.application.ViewHandlerImpl] Before dispacthMessage to newViewId /userLogin.jsp
2006-06-18 10:36:10,406 ERROR [javax.faces.webapp.UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
2006-06-18 10:36:10,406 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/JSFLoginDemo].[jsp]] Servlet.service() for servlet jsp threw exception


I see that is says to check if the FacesServlet has been initialized in web.xml. As far as I can tell, it has.

Thanks in advance for any help. If more detail is needed, I'll be happy to provide.

pathetic
andrew pierce
Ranch Hand

Joined: Jun 18, 2006
Posts: 33
OK. I've done a bit more work and learned a little. This application works on Tomcat 5. I believe the problem is because JBoss ships with a version of MyFaces.

I have found others with the same problem:

http://myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&p=48716#48716

The JBoss site has this page about their integrated MyFaces.

However, I have followed those directions and still can't get the app to work on JBoss. Like I said, I have gotten it to work on Tomcat 5. I'd just like to get JBoss working too.

So, the question now is, how to do JSF with JBoss.

Thanks for any info.

pathetic
andrew pierce
Ranch Hand

Joined: Jun 18, 2006
Posts: 33
I got it working on JBoss! I searched down the "default" server's path and sure enough, there was that jsf-libs directory. I stopped the server, deleted that directory, restarted the server and it worked!

Thanks for all who helped me figure this one out.

Of course, no one on this forum did :-). But thanks to those who have struggeled and let me a trail elsewhere.

I hope this post helps someone else!

pathetic
Milosz Dobrowolski
Greenhorn

Joined: Jul 05, 2006
Posts: 1
I owe You a big one.
You've probably saved me a lot time and heavy research, your method works great.
A hundred thanks !
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Welcome to JavaRanch pathetic programmer.

We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly. You can do so by clicking here.

Thanks a bunch.


GenRocket - A Test Data Generation Platform
andrew pierce
Ranch Hand

Joined: Jun 18, 2006
Posts: 33
I got it updated to my actual name. I had an account setup and couldn't remember the id/password for anything. I think the email address I had used is no longer in service either so, out of frustration, I came up with a pseudonym.

That and I was embarrassed to be frustrated by such a silly problem. :-)
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Originally posted by andrew pierce:
I got it updated to my actual name. I had an account setup and couldn't remember the id/password for anything. I think the email address I had used is no longer in service either so, out of frustration, I came up with a pseudonym.

That and I was embarrassed to be frustrated by such a silly problem. :-)


Well, we appreciate your prompt attention to this. And I think if you hang out here long enough, you'll realize that no one will belittle you for any question. If they do, let a Bartender or Sheriff know and we'll lock 'em up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Newbie: Faces context not found
 
Similar Threads
JSF/MyFaces/JBoss no workie! :-(
Error while generating JSF view from non JSF request
Configuring JSF in the TOMCAT/conf/web.xml for all webapps
Problem with welcome-file-list
JSF/MyFaces and Sitemesh