You have defined your action as /inventory. This path is a context relative
path so you should be linking to it with something like <a
href="/mycontext/inventory.do">...

What you have done to link to /mycontext/CSSMasters/inventory.do because
you've used a link relative to your page. That's why it can't be found.

To avoid having to explicitly define the context name I would suggest you
look at the <html:link> tag which can use a context relative path or, of you
have a recent struts build, an action. In your case this would be:

<html:link page="/inventory.do"> or <html:link action="/inventory">.

Note that you don't include the .do extension when you specify an action.
Use the path value exactly as defined in your struts-config file.

Steve


> -----Original Message-----
> From: Darrell [mailto:[EMAIL PROTECTED]
> Sent: June 9, 2003 11:13 PM
> To: Struts
> Subject: Call action from link
>
>
>
> I have read alot of the previous posts in the archives, but still can't
> get the link to call an action.
> <a href="inventory.do" onmouseover="P7_trigMM2('p7TBim40')"><img
> src="images/hbnb4.gif" alt="menu 4" name="p7TBim40" id="p7TBim40"
> width="96" height="26" border="0"></a>
>
> I get this error:
> ERROR action.RequestProcessor  - Invalid path /CSSMasters/inventory was
> requested
>
> Is there something wrong with the way I am calling the action?
>
> This is my action mapping:
> <action-mappings>
>      <action name="emerReqForm" type="metokoteca.action.RequestAction"
> validate="true" input="/CSSMasters/emergReq.htm" scope="request"
> path="/request">
>        <forward name="forward" path="/CSSMasters/formSubmit.htm" />
>      </action>
>      <action type="metokoteca.action.InventoryAction" validate="false"
> scope="request" path="/inventory">
>        <forward name="forward" path="/CSSMasters/formSubmit.htm" />
>      </action>
>    </action-mappings>
>
>
> --
> Darrell Bechtel,  B.G.S., MCSE
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to