• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts validation in Version 1.3.5

 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the error as follows

java.lang.NoSuchMethodError: org.apache.struts.action.ActionErrors.add(Ljava/lang/String;Lorg/apache/struts/action/ActionError V
com.LoginForm.validate(Unknown Source)
org.apache.struts.chain.commands.servlet.ValidateActionForm.validate(ValidateActionForm.java:53)
org.apache.struts.chain.commands.AbstractValidateActionForm.execute(AbstractValidateActionForm.java:100)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ingoba,
Is Struts in your runtime classpath?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ActionError class has been removed from Struts 1.3.5, but the ActionErrors class remains. Therefore, when you add an error message to an ActionErrors instance, you must use an instance of ActionMessage rather than ActionError. Example:

See the javadoc for details.
 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic