You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mi...@honeywell.com on 2002/11/08 14:49:16 UTC

html:link question

Hello,

I'm having a problem with html:link which gives me the Cannot "retrive
ActionForward named /admin" message.  My struts config has:

  <global-forwards>
    <forward   name="welcome"              path="/welcome.do"/>
    <forward   name="adminMenu"            path="/adminMenu.do" />
  </global-forwards>


  <action-mappings>
    <action path="/welcome"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/welcome.jsp"/>

    <action path="/adminMenu"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/admin-menu.jsp"/>
  </action-mappings>

My jsp has:

<html:link forward="adminMenu">Administrative Functions</html:link>

This gives me the error message.  However, if I replace "adminMenu" with
"welcome" it works just fine.  Also, if I use the page attribute it works
for welcome.do and not for adminMenu.do.  Any help is appreciated!

Mike

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: html:link question

Posted by Brian Hickey <bh...@r-effects.com>.
Mike,

Everyone's implementation is a bit different, but my paths all point to
JSP's. The .do is the action mapped in the <action> tag.

Brian

----- Original Message -----
From: <mi...@honeywell.com>
To: <st...@jakarta.apache.org>
Sent: Friday, November 08, 2002 8:49 AM
Subject: html:link question


> Hello,
>
> I'm having a problem with html:link which gives me the Cannot "retrive
> ActionForward named /admin" message.  My struts config has:
>
>   <global-forwards>
>     <forward   name="welcome"              path="/welcome.do"/>
>     <forward   name="adminMenu"            path="/adminMenu.do" />
>   </global-forwards>
>
>
>   <action-mappings>
>     <action path="/welcome"
>         type="org.apache.struts.actions.ForwardAction"
>         parameter="/WEB-INF/pages/welcome.jsp"/>
>
>     <action path="/adminMenu"
>         type="org.apache.struts.actions.ForwardAction"
>         parameter="/WEB-INF/pages/admin-menu.jsp"/>
>   </action-mappings>
>
> My jsp has:
>
> <html:link forward="adminMenu">Administrative Functions</html:link>
>
> This gives me the error message.  However, if I replace "adminMenu" with
> "welcome" it works just fine.  Also, if I use the page attribute it works
> for welcome.do and not for adminMenu.do.  Any help is appreciated!
>
> Mike
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: html:link question

Posted by Hue Holleran <hu...@softwareskills.net>.
As you say "welcome" works fine, your syntax looks fine. However the error
message is a bit strange and doesn't correspond to the name of the forward
or of the action!  All I can really think of - we find ourselves in this
situation a lot by the way and it's always our fault if that's any
consolation at all - is to look for possibly a duplicate definition of
adminMenu action/a forward that may be causing the problem or that it's
actually getting to /WEB-INF/pages/admin-menu.jsp and something there is
giving the error you describe.

BTW I pasted your code into our sample - we seem to use it a lot ourselves!
... and it worked OK, i.e. for the page with a link for "Adm. Funcs." and on
clicking link got a 404: The requested resource
(/WEB-INF/pages/admin-menu.jsp) is not available, as to be expected.

Maybe try posting your complete struts-config.xml?

Sorry can't help,

Hue.

-----Original Message-----
From: mike.witt@honeywell.com [mailto:mike.witt@honeywell.com]
Sent: 08 November 2002 13:49
To: struts-user@jakarta.apache.org
Subject: html:link question


Hello,

I'm having a problem with html:link which gives me the Cannot "retrive
ActionForward named /admin" message.  My struts config has:

  <global-forwards>
    <forward   name="welcome"              path="/welcome.do"/>
    <forward   name="adminMenu"            path="/adminMenu.do" />
  </global-forwards>


  <action-mappings>
    <action path="/welcome"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/welcome.jsp"/>

    <action path="/adminMenu"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/admin-menu.jsp"/>
  </action-mappings>

My jsp has:

<html:link forward="adminMenu">Administrative Functions</html:link>

This gives me the error message.  However, if I replace "adminMenu" with
"welcome" it works just fine.  Also, if I use the page attribute it works
for welcome.do and not for adminMenu.do.  Any help is appreciated!

Mike

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>