Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Newbie: Faces context not found

 
andrew pierce
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
andrew pierce
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic