You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/09/20 10:29:37 UTC

DO NOT REPLY [Bug 10478] - Can't use . (dot) in mapped properties

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=10478>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=10478

Can't use . (dot) in mapped properties

hollandr@gis.a-star.edu.sg changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From hollandr@gis.a-star.edu.sg  2004-09-20 08:29 -------
I am using Struts 1.2.2 within Tomcat 5.0.28, both downloaded last week.

When using Struts forms, I am able to retrieve mapped parameters with dotted 
names just fine using lines like this:

   <html:text property="mappedproperty(key.with.a.dot)"/>

The above line correctly fetches the mapped property through my function as 
defined like this:

   public java.lang.String getMappedproperty(java.lang.String key) {}

However, on trying to submit the form using <html:submit/>, I get an exception 
(see below) with identical text to the bug I am attaching this report to. The 
function I have defined looks like this:

   public void setMappedproperty(java.lang.String key, java.lang.Object obj) {}

Does this mean the bug was only fixed for read-only operations, and still 
exists for write operations?

I do realise this may be a Struts error not a Beanutils one, but I am 
uncertain, especially as the error messages are so similar.

Here follows the Tomcat exception stack:

exception 

javax.servlet.ServletException: BeanUtils.populate
	org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497)
	org.apache.struts.action.RequestProcessor.processPopulate
(RequestProcessor.java:798)
	org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:205)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 

java.lang.IllegalArgumentException: Invalid mapped property 'string(gis'
	org.apache.commons.beanutils.PropertyUtils.getMappedProperty
(PropertyUtils.java:564)
	org.apache.commons.beanutils.PropertyUtils.getNestedProperty
(PropertyUtils.java:748)
	org.apache.commons.beanutils.PropertyUtils.getProperty
(PropertyUtils.java:801)
	org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
	org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
	org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
	org.apache.struts.action.RequestProcessor.processPopulate
(RequestProcessor.java:798)
	org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:205)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache 
Tomcat/5.0.28 logs.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org