JSF: No faces context?!

Hi All,

I have just started to look into JSF. I'm not sure if this is the write forum to post this question but any helpful answers are appreciated.

I downloaded a completely developed simple application from the following tutorial:

http://www.exadel.com/tutorial/jsf/jsftutorial-kickstart.html

One can download the same directly from:

http://www.exadel.com/tutorial/jsf/misc/jsfks-done.zip

I tried to access the index page but getting the following error:

javax.servlet.ServletException: No faces context?!

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.index_jsp._jspService(index_jsp.java:86)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

I'm using JBoss server to run the application. I tried to google the error but no helpful answers. Any suggestion is welcome.

Thanks.

[1490 byte] By [talk2keya] at [2007-11-27 8:32:54]
# 1

I had a quick look at the structure of the application (I didn't attempt to run it). I think I can guess at what the problem might be:

> I tried to access the index page but getting the

> following error:

I am gussing that by the index page you mean "inputname.jsp". This is a JSF page, and for it to work you must access it via the FacesServlet. If you look at the web.xml, this servlet is mapped to URLs ending in ".jsf".

You must direct your browser to the URL ".../inputname.jsf". This will invoke the FacesServlet. If you instead direct your browser to ".../inputname.jsp", then you bypass the FacesServlet and will see the error you got.

ruthf104a at 2007-7-12 20:28:51 > top of Java-index,Java Essentials,New To Java...
# 2

Thanks ruthf104, I appreciate you answer. But I'm not directly accessing the JSP that way. Following is my index JSP

<html>

<body>

<jsp:forward page="/pages/inputname.jsf" />

</body>

</html>

I tried accessing with all possible URL's as below

http://localhost:8080/jsfks

http://localhost:8080/jsfks/

http://localhost:8080/jsfks/index.jsp

http://localhost:8080/jsfks/index.jsf

http://localhost:8080/jsfks/pages/inputname.jsf

http://localhost:8080/jsfks/pages/inputname.jsp

but in vain!

talk2keya at 2007-7-12 20:28:51 > top of Java-index,Java Essentials,New To Java...