This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes struts-config.xml:default for action tag input attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts-config.xml:default for action tag input attribute " Watch "struts-config.xml:default for action tag input attribute " New topic
Author

struts-config.xml:default for action tag input attribute

Timothy Toe
Ranch Hand

Joined: Oct 19, 2002
Posts: 156
The input attribute specifies which jsp page the ActionServlet will forward the control to when there are errors. What happens if I omit this attribute ? What is the default behaviour ?


Thanks.
[ March 17, 2004: Message edited by: Timothy Toh ]
Srikanth Shenoy
author
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
If no input is specified and there are validation errors, then an error is thrown.
Here is the rekevant code from the RequestProcessor:
String input = mapping.getInput();
if (input == null) {
if (log.isTraceEnabled()) {
log.trace(" Validation failed but no input form available");
}
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
getInternal().getMessage("noInput",
mapping.getPath()));
return (false);
}


Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts-config.xml:default for action tag input attribute
 
Similar Threads
no getter method
Cannot retrieve definition for form bean null
Action servlet not found
Cannot find ActionMappings or ActionFormBeans collection
struts-config.xml:Why form def need a separate section?