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

  • Home
  • SEARCH
  • 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 8729061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:45:57+00:00 2026-06-13T08:45:57+00:00

I have read this tutorials it’s an ebook and I’m stuck at deploying the

  • 0

I have read this tutorials it’s an ebook and I’m stuck at deploying the JSP page to my tomcat server by the way it’s a jsp page but it’s using JSF tags I already put my javax.faces-2.1.13 jar at the lib, where is should really belong to..

Here is my JSP page title hello.jsp:

 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>

<html>
<head>
<title>JSF In Action</title>
</head>
<body>
<f:view>
    <h:form id="welcome-form">
        <h:outputText id="welcomeOutput" value="Welcome to JavaServer Faces!" style="font-family: Arial, Sans-serif; font-size: 24; color: green;" />
        <p><h:message id="error" for="helloInput" style="color: red;" /></p>

        <p><h:outputLabel for="helloInput">
            <h:outputText id="helloInputLabel" value="Enter Number of Controls to Display:" />
        </h:outputLabel>
        <h:inputText id="helloInput" value="#{ helloBean.numcontrol }" required="true">
            <f:validateLongRange minimum="1" maximum="500" />
        </h:inputText></p>

        <p><h:panelGrid id="controlPanel" binding="#{ helloBean.controlPanel }" columns="20" border="1" cellspacing="0">
        </h:panelGrid></p>
        <h:commandButton id="redisplaycommand" type="submit" value="Redisplay" actionListener="#{ helloBean.addControl }" />
        <h:commandButton id="goodbyecommand" type="submit" value="GoodBye" action="#{ helloBean.goodbye }" immediate="true" />
    </h:form>
</f:view>
</body>
</html>

And this is the stack trace error that I get:

 SEVERE: Servlet.service() for servlet [jsp] in context with path [/SampleJSF1] threw exception [An exception occurred processing JSP page /hello.jsp at line 5

2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
3: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
4: 
5: <f:view>
6: <html>
7: <head>
8: <title>


Stacktrace:] with root cause
java.lang.NullPointerException
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858)
    at org.apache.jsp.hello_jsp._jspx_meth_f_005fview_005f0(hello_jsp.java:126)
    at org.apache.jsp.hello_jsp._jspService(hello_jsp.java:100)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Anyone that can help guys I really appreciate it. 🙂

  • 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-06-13T08:45:58+00:00Added an answer on June 13, 2026 at 8:45 am
    java.lang.NullPointerException
        at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858)
    

    The FacesContext is null at that point. This means that the FacesServlet didn’t do its job. The stacktrace is also evidence of this; the line at javax.faces.webapp.FacesServlet.service() is missing.

    The request URL needs to match the <url-pattern> of the FacesServlet as you’ve configured in /WEB-INF/web.xml in order to properly invoke it.

    So, if it’s for example <url-pattern>*.jsf</url-pattern>, then you should open the page by /hello.jsf instead of /hello.jsp in browser address bar.


    Unrelated to the concrete problem, JSP is deprecated since JSF 2.0. You should be discarding this legacy view technology and be looking at its successor Facelets. You should make absolutely sure that you aren’t reading books/tutorials/resources targeted on JSF 1.x instead of JSF 2.x. A lot of things are done differently in JSF 2.x as opposed to 1.x, which would in long term only lead to confusion among starters.

    See also:

    • Can not find the tag library descriptor for http://java.sun.com/jsf/facelets
    • How to include another XHTML in XHTML using JSF 2.0 Facelets?
    • Migrating from JSF 1.2 to JSF 2.0
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read several tutorials, but I just can't this to work. My apache
i HAVE read many Tutorials on posting to twitter using OAuth like here but
I have read this question and the simple and clear answer but it's not
I have read this question but it's not quite what I was looking for.
First let me say I have read this useful article thoroughly and am using
I have read from this article http://codahale.com/how-to-safely-store-a-password/ and it says using a salt isn't
I have read several tutorials but I still do not have any clue :-)
Well I have read those posts and tutorials but they made me more confused:
Im having problems with Modernizr. According to the beginner tutorials i have read this
All the tutorials that I have read work like this: class HelloWorldActor extends Actor

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.