You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Struts Two <st...@yahoo.ca> on 2008/06/02 17:41:46 UTC

s:url does not render url properly

I have the following code snippet in my jsp:
      <s:url action="goToRegistration" namespace="user" id="registerUrl">
       <s:param name="user.cnum" value="<s:property vaue='cnum'/>"/>
      </s:url>
      <a href="<s:property value='#registerUrl'/>">Register</a>
The page url were the code is rendered is ....localhost:9445/ccol/ticket/newTicketOwnerList.action where "ccol" is the context root. When I click on the link the page goes to the following url  ...localhost:9445/ccol/ticket/user/goToRegistration.action which is wrong. I want the url go to the following url:
...localhost:9445/ccol/user/goToRegistration.action, that is to say I want to have user namespace and action appended to the context rool. Any ideas what I am doing wrong.
thanx,


      __________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php

Re: s:url does not render url properly

Posted by Musachy Barroso <mu...@gmail.com>.
the use namespace="/user" in the url tag

On Mon, Jun 2, 2008 at 11:41 AM, Struts Two <st...@yahoo.ca> wrote:
> I have the following code snippet in my jsp:
>       <s:url action="goToRegistration" namespace="user" id="registerUrl">
>        <s:param name="user.cnum" value="<s:property vaue='cnum'/>"/>
>       </s:url>
>       <a href="<s:property value='#registerUrl'/>">Register</a>
> The page url were the code is rendered is ....localhost:9445/ccol/ticket/newTicketOwnerList.action where "ccol" is the context root. When I click on the link the page goes to the following url  ...localhost:9445/ccol/ticket/user/goToRegistration.action which is wrong. I want the url go to the following url:
> ...localhost:9445/ccol/user/goToRegistration.action, that is to say I want to have user namespace and action appended to the context rool. Any ideas what I am doing wrong.
> thanx,
>
>
>      __________________________________________________________________
> Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org