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 978043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:00:05+00:00 2026-05-16T04:00:05+00:00

I have my first JSP page after a couple of years using those framework.

  • 0

I have my first JSP page after a couple of years using those framework. It seems that I do not know how to program JSP anymore.

I am using windows, tomcat 6.0.29, the code is attached. I got following error. Then I check the compiled hello_jsp, the line 22 points to following a couple of lines. I do have el-api.jar, jasper-el.jar in the classpath. Even I comment java part in jsp page, it has the same error. Are there something wrong with my web.xml?

hello_jsp:

public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }



java.lang.NullPointerException
      org.apache.jsp.jsp.hello_jsp._jspInit(hello_jsp.java:22)
      org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
      org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

hello.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="hello" scope="session" class="com.juhani.uml.test.webapp.jsp.HelloTest" />

Let's say: <%= hello.getGreetings() %>


</body>
</html>

web.xml

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

<web-app version="2.5" 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-app_2_5.xsd">

<display-name>Simple UML Tool Test</display-name>

    <servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>com.juhani.uml.test.webapp.HelloWorld</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

    <servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/helloworld</url-pattern>
</servlet-mapping>

    <session-config>
<session-timeout>30</session-timeout>
</session-config>

<!--
    <taglib>
<taglib-uri>/com/sun/web/taglibs/cache</taglib-uri>
<taglib-location>/WEB-INF/sun-web-cache.tld</taglib-location>
</taglib>
-->

</web-app>
  • 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-16T04:00:06+00:00Added an answer on May 16, 2026 at 4:00 am

    Your problem is that you copied server-specific libraries into your /WEB-INF/lib because it seemingly solved the compilation errors. This is however the wrong solution. You will still run into trouble during runtime because the libraries in /WEB-INF/lib get precedence in classloading and due to the wrong location some mandatory stuff is missing and everything will break.

    You should keep those server specific libraries there where they originally belong and not move/copy them around. All you need to do is to just include their disk file system path in the compiletime classpath. The average IDE (Eclipse, Netbeans, etc) can do that in a single click.

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

Sidebar

Related Questions

I have been using JSP,Servlet for quite sometime. I know that whenever we change
I have two text boxes in my jsp page. After entering data on first
I have a .jsp page that the user loads directly. The request it with
I have a JSP page that renders a block of HTML. In normal usage,
Four text boxes are in a JSP page. After entering first text box, when
I have 2 jsp-page. In first jsp-page I use combobox who choosing subject, several
I have 2 pages written in JSP the first page contains: <%@page contentType=text/html pageEncoding=UTF-8%>
I would like to have a single JSP page that will do the following:
I have a JSP that contains the content at the top of my page,
I have this simple JSP page in Eclipse and the first line in the

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.