When the URL for the action is resolved, it wants to insert the prefix
for you. It sounds like that for some reason, it did not see that the
prefix was already there, and tried to insert it again. 

The idea is that you should be able to change the prefix (or suffix)
without touching the JSP's. So, it does not need to be expressed in the
html:form tag.

Some people use 

path="/something.do"

but that's obsolete, and really should be deprectated. 

path="/something"

should work regardless of what is used for the prefix or suffic.

You "do" need to put the full URI in the ActionForward, since in that
context it doesn't know whether you want to link to 

/this

or 

/do/this

Both of which are potentially valid. 

If you changed the suffix or prefix, you would also have to change them
in the Struts config (but not in the JSPs). 

[EMAIL PROTECTED] wrote:
> I still dont know where the /do/do were coming from.
> 
> -----Original Message-----
> From: Chmura, William B.
> Sent: Friday, December 14, 2001 3:11 PM
> To: struts-user
> Subject: /do/do/AmIGoingCrazy? Help needed with /do/actionname
> 
> Hello,
> 
> AAAARRRGGGGHHHHHH  - there now I feel better.
> 
> I am trying to go back into my first attempt at struts and follow some
> of the recommendations of the husted.com catalog - specifically
> implementing the /do/actionname
> 
> I am completely confused on what goes where for what... Let me be more
> specific:
> 
> (Q1) My Global mappings and my actions look like this... Is this
> correct?
> 
>   <!-- ========== Global Forward Definitions
> ============================== -->
>   <global-forwards>
>      <forward name="logon"                path="/do/logon"/>
>      <forward name="mainmenu"             path="/do/mainmenu"/>
>      <forward name="shownewcrform"        path="/do/shownewcrform"/>
>      <forward name="enternewcr"           path="/do/enternewcr"/>
>      <forward name="viewcr"               path="/do/logon"/>
>   </global-forwards>
> 
> (Q2) I have defined a bunch of action mappings that are giving me grief.
> 
>  I have my logon.jsp in the root and the rest under the WEB-INF/jsp
> directory.  What path should the form on my login.jsp have for an
> action?  No matter what combination I try it submits to /do/do/login
> which causes problems.
> 
>   <!-- ========== Action Mapping Definitions
> ============================== -->
>   <action-mappings>
> 
> 
>     <action  path="/do/logon"
>              type="com.ebind.actions.LogonAction"
>              name="LogonForm"
>              scope="request"
>              input="/logon.jsp">
>         <forward name="success" path="/mainmenu"/>
>         <forward name="failure" path="/logon"/>
> 
>     </action>
> 
>     <action  path="/do/mainmenu"
>              type="com.ebind.DispatchForward"
>              name="MainMenu"
>              scope="request"
>              validate="false"
>              parameter="forward">
>         <forward name="forward" path="/WEB-INF/jsp/menumain.jsp"/>
> 
>     </action>
> 
> (Q3) In my forwards above, should I need to do /logon or can I just do
> logon?  Things are broken all over, so when one part seems to work,
> another part stops.
> 
> THANKS!
> 
> Bill Chmura
> Ensign-Bickford Industries, Inc.
> Information Technologies Department
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

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

Reply via email to