Re: Problem in action forwarding
Found my own problem In one of my include JSP I have this html tag defined html:img page= width=1 height=6/ This will trigger the Struts frmawork to execute contextpath/index.jsp if you have this html:img page= / in your JSP page Wonder if this the way how struts work or this is a bug. --- wilson wong [EMAIL PROTECTED] wrote: Greeting Setup Win 2K , Tomcat 5.0.28 with struts 1.2.7 Problem: Every action being forward to always execute the webapps/mycontext/index.jsp prior to the action being invoked Web.xml welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list index.jsp %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % System.out.println(-- MAIN INDEX.JSP ); % logic:redirect action=/enter/ struts-config.xml action path=/enter scope=request type=org.storeorder.store.catalog.action.EnterAction validate=false forward name=sucess path=/catalog/catalog.jsp/ /action actionpath=/storeinfo forward=/catalog/aboutus.jsp/ in catalog.jsp tr td colspan=3 bgcolor=#D0DCEE ul li class=PurpleBulletLinksstronga href=%=request.getContextPath()%/storeinfo.doAbout Us /a /strong/li when I click on the About Us this is what happen From the server log DEBUG 15:19:20 ModuleUtils - Get module name for path /storeinfo.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/storeinfo' DEBUG 15:19:20 RequestProcessor - Delegating via forward to '/catalog/aboutus.jsp' -- MAIN INDEX.JSP DEBUG 15:19:20 ModuleUtils - Get module name for path /enter.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/enter' DEBUG 15:19:20 RequestProcessor - Looking for Action instance for class org.sto reorder.store.catalog.action.EnterAction DEBUG 15:19:20 RequestProcessor - Returning existing Action instance Inside Enter Action DEBUG 15:19:20 EnterAction - EnterAction - Exit 0 DEBUG 15:19:20 RequestProcessor - processForwardConfig(ForwardConfig[name=sucess ,path=/catalog/catalog.jsp,redirect=false,contextRelative=false,module=null]) It seems to me it went back and execute the index.jsp again before execute /catalog/aboutus.jsp It happens in all other action, it always executes the index.jsp from the context path first why ? Any Clue ? Thanks in advance Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in action forwarding
On the surface at least, that seems to be how I would expect it to work... I would think the tag renders as: img src=/ width=1 height=6 ...you might also see the context before that slash, I'm not sure... Since you have defined a welcome page, and since this request would map to it, it makes sense that the JSP would execute and you'd see the message in the console as you do. Being in an img tag too it makes sense that you wouldn't have seen anything on the page to clue you in, except a broken image icon, which is just subtle enough to easily miss :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, August 24, 2005 3:19 pm, wilson wong said: Found my own problem In one of my include JSP I have this html tag defined html:img page= width=1 height=6/ This will trigger the Struts frmawork to execute contextpath/index.jsp if you have this html:img page= / in your JSP page Wonder if this the way how struts work or this is a bug. --- wilson wong [EMAIL PROTECTED] wrote: Greeting Setup Win 2K , Tomcat 5.0.28 with struts 1.2.7 Problem: Every action being forward to always execute the webapps/mycontext/index.jsp prior to the action being invoked Web.xml welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list index.jsp %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % System.out.println(-- MAIN INDEX.JSP ); % logic:redirect action=/enter/ struts-config.xml action path=/enter scope=request type=org.storeorder.store.catalog.action.EnterAction validate=false forward name=sucess path=/catalog/catalog.jsp/ /action actionpath=/storeinfo forward=/catalog/aboutus.jsp/ in catalog.jsp tr td colspan=3 bgcolor=#D0DCEE ul li class=PurpleBulletLinksstronga href=%=request.getContextPath()%/storeinfo.doAbout Us /a /strong/li when I click on the About Us this is what happen From the server log DEBUG 15:19:20 ModuleUtils - Get module name for path /storeinfo.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/storeinfo' DEBUG 15:19:20 RequestProcessor - Delegating via forward to '/catalog/aboutus.jsp' -- MAIN INDEX.JSP DEBUG 15:19:20 ModuleUtils - Get module name for path /enter.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/enter' DEBUG 15:19:20 RequestProcessor - Looking for Action instance for class org.sto reorder.store.catalog.action.EnterAction DEBUG 15:19:20 RequestProcessor - Returning existing Action instance Inside Enter Action DEBUG 15:19:20 EnterAction - EnterAction - Exit 0 DEBUG 15:19:20 RequestProcessor - processForwardConfig(ForwardConfig[name=sucess ,path=/catalog/catalog.jsp,redirect=false,contextRelative=false,module=null]) It seems to me it went back and execute the index.jsp again before execute /catalog/aboutus.jsp It happens in all other action, it always executes the index.jsp from the context path first why ? Any Clue ? Thanks in advance Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in action forwarding
Greeting Setup Win 2K , Tomcat 5.0.28 with struts 1.2.7 Problem: Every action being forward to always execute the webapps/mycontext/index.jsp prior to the action being invoked Web.xml welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list index.jsp %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % System.out.println(-- MAIN INDEX.JSP ); % logic:redirect action=/enter/ struts-config.xml action path=/enter scope=request type=org.storeorder.store.catalog.action.EnterAction validate=false forward name=sucess path=/catalog/catalog.jsp/ /action actionpath=/storeinfo forward=/catalog/aboutus.jsp/ in catalog.jsp tr td colspan=3 bgcolor=#D0DCEE ul li class=PurpleBulletLinksstronga href=%=request.getContextPath()%/storeinfo.doAbout Us /a /strong/li when I click on the About Us this is what happen From the server log DEBUG 15:19:20 ModuleUtils - Get module name for path /storeinfo.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/storeinfo' DEBUG 15:19:20 RequestProcessor - Delegating via forward to '/catalog/aboutus.jsp' -- MAIN INDEX.JSP DEBUG 15:19:20 ModuleUtils - Get module name for path /enter.do DEBUG 15:19:20 ModuleUtils - Module name found: default DEBUG 15:19:20 RequestProcessor - Processing a 'GET' for path '/enter' DEBUG 15:19:20 RequestProcessor - Looking for Action instance for class org.sto reorder.store.catalog.action.EnterAction DEBUG 15:19:20 RequestProcessor - Returning existing Action instance Inside Enter Action DEBUG 15:19:20 EnterAction - EnterAction - Exit 0 DEBUG 15:19:20 RequestProcessor - processForwardConfig(ForwardConfig[name=sucess ,path=/catalog/catalog.jsp,redirect=false,contextRelative=false,module=null]) It seems to me it went back and execute the index.jsp again before execute /catalog/aboutus.jsp It happens in all other action, it always executes the index.jsp from the context path first why ? Any Clue ? Thanks in advance Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]