• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

no faces context

 
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.
 
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.
 
Saloon Keeper
Posts: 22649
153
Android Eclipse IDE Tomcat Server Redhat Java 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
 
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.
 
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.

 
Fire me boy! Cool, soothing, shameless self promotion:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic