I have also gotten this error and it was not obvious how it happened since the appropriate parameters were where they were supposed to be. You need to think of weird causes like double clicking a link that contains parameters or some how the form is submitted twice, the second time the "command" parameter is not initialized. If an action was bookmarked you can also potentially have problems. I don't think this is a problem of DispatchAction or any of its relatives, MappingDispatchAction etc. I think it is a problem with a funky request.

mas


Paul Benedict wrote:
Unspecified will be called if your "command" parameter does not exist.

On Tue, Oct 20, 2009 at 12:39 AM, Sachi N <mais...@yahoo.co.jp> wrote:
Hello

I posted this question 9months ago but could not get any solutions.
I wonder if anyone can give me some clue now.

--------------------------------------------------------

My client reported that they have received this error only once.
Request[/app/Keyword] does not contain handler parameter named 'command'.
at org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)

They tried to replicate the error to find the cause by doing the exact same 
operation that
the user did, but they were unable.
I've been trying too but I can't figure it out.

I have the following code within a jsp:

.
.

<SCRIPT LANGUAGE="JavaScript">
<!--
   var loadingflg = false;

   function submitExecute(mode, frm, message)
   {
       if (loadingflg == false) {
           if (message != "") {
               if (!window.confirm(message)){
                   return false;
               }
           }
           eval("document.forms[0]." + mode).value = frm;
           loadingflg = true;
           document.forms[0].submit();
       }
       return false;
   }
-->
.
.
.
<html:form action="/app/Keyword" onsubmit="return false">
<html:hidden property="command" />

<html:button property="regist" onclick="return submitExecute('command', 'regist', 
'Regist?');">Regist</html:button>

</html:form>

When you click the 'Regist' button it goes off and registers the data on the 
screen.
I didn't use LookupDispatchAction but DispatchAction.


My struts-config.xml is as follows

       <action path="/app/Keyword"
                type="app.controller.KeywordAppAction"
                name="KeywordAppForm"
                scope="session"
                validate="false"
                parameter="command">
             <forward name="success" path="/app/Keyword.jsp" redirect="false"/>
       </action>

Struts ver is 1.2.9 and the user is using FireFox2.0.
I wonder why this happened?
The client has not gotten the same error since they reported it a couple of 
weeks ago.
Just to avoid that the error happens again, I can override "unspecified" method.
But they wants to know the cause more than countermeasures.

Does anybody have suggestions?

Thanks

Sachi

--------------------------------------
GyaO! - Anime, Dramas, Movies, and Music videos [FREE]
http://pr.mail.yahoo.co.jp/gyao/

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



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



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

Reply via email to