Sounds like getStartingLocation is returning a null, and so <bean:write> can't call getLocationId on a null object.

K.C.

Mick Knutson wrote:

I tried that:
<bean:write name="alert" property="startingLocation.locationId" />

But got this error:
Tag 'insert' can't insert page '/WEB-INF/default/body/alert.list.jsp'. Check if it exists. Null property value for 'startingLocation' java.lang.IllegalArgumentException: Null property value for 'startingLocation' at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:891) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286) at org.apache.jsp.alert$list$jsp._jspService(alert$list$jsp.java:419) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:192) at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:121) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at org.apache.jsp.default$jsp._jspService(default$jsp.java:381) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:192) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:129) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:309) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) at com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:40) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342) at com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334) at com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:48) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)




---
Thanks...
Mick Knutson
---





From: "Nick" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: nested bean parameters
Date: Sun, 29 Jun 2003 05:55:51 -0400

Mike,

Are you still having a problem with this?  If so...looking at your
original JSP tags, I am sure that the problem is with your names not
matching up.  This is what needs to happen:

<logic:iterate id="alert" name="alertListForm" property="userAlerts">
  <bean:write name="alert" property="startingLocation.locationId" />
</logic:iterate>

In the object called "alertListForm", there must be a getter and setter
for "userAlerts": getUserAlerts() and setUserAlerts(Collection
userAlerts).  Those methods will return and accept a collection of
objects that in this case are LocationDTO's.

When you iterate, each object in the iteration will be known as an
"alert", so the property that you specify has to have a getter/setter.
In this case, your property should be "locationId".  Once again, insure
that you have the matching getter/setter methods: getLocationId() &
setLocationId(String locationId).

You do need to be careful with the capitalization.  We have found that
sticking to the java naming standard works best.  Defining a property
that begins with an uppercase throws Struts for a loop.

Hope this helps,
Nick




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to