Announcement Announcement Module
No announcement yet.
Help Me This Error In Spring ''items' must not be null' Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Me This Error In Spring ''items' must not be null'

    Dear all,

    I am beginner for Spring, I have a Demo. But it happens with this errors:

    org.apache.jasper.JasperException: java.lang.IllegalArgumentException: 'items' must not be null
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(
    org.apache.jasper.servlet.JspServletWrapper.servic e(
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi
    org.springframework.web.servlet.view.AbstractView. render(
    org.springframework.web.servlet.DispatcherServlet. render(
    org.springframework.web.servlet.DispatcherServlet. doDispatch(
    org.springframework.web.servlet.DispatcherServlet. doService(
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
    org.springframework.web.servlet.FrameworkServlet.d oGet(
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    This link for my Demo

    Plz, help me!!!

    I will send you my demo!!!

  • #2
    null lists referred by items property of form:options tag might be the reason

    Hi memberhieu,

    I hope you must have already overcome this issue but still wanted to post something to help others.

    This error comes when we have a <form:options /> tag(or any other tag which takes list as property) on our view(jsp) and the items attribute is referring to a list which is null.

    for example:

    <form:select path="country" >
         <form:options items="${countryList}" />
    in the above case countryList is a simple list containing string objects having country names and to avoid error a not null list should be set in any scope with the name "counrtyList".

    It can be set in request scope i.e. can be added to ModelAndView object returned by controller (most common place).


    • #3
      Hi Devesh,

      I am very happy to receive your replies.
      I will try to do it.

      Once again
      Thank you so much.