You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jonathan <ja...@i-2000.com> on 2001/07/06 02:14:16 UTC
processPath() method returning the wrong path
I am submitting to an Action which FORWARDS to a second Action, which REDIRECTS to a third Action which FORWARDS to a jsp
Action1-----(f)---->Action2-----(r)---->Action3-----(f)---->jsp
Action 3 never gets triggered because the mapping somehow does not match. When I look to see the mapping the ActionServlet generates, it appears that it has calculated the path incorrectly
HERE ARE MY STEPS
=============================================
step 1 - I am on localhost
http://localhost:7001/successmtgs/index.jsp
I jump to another server via a link
step 2 - I am on another server
http://anotherhost:8007/successmtgs/signin.jsp
I submit a form to /process_logon.do
step 3 - the servlet is triggered and runs an action
path="/process_logon"
this action FORWARDS to another action path="/presecure_jump.do"
step 4 - this second action is run
path="/presecure_jump"
this action REDIRECTS to another action path="/postsecure_jump.do"
(dies here..........................)
step 5 - ACTION NEVER GETS RUN BECAUSE "No mapping available for path "/successmtgs/postsecure_jump"
path="/postsecure_jump"
FORWARD to path="/successmtgs/index.jsp"
=============================================
I end up at the following URI with the following message
http://localhost:7001/successmtgs/postsecure_jump.do Invalid path /successmtgs/postsecure_jump was requested
The path that is being looked up for the mapping is "/successmtgs/postsecure_jump".
I shouldnt get this value because the ActionServlet's processPath() method is supposed to
find the last occurence of a "/" [int slash = path.lastIndexOf("/");]
So my path to match becomes - /successmtgs/postsecure_jump
instead of - /postsecure_jump
Now the mapping is wrong and I wont be able to forward