-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I want to change / hide my url pattern, but can't get it to work.
I have found this http://www.zkoss.org/doc/devguide/ch11s11s02.html, but I am not using richlets.
So right now my url pattern is: $serverurl/$applicationname/Pages/$somefolder/$somezul.zul
My index file is contained in the Pages directory.
What i would like to do would be to reach the index at $serverurl/$applicationname/index.zul and then the url should just stay at that. The user doesn't need to know about my internal folder structure.
Can anybody explain what I need to configure in web.xml or somewhere else to achieve this?
Thank you!
Thanks for your answer iamtsai. So i would have to do that in every controller?
Isn't there a way like in java server pages, where you can specify a url pattern for the whole application in one of the configuration files?
Please forget Page Based programming model, The programming paradigm of ZK is more like Swing & Mozilla XUL than JSP or JSF.
If you really like a configuration file to manage the URL, you can use ZK Macro Component + Language Addon to do it.
Macro Component is a way to wrap your ZUL page as a Composite in Swing, with the definition(Lang-Addon) in zk.xml, you can use it in your zul file just like a real component.
And I've seen some developer even use Spring Framework to configure his own Layout structure.
A ZK's component always need to implement default constructor, that's a huge benefit for you to do anything.
Hi TOtte an iantsai,
May I ask how to you achieve your url ($serverurl/$applicationname/Pages/$somefolder/$somezul.zul) without using richlet??
I trying to make my web page to understand simple URL like
$serverurl/$applicationname/Home
or
$serverurl/$applicationname/Catalog
to more complex URL like
$serverurl/$applicationname/Catalog/ForMen/T-Shirts/BlackAndWhiteTee
but I don't know how. What I use now is Richlet and my pages URL have to be like
$serverurl/$applicationname/RichletName/HomeOrWhatever
I want to get rid of the RichletName in the URL, if that is possible. Any pointers would be greatly appreciated!!!
Thanks in advance!!
Asked: 2010-04-29 11:03:57 +0800
Seen: 393 times
Last updated: May 13 '10