Yes, that's what the documentation says but in my setup here it simply does not work. If i write the s:form tag as you suggest, then the form action property has the value "/context/my/package/myAction_showPage1", i.e. lacks the ".action" extension and so, when the form is submitted, i get a 404 error.

FWIW, here's the struts2-related snippet from my web.xml:

   <filter>
       <filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
       <init-param>
           <param-name>struts.custom.i18n.resources</param-name>
           <param-value>my.package.res.MyResources</param-value>
       </init-param>
       <init-param>
           <param-name>struts.enable.SlashesInActionNames</param-name>
           <param-value>true</param-value>
       </init-param>
   </filter>

   <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>*.action</url-pattern>
   </filter-mapping>
   <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>*.jsp</url-pattern>
   </filter-mapping>

Robert

Paweł Wielgus wrote:
Hi Robert,
shouldn't it be:
<s:form name="theForm" action="myAction_showPage1" namespace="/my/package">
?

Best greetings,
Paweł Wielgus.

2009/1/15 Robert Graf-Waczenski <r...@lsoft.com>:
Hi all,

i'm using S2 since a while now (started with 2.0 betas and using 2.1.6 GA
currently) and one of the issues that i'm still having is that even though
my struts.xml is configured properly (meaning that all the intended action
methods are called as i want them to be called), i'm still seeing this here
on the console for each action invocation:

WARNING: No configuration found for the specified action: ....[details
follow]

Here's what my struts.xml looks like (downstripped, of course):

  <package namespace="/my/package" name="my.package"
extends="struts-default">
      <action name="myAction_*" class="my.package.MyAction" method="{1}">
          <result name="showPage1_Success">/JSP/myPage1.jsp</result>
      </action>
  </package>

A typical <s:form> tag would look so here:

<s:form name="theForm" action="/my/package/myAction_showPage1.action">
...
</s:form>

With this, i get this here on the java console:

WARNING: No configuration found for the specified action:
'/my/package/myAction_showPage1.action' in namespace: '/my/package'. Form
action defaulting to 'action' attribute's literal value.

[Using the wildcard mapping as shown above (which is, btw, a cool feature of
S2 yielding fewer action classes that can be bound semantically to the type
of object they work with and not to the button/link a user is clicking) is a
rather recent change in my struts.xml, i have received the same warnings
without wildcard mapping.]

I would like to get rid of these warnings. I remember vaguely that someone
suggested to configure some logging property somewhere (a pointer on how to
do this would be appreciated, of course) but i would rather prefer to
configure my actions in such a way that the warning is not even triggered.

Any suggestions?

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org





Reply via email to