By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,077 Members | 2,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,077 IT Pros & Developers. It's quick & easy.

Struts Form Problem

P: n/a
Amy
When accessing my JSP I get the following error:
org.apache.jasper.JasperException: Missing message for key
button.next

Can anyone tell me what the problem is? I have tried to figure this
out but am new to building webapps and struts. Thank you for your
help.

My JSP has :
<html:form action="/ContactAction">
<html:submit property="action">
<bean:message key="button.next"/>
</html:submit>
<html:submit property="action">
<bean:message key="button.back"/>
</html:submit>
<html:submit property="action">
<bean:message key="button.finish"/>
</html:submit>
</html:form>

My FormHandler has :

public final class ContactFormHandler extends LookupDispatchAction{
protected Map getKeyMethodMap(){
Map map = new HashMap();
map.put("button.next", "next");
map.put("button.back", "back");
map.put("button.finish", "finish");
return map;
}
public ActionForward next(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
return mapping.findForward("success");
}

public ActionForward back(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
return mapping.findForward("success");
}

public ActionForward finish(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
return mapping.findForward("success");
}

My ApplicationResource.properties file contains only

button.next = Next
button.back = Back
button.finish = Finish
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.