Re: struts double action execution!?
[email protected] Thu, 9 Oct 2003 23:30:17 +1000
| Newsgroups | gmane.comp.java.mvc.devel |
|---|---|
| Message-ID | <OFD1D4B27E.C8824CA2-ONCA256DBA.004A1A68-CA256DBA.0049A097@multitask.com.au> |
This is a multipart message in MIME format. --=_alternative 0049A092CA256DBA_= Content-Type: text/plain; charset="US-ASCII" Have you sub-classed the RequestProcessor? if so I would look in there to see if there are any hassles with the code. Cheers, Kristen. -- Kristen Gillard Multitask Consulting Pty Ltd Lvl 8, 20 Loftus Street, Circular Quay, NSW, 2000 -- Ph: 61-2-9252-1462 Fx: 61-2-9252-4636 Mo: 0409-000-123 -- http://www.multitask.com.au/ "Otto, Frank" <[email protected]> Sent by: [email protected] 09/10/2003 10:37 PM Please respond to [email protected] To "'[email protected]'" <[email protected]> cc Subject [MVC-Programmers] 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 - --> test.forms.main.CLoginForm@f507d2 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(test.forms.main.CLoginForm@f507d2, {}) 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.CWelcome 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 - --> test.forms.main.CLoginForm@d4 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 .CLoginForm@d4a1d3, {}) 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 --=_alternative 0049A092CA256DBA_= Content-Type: text/html; charset="US-ASCII" <br><font size=2 face="sans-serif">Have you sub-classed the RequestProcessor? if so I would look in there to see if there are any hassles with the code.</font> <br> <br><font size=2 face="sans-serif">Cheers,</font> <br> <br><font size=2 face="sans-serif">Kristen.</font> <br><font size=2 face="sans-serif">--<br> Kristen Gillard<br> Multitask Consulting Pty Ltd<br> Lvl 8, 20 Loftus Street,<br> Circular Quay, NSW, 2000<br> --<br> Ph: 61-2-9252-1462<br> Fx: 61-2-9252-4636<br> Mo: 0409-000-123<br> --<br> http://www.multitask.com.au/</font> <br> <br> <br> <table width=100%> <tr valign=top> <td width=40%><font size=1 face="sans-serif"><b>"Otto, Frank" <[email protected]></b> </font> <br><font size=1 face="sans-serif">Sent by: [email protected]</font> <p><font size=1 face="sans-serif">09/10/2003 10:37 PM</font> <table border> <tr valign=top> <td bgcolor=white> <div align=center><font size=1 face="sans-serif">Please respond to<br> [email protected]</font></div></table> <br> <td width=59%> <table width=100%> <tr> <td> <div align=right><font size=1 face="sans-serif">To</font></div> <td valign=top><font size=1 face="sans-serif">"'[email protected]'" <[email protected]></font> <tr> <td> <div align=right><font size=1 face="sans-serif">cc</font></div> <td valign=top> <tr> <td> <div align=right><font size=1 face="sans-serif">Subject</font></div> <td valign=top><font size=1 face="sans-serif">[MVC-Programmers] struts double action execution!?</font></table> <br> <table> <tr valign=top> <td> <td></table> <br></table> <br> <br> <br><font size=2 face="Arial">Hello,</font> <br><font size=3> </font> <br><font size=2 face="Arial">I have a difficult problem. My action was executed twice and I don't know why.</font> <br><font size=3> </font> <br><font size=2 face="Arial">There is a global forward in my main.jsp:</font> <br><font size=3> </font> <br><font size=2 face="Arial"><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <br> <logic:forward name="startpage"/> </font> <br><font size=3> </font> <br><font size=3> </font> <br><font size=2 face="Arial"><b>struts-config.xml:</b></font> <br><font size=3> </font> <br><font size=2 face="Arial"><struts-config> <br> <global-forwards> <br> <forward <br> name="startpage" <br> path="/action/welcome" /> <br> <br> ... <br> </global-forwards> <br> <br> <action-mappings> <br> <br> <action <br> path="/welcome" <br> type="test.actions.CWelcomeAction" <br> name="loginForm" <br> scope="request" <br> validate="false"> <br> <forward <br> name="Success" path="dos.Welcome" /> <br> </action> <br> <br> ... <br> </action-mappings> </font> <br><font size=3> </font> <br><font size=2 face="Arial"><b>tiles-def.xml:</b></font> <br><font size=3> </font> <br><font size=2 face="Arial"><tiles-definitions> <br> <definition name="dos.DefaultLayout" page="/pages/layouts/dosDefaultLayout.jsp"> <br> <put name="header" value="/pages/header/empty.jsp"/> <br> <put name="agb" value="/pages/submenu/common/agb.jsp"/> <br> </definition> <br> <br> <definition name="dos.WelcomeLayout" extends="dos.DefaultLayout"> <br> <put name="header" value="/pages/header/startpage.jsp"/> <br> <put name="mainmenu_top" value="/pages/mainmenu_top/emptymain.jsp"/> <br> <put name="mainmenu_bottom" value="/pages/mainmenu_bottom/welcomemain.jsp"/> <br> <put name="submenu" value="/pages/submenu/main/login.jsp"/> <br> <put name="navigation" value="/pages/navigation/empty.jsp"/> <br> </definition> <br> <br> <definition name="dos.Welcome" extends="dos.WelcomeLayout"> <br> <put name="caption" value="/pages/captions/main/welcome.jsp"/> <br> <put name="content" value="/pages/mainpage/main/welcome.jsp"/> <br> </definition> <br> ... <br> </tiles-definitions></font> <br><font size=3> </font> <br><font size=3> </font> <br><font size=2 face="Arial">That was written in the log-file:</font> <br><font size=3> </font> <br><font size=2 face="Arial">DEBUG 2003-10-09 08:50:46,204 - Get module name for path /action <br> DEBUG 2003-10-09 08:50:46,204 - Module name found: default <br> DEBUG 2003-10-09 08:50:46,205 - Processing a 'GET' for path '/welcome' <br> DEBUG 2003-10-09 08:50:46,205 - Looking for ActionForm bean instance in scope 'request' under attribute key 'loginForm' <br> DEBUG 2003-10-09 08:50:46,205 - Creating new ActionForm instance of type 'test.forms.main.CLoginForm' <br> DEBUG 2003-10-09 08:50:46,205 - --> test.forms.main.CLoginForm@f507d2 <br> DEBUG 2003-10-09 08:50:46,205 - Storing ActionForm bean instance in scope 'request' under attribute key 'loginForm' <br> DEBUG 2003-10-09 08:50:46,206 - Populating bean properties from this request <br> DEBUG 2003-10-09 08:50:46,206 - BeanUtils.populate(test.forms.main.CLoginForm@f507d2, {}) <br> DEBUG 2003-10-09 08:50:46,206 - Looking for Action instance for class test.actions.CWelcomeAction <br> DEBUG 2003-10-09 08:50:46,206 - Returning existing Action instance <br> DEBUG 2003-10-09 08:50:46,206 - Begin CWelcomeAction.execute() <br> DEBUG 2003-10-09 08:50:46,206 - dispatch: ActionConfig[path=/welcome,name=loginForm,scope=request,type=test.actions.CWelcome <br> Action <br> ... <br> DEBUG 2003-10-09 08:50:46,211 - End CWelcomeAction.execute() <br> DEBUG 2003-10-09 08:50:46,211 - processForwardConfig(dos.Welcome, false) <br> DEBUG 2003-10-09 08:50:46,212 - uri=/pages/layouts/dosDefaultLayout.jsp doInclud <br> e=false <br> DEBUG 2003-10-09 08:50:46,214 - insert page='/pages/header/startpage.jsp'. <br> DEBUG 2003-10-09 08:50:46,219 - insert page='/pages/mainmenu_bottom/welcomemain. <br> jsp'. <br> DEBUG 2003-10-09 08:50:46,226 - insert page='/pages/submenu/main/login.jsp'. <br> DEBUG 2003-10-09 08:50:46,230 - insert page='/pages/submenu/common/agb.jsp'. <br> DEBUG 2003-10-09 08:50:46,236 - insert page='/pages/navigation/empty.jsp'. <br> DEBUG 2003-10-09 08:50:46,238 - insert page='/pages/captions/main/welcome.jsp'. <br> DEBUG 2003-10-09 08:50:46,240 - insert page='/pages/mainpage/main/welcome.jsp'. <br> DEBUG 2003-10-09 08:50:46,242 - 'dos.Welcome' - processed as definition <br> <b><br> THE SECOND ONE:</b></font> <br><font size=2 face="Arial">DEBUG 2003-10-09 08:50:46,522 - Get module name for path /action <br> DEBUG 2003-10-09 08:50:46,522 - Module name found: default <br> DEBUG 2003-10-09 08:50:46,523 - Processing a 'GET' for path '/welcome' <br> DEBUG 2003-10-09 08:50:46,523 - Looking for ActionForm bean instance in scope ' <br> request' under attribute key 'loginForm' <br> DEBUG 2003-10-09 08:50:46,523 - Creating new ActionForm instance of type 'test.forms.main.CLoginForm' <br> DEBUG 2003-10-09 08:50:46,526 - --> test.forms.main.CLoginForm@d4 <br> a1d3 <br> DEBUG 2003-10-09 08:50:46,526 - Storing ActionForm bean instance in scope 'requ <br> est' under attribute key 'loginForm' <br> DEBUG 2003-10-09 08:50:46,526 - Populating bean properties from this request <br> DEBUG 2003-10-09 08:50:46,526 - BeanUtils.populate(test.forms.main <br> .CLoginForm@d4a1d3, {}) <br> DEBUG 2003-10-09 08:50:46,526 - Looking for Action instance for class test.actions.CWelcomeAction <br> DEBUG 2003-10-09 08:50:46,526 - Returning existing Action instance <br> DEBUG 2003-10-09 08:50:46,526 - Begin CWelcomeAction.execute() <br> DEBUG 2003-10-09 08:50:46,526 - dispatch: ActionConfig[path=/welcome,name=loginF <br> orm,scope=request,type=test.actions.CWelcome <br> Action <br> ... <br> DEBUG 2003-10-09 08:50:46,548 - End CWelcomeAction.execute() <br> DEBUG 2003-10-09 08:50:46,550 - processForwardConfig(dos.Welcome, false) <br> DEBUG 2003-10-09 08:50:46,551 - uri=/pages/layouts/dosDefaultLayout.jsp doInclud <br> e=false <br> DEBUG 2003-10-09 08:50:46,555 - insert page='/pages/header/startpage.jsp'. <br> DEBUG 2003-10-09 08:50:46,562 - insert page='/pages/mainmenu_bottom/welcomemain. <br> jsp'. <br> DEBUG 2003-10-09 08:50:46,577 - insert page='/pages/submenu/main/login.jsp'. <br> DEBUG 2003-10-09 08:50:46,582 - insert page='/pages/submenu/common/agb.jsp'. <br> DEBUG 2003-10-09 08:50:46,584 - insert page='/pages/navigation/empty.jsp'. <br> DEBUG 2003-10-09 08:50:46,585 - insert page='/pages/captions/main/welcome.jsp'. <br> DEBUG 2003-10-09 08:50:46,586 - insert page='/pages/mainpage/main/welcome.jsp'. <br> DEBUG 2003-10-09 08:50:46,587 - 'dos.Welcome' - processed as definition </font> <br><font size=3> </font> <br><font size=3> </font> <br><font size=2 face="Arial">Has anyone an idea, where the mistake is? I thing all my actions were executed twice.</font> <br><font size=3> </font> <br><font size=3> </font> <br><font size=2 face="Arial">Regards,</font> <br><font size=3> </font> <br><font size=2 face="Arial">Frank</font> <br> --=_alternative 0049A092CA256DBA_=--