Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NullPointerException when validate="true" in action mapping

 
Mathur Neni
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I change the validate="true" from validate="false" in the action mapping in struts-config.xml, application is throwing NullPointerException as follows:
TilesRequestP I org.apache.struts.tiles.TilesRequestProcessor Tiles definition factory found for request processor ''.
WebGroup E SRVE0026E: [Servlet Error]-[action]: java.lang.NullPointerException
at org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.................
.................
Is there any relation of validate="true" to Tiles/Menus?
Any guess, please?
 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should add one more method to your form bean
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic