• Post Reply Bookmark Topic Watch Topic
  • New Topic

no faces context

 
sanju dharma
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am new to JSF. I am following tutorials at http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html.

But I am getting above error "no faces context" when I go to main URL . Looks like it is very basic error . I searched on this forum and on search engines and tried various things . But no result.

Can anybody advice ?
Also, if you anybody knows better tutorial on JSF than above, please let me know.

Thanks.
 
Edisandro Bessa
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey sanju,

Depending on your faces servlet configuration in web.xml file, you have to type your url something like this:

<a href="http://localhost/yourapp/yourpage<b rel="nofollow">.faces</b>" target="_blank">http://localhost/yourapp/yourpage.faces
or
<a href="http://localhost/yourapp<b rel="nofollow">/faces/</b>yourpage.jsp" target="_blank">http://localhost/yourapp/faces/yourpage.jsp

If you just type your url like http://localhost/yourpage.jsp for sure you will get a big fat NO FACES CONTEXT error.

 
sanju dharma
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edisandro ,
Thanks for your reply.

I tried based on your suggestion. In my case, I have welcome-file index.jsp in which i have only jsp:forward tag to forward to inputname.jsf or inputname.faces ( i tried with faces based on your comment) , but not working .


If you can take a quick look over code, it is there in the link I provided in the first post. I am doing exactly same , except my app server is jboss rather than tomcat.

Thanks again for the reply.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my index.jsp:



But I'd get the same error you do if it wasn't for this:



The xhtml mapping is because I'm using Facelets. For ordinaty JSF it doesn't apply.
 
sanju dharma
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,
I didnt get what you want to convey . Are you trying to answer my original question? I am getting "no faces context" error. As per your code snippets, I dont see any problem in my web.xml.

Thanks
 
Prem Khan
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes when a new user is having trouble with "no faces context" they have the sevlet mapping is set to *.jsf for the faces servlet. Try typeing in jsf instead of jsp.
 
Satish navada
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Are you using jboss.Then jboss which version?
In JBoss AS 4.0.3 and 4.0.4, the JBoss Application Server features built-in Java Server Faces support.All the jar files required are in jsf-libs folder.See this link for more information.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces

If you dont want to use the built in feature just delete the files in jsf-libs folder.
Regards
Satish

Originally posted by sanju dharma:
Hi ,
I am new to JSF. I am following tutorials at http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html.

But I am getting above error "no faces context" when I go to main URL . Looks like it is very basic error . I searched on this forum and on search engines and tried various things . But no result.

Can anybody advice ?
Also, if you anybody knows better tutorial on JSF than above, please let me know.

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!