Hi Filip,

yes, I'm using Index page,  the only issue is, when you return the correct
page in the onActivate, the URL in the browser got changed. how to do this
in index page? something like a servlet forward?


Filip S. Adamsen-2 wrote:
> 
> That is, as far as I know, not possible.
> 
> But if you really need to have URLs that look like that, why not use the 
> Index page for it? That should do exactly what you want...
> 
> -Filip
> 
> On 2008-08-15 10:12, Angelo Chen wrote:
>> Hi,
>> 
>> I'm trying to some url rewriting in the Index.java:
>> 
>> I have this:
>> http://mydomain.com/item/123
>> 
>> which displays item 123, now if user type url:http://mydomain.com/123,
>> I'll
>> forward it in onActivate to /item/123 as follows:
>> 
>> Object onActivate(Object[] obj) {
>>       if (obj.length > 0) {
>>           String code = (String) obj[0];
>>              return
>> resources.createPageLink(Utils.getClassBaseName(Item.class.getName()),
>> true,
>> code);
>>       } else
>>              return Home.class;
>>   }
>> 
>> 
>> This works well, however, a little problem:
>> 
>> when user type: http://mydomain.com/123
>> url displayed in the browser is http://mydomain.com/item/123
>> 
>> is there a way to just keep it like http://mydomain.com/123 in the
>> browser?
>> 
>> Thanks,
>> 
>> Angelo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-forwarding-page-but-no-change-in-the-url--tp18995306p19000288.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to