No configuration found for the specified action: 'helloworld.action' in namespac

今天首次使用Struts2,配置一切正常,使用常用tag也正常,但是在使用<s:form>标记时,发现控制台总是输出警告信息,

警告信息内容如下:

警告: No configuration found for the specified action: 'ShowMessage' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2008-9-6 11:35:47 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: 'ShowMessage' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

解决办法很简单:出现错误的原因是:提交表单中action用的是ShowMessage.action  只有表单的action设置为ShowMessae就行了,Struts2会默认追加.action

猜你喜欢

转载自hehongwei44.iteye.com/blog/1491426