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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:27:59+00:00 2026-05-11T19:27:59+00:00

I’m running Tomcat 6.0.18 on Linux. I have a JSP that uses a bean

  • 0

I’m running Tomcat 6.0.18 on Linux.

I have a JSP that uses a bean like this:

<jsp:useBean id="helper"
             type="com.example.SomeType"
             scope="request"/>

The page references an attribute of helper with the expression language like this:

<!-- This works properly, but could fail silently if the bean name is incorrect. -->
<div><p>Here's some stuff: ${helper.stuff}</div>

During some refactoring in which I missed an occurrence of the name helper, I noticed that no error is raised if the name helper is written incorrectly. Not on the screen, and not in my log files. Nothing is produced for the expression language snippet in the output:

<!-- Wrong name! "foo" should be "helper" but no error is observed (other than missing ouput)! -->
<div><p>Here's some stuff: ${foo.stuff}</div>

Now, an error is raised (my custom error page displays and I see an exception in my log file) if I use the following JSP syntax with an incorrect name for helper:

<!-- Wrong name, but an error is raised. -->
<div><p>Here's some stuff: <jsp:getProperty name="foo" property="stuff"/></div>

In this case, the log records this entry:

SEVERE: requestURI: /some.jsp servletName: jsp statusCode: 500
org.apache.jasper.JasperException: Attempted a bean operation on a null object.

For completeness, the jsp:getProperty syntax works properly when the bean name is correct:

<!-- Works properly, protects me from an incorrect name, but is more verbose than EL. -->
<div><p>Here's some stuff: <jsp:getProperty name="helper" property="stuff"/></div>

Why don’t I see an error when I write ${foo.stuff}? Is there some configuration option that controls error reporting in such cases?

  • 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-11T19:27:59+00:00Added an answer on May 11, 2026 at 7:27 pm

    This behaviour is covered in section 1.6 of the Expression Language Specification Version 2.1.

    To evaluate expr-a[expr-b]:

    If value-a is null:

    • If expr-a[expr-b] is the last property being resolved:
      • If the expression is a value expression and
        ValueExpression.getValue(context) was
        called to initiate this expression
        evaluation, return null.
      • Otherwise, throw PropertyNotFoundException. trying to
        de-reference null for an lvalue
    • Otherwise, return null.

    (EL unifies the . and [] operators)

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.