struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike La Budde <>
Subject context-relative paths are painfull
Date Thu, 05 Oct 2000 20:42:48 GMT
OK, yes, I'm still wrestling with this issue.

Here's a snippet from my struts actions configuration file:

   <!-- ========== Global Forward Definitions 
============================== -->
     <forward   name="logon"                path="/logon.jsp"/>
     <forward   name="success"              path="/pages/main/index.html"/>
     <forward   name="error"                path="/"/>

   <!-- ========== Action Mapping Definitions 
============================== -->

    <!-- ============================ Error BEGIN 
============================= -->

    <action path="/ErrorActionViewPage"
        <forward name="success"             path="/pages/main/error.jsp"/>

    <action path="/ErrorDtlActionViewPage"
name="success"             path="/pages/main/errorDetail.jsp"/>

    <!-- ============================ Error END 
=============================== -->

If an error occurs I'm getting to /pages/main/error.jsp (thru' the global 
error forward / This error page has a "View 
Details" button on it. However, attempting to view the details hangs or 
gets a 404 (page not found) error. Looking at the console window shows that 
it has somehow lost its context and it thinks its in the ROOT. Changing the 
above forward path for the ErrorDtlActionViewPage to 
path="/mycontextName/pages/main/errorDetail.jsp" works! Ouch! I'm totally 
confused by this behavior. (Not to mention that my earlier confusion 
(dismay?) at having to specify all paths as fully qualified context 
relative in the first place hasn't been satisfactorily cleared up. Hell, I 
got confused just re-reading that last sentence!)

Based on yesterday's exchanges between Craig & Colin I know I'm going to 
have even more fun when I get to the point where I'm configuring security 
for our apps! (Another opportunity...)



View raw message