Thanks for your answer.

I have found the mistake. I had a "#" in my table-tag.

<table background="#">
...
</table>

I don't know why struts execute the action twice, but without the "#" it functions.

-----Urspr�ngliche Nachricht-----
Von: Nicholson, Robb [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 13. Oktober 2003 15:36
An: 'Struts Users Mailing List'
Betreff: RE: struts double action execution!?


We had this problem briefly as well. Make sure you don't have a button that
looks like this on your JSP...

<html:submit ...  onclick="submit()"/>



-----Original Message-----
From: Otto, Frank [mailto:[EMAIL PROTECTED]
Sent: Monday, October 13, 2003 4:55 AM
To: '[EMAIL PROTECTED]'
Subject: struts double action execution!?


Hello,
 
I have a difficult problem. My action was executed twice and I don't know
why.
 
There is a global forward in my main.jsp:
 
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> 
<logic:forward name="startpage"/> 
 
 
struts-config.xml:
 
<struts-config> 
  <global-forwards> 
    <forward 
      name="startpage" 
      path="/action/welcome" /> 

   ... 
  </global-forwards> 

  <action-mappings> 
  
    <action 
      path="/welcome" 
      type="test.actions.CWelcomeAction" 
      name="loginForm" 
      scope="request" 
      validate="false"> 
      <forward 
        name="Success" path="dos.Welcome" />        
    </action> 

    ... 
  </action-mappings> 

 
tiles-def.xml:
 
<tiles-definitions> 
   <definition name="dos.DefaultLayout"
page="/pages/layouts/dosDefaultLayout.jsp"> 
            <put name="header" value="/pages/header/empty.jsp"/> 
            <put name="agb" value="/pages/submenu/common/agb.jsp"/> 
   </definition> 
    
   <definition name="dos.WelcomeLayout" extends="dos.DefaultLayout">

                <put name="header" value="/pages/header/startpage.jsp"/> 
      <put name="mainmenu_top" value="/pages/mainmenu_top/emptymain.jsp"/> 
      <put name="mainmenu_bottom"
value="/pages/mainmenu_bottom/welcomemain.jsp"/> 
      <put name="submenu" value="/pages/submenu/main/login.jsp"/> 
                <put name="navigation" value="/pages/navigation/empty.jsp"/>

   </definition> 
    
   <definition name="dos.Welcome" extends="dos.WelcomeLayout"> 
                <put name="caption"
value="/pages/captions/main/welcome.jsp"/> 
      <put name="content" value="/pages/mainpage/main/welcome.jsp"/> 
   </definition> 
... 
</tiles-definitions>
 
 
That was written in the log-file:
 
DEBUG 2003-10-09 08:50:46,204 - Get module name for path /action 
DEBUG 2003-10-09 08:50:46,204 - Module name found: default 
DEBUG 2003-10-09 08:50:46,205 - Processing a 'GET' for path '/welcome' 
DEBUG 2003-10-09 08:50:46,205 -  Looking for ActionForm bean instance in
scope 'request' under attribute key 'loginForm' 
DEBUG 2003-10-09 08:50:46,205 -  Creating new ActionForm instance of type
'test.forms.main.CLoginForm' 
DEBUG 2003-10-09 08:50:46,205 -  --> [EMAIL PROTECTED] 
DEBUG 2003-10-09 08:50:46,205 -  Storing ActionForm bean instance in scope
'request' under attribute key 'loginForm' 
DEBUG 2003-10-09 08:50:46,206 -  Populating bean properties from this
request 
DEBUG 2003-10-09 08:50:46,206 -
BeanUtils.populate([EMAIL PROTECTED], {}) 
DEBUG 2003-10-09 08:50:46,206 -  Looking for Action instance for class
test.actions.CWelcomeAction 
DEBUG 2003-10-09 08:50:46,206 -   Returning existing Action instance 
DEBUG 2003-10-09 08:50:46,206 - Begin   CWelcomeAction.execute() 
DEBUG 2003-10-09 08:50:46,206 - dispatch:
ActionConfig[path=/welcome,name=loginForm,scope=request,type=test.actions.CW
elcome 
Action 
... 
DEBUG 2003-10-09 08:50:46,211 - End     CWelcomeAction.execute()
DEBUG 2003-10-09 08:50:46,211 - processForwardConfig(dos.Welcome, false) 
DEBUG 2003-10-09 08:50:46,212 - uri=/pages/layouts/dosDefaultLayout.jsp
doInclud 
e=false 
DEBUG 2003-10-09 08:50:46,214 - insert page='/pages/header/startpage.jsp'. 
DEBUG 2003-10-09 08:50:46,219 - insert
page='/pages/mainmenu_bottom/welcomemain. 
jsp'. 
DEBUG 2003-10-09 08:50:46,226 - insert page='/pages/submenu/main/login.jsp'.

DEBUG 2003-10-09 08:50:46,230 - insert page='/pages/submenu/common/agb.jsp'.

DEBUG 2003-10-09 08:50:46,236 - insert page='/pages/navigation/empty.jsp'. 
DEBUG 2003-10-09 08:50:46,238 - insert
page='/pages/captions/main/welcome.jsp'. 
DEBUG 2003-10-09 08:50:46,240 - insert
page='/pages/mainpage/main/welcome.jsp'. 
DEBUG 2003-10-09 08:50:46,242 -   'dos.Welcome' - processed as definition 

THE SECOND ONE:
DEBUG 2003-10-09 08:50:46,522 - Get module name for path /action 
DEBUG 2003-10-09 08:50:46,522 - Module name found: default 
DEBUG 2003-10-09 08:50:46,523 - Processing a 'GET' for path '/welcome' 
DEBUG 2003-10-09 08:50:46,523 -  Looking for ActionForm bean instance in
scope ' 
request' under attribute key 'loginForm' 
DEBUG 2003-10-09 08:50:46,523 -  Creating new ActionForm instance of type
'test.forms.main.CLoginForm' 
DEBUG 2003-10-09 08:50:46,526 -  --> [EMAIL PROTECTED] 
a1d3 
DEBUG 2003-10-09 08:50:46,526 -  Storing ActionForm bean instance in scope
'requ 
est' under attribute key 'loginForm' 
DEBUG 2003-10-09 08:50:46,526 -  Populating bean properties from this
request 
DEBUG 2003-10-09 08:50:46,526 - BeanUtils.populate(test.forms.main 
[EMAIL PROTECTED], {}) 
DEBUG 2003-10-09 08:50:46,526 -  Looking for Action instance for class
test.actions.CWelcomeAction 
DEBUG 2003-10-09 08:50:46,526 -   Returning existing Action instance 
DEBUG 2003-10-09 08:50:46,526 - Begin   CWelcomeAction.execute() 
DEBUG 2003-10-09 08:50:46,526 - dispatch:
ActionConfig[path=/welcome,name=loginF 
orm,scope=request,type=test.actions.CWelcome 
Action 
... 
DEBUG 2003-10-09 08:50:46,548 - End     CWelcomeAction.execute() 
DEBUG 2003-10-09 08:50:46,550 - processForwardConfig(dos.Welcome, false) 
DEBUG 2003-10-09 08:50:46,551 - uri=/pages/layouts/dosDefaultLayout.jsp
doInclud 
e=false 
DEBUG 2003-10-09 08:50:46,555 - insert page='/pages/header/startpage.jsp'. 
DEBUG 2003-10-09 08:50:46,562 - insert
page='/pages/mainmenu_bottom/welcomemain. 
jsp'. 
DEBUG 2003-10-09 08:50:46,577 - insert page='/pages/submenu/main/login.jsp'.

DEBUG 2003-10-09 08:50:46,582 - insert page='/pages/submenu/common/agb.jsp'.

DEBUG 2003-10-09 08:50:46,584 - insert page='/pages/navigation/empty.jsp'. 
DEBUG 2003-10-09 08:50:46,585 - insert
page='/pages/captions/main/welcome.jsp'. 
DEBUG 2003-10-09 08:50:46,586 - insert
page='/pages/mainpage/main/welcome.jsp'. 
DEBUG 2003-10-09 08:50:46,587 -   'dos.Welcome' - processed as definition 

 
 
Has anyone an idea, where the mistake is? I thing all my actions were
executed twice.
 
 
Regards,
 
Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to