Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:45:20+00:00 2026-05-24T01:45:20+00:00

I am learning JSF and got help from Exadel.com . I followed the steps

  • 0

I am learning JSF and got help from Exadel.com. I followed the steps described there.

The web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">
    <display-name>FBApp</display-name>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>

    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
</web-app>

faces-config.xml:

<?xml version="1.0" encoding="UTF-8"?>

<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
    version="1.2">

    <navigation-rule>
        <from-view-id>/pages/inputname.jsf</from-view-id>
        <navigation-case>
            <from-outcome>greeting</from-outcome>
            <to-view-id>/pages/greeting.jsf</to-view-id>
        </navigation-case>
    </navigation-rule>
    <managed-bean>
        <managed-bean-name>personBean</managed-bean-name>
        <managed-bean-class>com.fbapp.bean.PersonBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>

</faces-config>

index.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>index</title>
</head>
<body>
    <jsp:forward page="faces/pages/inputname.jsf" />
</body>
</html>

inputname.jsp:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
 <head>
  <title>enter your name page</title>
 </head>
 <body>
   <f:view>
     <h1>
      <h:outputText value="JSF KickStart"/>
     </h1>
     <h:form id="helloForm">
      <h:outputText value="Tell us your name"/>
      <h:inputText value="#{personBean.personName}" />
      <h:commandButton action="greeting" value="Say Hello" />
     </h:form>
   </f:view>
 </body>
</html>  

Now the difference present is:

  • In index.jsp I used <jsp:forward page="faces/pages/inputname.jsf" /> and Exadel used <jsp:forward page="/pages/inputname.jsf" />
  • I have used <url-pattern>/faces/*</url-pattern> and they used :
    <url-pattern>*.jsf</url-pattern>

The jar libraries are:

  • commons-beanutils-1.7.0.jar
  • commons-codec-1.3.jar
  • commons-collections-3.1.jar
  • commons-digester-1.7.jar
  • commons-el-1.0.jar
  • commons-fileupload-1.0.jar
  • commons-lang-2.1.jar
  • commons-logging-1.0.4.jar
  • commons-validator-1.1.4.jar
  • jsf-api-1.2.jar
  • jsf-impl-1.2-NIGHTLY_20060227.jar
  • jstl-1.1.2.jar
  • oro-2.0.8.jar
  • xml-apis-1.0.b2.jar

In JBoss 4.2.2GA (customised for JSF) I deployed the war its running but when I am trying to go to the url http://localhost:8080/FBApp/ the page is rendered as:

ERROR

which is actually the code of inputname.jsf. What I am doing wrong? Any information will be appreciable.

Thanks and regards.


Edit:
Code changed as instructed by BalusC. Now I am getting exception and the stacktrace:

19:34:04,244 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:162)
    at org.apache.jsp.pages.inputname_jsp._jspx_meth_f_005fview_005f0(inputname_jsp.java:104)
    at org.apache.jsp.pages.inputname_jsp._jspService(inputname_jsp.java:77)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:636)
19:34:04,245 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:162)
    at org.apache.jsp.pages.inputname_jsp._jspx_meth_f_005fview_005f0(inputname_jsp.java:104)
    at org.apache.jsp.pages.inputname_jsp._jspService(inputname_jsp.java:77)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:636)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:45:22+00:00Added an answer on May 24, 2026 at 1:45 am

    This can happen if you gave your actual JSP files a .jsf extension. In other words, you don’t have a inputname.jsp file in your web content folder, but actually a inputname.jsf file. This is Wrong. Those JSP files should keep their .jsp extension in order to get processed by the JspServlet. Otherwise those files won’t be parsed as JSP at all and will end up as plain text in the webbrowser.

    You have changed the URL pattern of the FacesServlet to be /faces/* instead of (the more recommended) *.jsf. So you should change all URLs in the tutorial from /foo.jsf to /faces/foo.jsp, also in the forwards/includes and navigation cases. You should not change to /faces/foo.jsf and use the wrong extension in the actual files.


    Unrelated to the concrete problem: is there any particular reason that you’re reading a 6 year old JSF 1.1 targeted tutorial instead of a more recent JSF 2.0 targeted tutorial? JSF 1.1 has so many disadvantages and also the legacy JSP has been succeeded by Facelets since 1.5 years ago.


    Update as per the comment on the question:

    @cularis This is my first project actually. I was getting java.lang.ClassCastException: com.sun.faces.application.ApplicationAssociate cannot be cast to com.sun.faces.application.ApplicationAssociate and I found a solution of this problem here and did it as said and the problem was solved. I am using JBoss 4.2.2 with JSF 1.2

    This exception can occur if the runtime classpath is polluted with different versioned JSF libraries. JBoss ships with JSF builtin already, so you should not be providing JSF libraries in webapp’s /WEB-INF/lib folder. If it’s of a different version, it will likely collide with exceptions like above.


    Update 2 as per the question update:

    java.lang.NullPointerException
        at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:162)
    

    Well, this is a nasty one and I haven’t seen it before. I’ll bet it to be caused by just a classpath pollution. JBoss 4.2.x ships with JSF 1.2 and JSTL 1.1 already builtin. Please remove jsf*.jar and jstl*.jar libraries from /WEB-INF/lib. Please also remove all JSF-related <context-param> and <listener> entires from web.xml. The ones which you’ve as far are all the JSF 1.2 default already. It may or may not solve your concrete problem, but it should at least minimize the noise. Let me know.


    Update 3 as per the comments:

    I have removed the jars and the entries from web.xml and also uncomment the commented line in jboss-4.2.2.GA/server/default/deploy/jboss-web.deployer/conf/web.xml and now I am getting java.lang.RuntimeException: Cannot find FacesContext. But the previous problem is solved

    Much better. The Cannot find FacesContext error has an easy cause: the FacesServlet hasn’t been invoked. So the request or forward URL didn’t match the URL pattern of the FacesServlet at all. Assuming that you have still mapped your FacesServlet on an URL pattern of /faces/* and that you have a physical /pages/inputname.jsp file in your web content, then all your index.jsp should contain is the following single line (yes, get rid of all that irrelevant HTML as well)

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

    This way just calling

    http://localhost:8080/FBApp/

    should work. If it doesn’t for some reason (let me know) then at least calling

    http://localhost:8080/FBApp/faces/pages/inputname.jsp

    must work.


    Update 4 as per the comments:

    The FacesContext exception is solved but now it is throwing javax.faces.FacesException: java.net.MalformedURLException: Path faces-config.xml does not start with a "/" character.

    Hmm, this is also new to me. How does your web.xml now look like? This suggests that you’ve a javax.faces.CONFIG_FILES context param with a wrong value of faces-config.xml. Try putting the javax.faces.CONFIG_FILES context param with value of /WEB-INF/faces-config.xml back in the web.xml. Perhaps the JSF 1.2 impl used in JBoss has some bug related to this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a web application (While learning JSF from scratch, and thanks to
Learning the basics of XML for the first time from W3C tutorials. How are
learning python, coming from a php background. Keeping it short. Is there a way
I'm currently learning about jsf 2.0 from core jsf 2.0 book + glassfish +
I am learning Jsf.Is there any method for making the spinners read only?I should
I'm currently learning about jsf 2.0 from core jsf 2.0 book + glassfish +
Hi there Im just learning JSF 2 using Primefaces. I have a question regarding
I'm learning about JSF 2.0, I want to know if there is a tool
I am learning JSF and came across this line: <h:messages layout=table></h:messages> in a sample
Learning from my last question , most member names seem to get included in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.