Dear friends,
I've searched everywhere and could not find the source for this problem.
When running my application with Java 6, it works as expected.
When running with Java 7, I get no content.
Example:
in html, I have:
<form ...>
<input type='text' name='acao' value='avancar'>
<input type='text' name='informacoes.documento' value='12345678'>
</form>
The bean is declared with setter and getters as follows:
public class MyBean implements Serializable {
private String acao;
private Informacoes informacoes = new Informacoes();
public MyBeans() {}
public String getAcao() { return acao; }
public void setAcao(String acao) { this.acao = acao; }
public Informacoes getInformacoes() { return this.informacoes; }
public void setInformacoes(Informacoes info) { this.informacoes =
informacoes; }
}
public class Informacoes implements Serializable {
private String documento;
public Informacoes() {}
public String getDocumento() { return this.documento; }
public void setDocumento(String doc) { this.documento = doc; }
}
My servlet make the following call:
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String acao = request.getParameter("acao");
System.out.println("Acao = "+acao); // receive the correct value
either in Java 6 and Java 7: "avancar"
BeanUtils.populate(bean, request.getParameterMap()); // doesn't
fill the values when using Java 7, but works well in Java 6.
...
}
When running with Java 6, works fine, attribute is filled. When running
with Java 7 it doesn't. Does Java 7 add anything new in terms of
validator that would be conflicting?
Can anyone tell me what I'm doing wrong?
I have commons-beanutils-1.8.3.jar in WEB-INF/lib, just to be sure...
and I don't have it in $TOMCAT/lib
Thanks,
Edson
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]