-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hellow guys
problem description: i have file in application root:
userrights.zhtml
and to go to page userrights.zhtml i have to put in url: ..:8080/app/userrights.zhtml but how to change that to url like this: ..:8080/app/userrights (without file extention)
Not a 100% solution, but the simplest thing servlet containers offer is the <welcome-file-list>
As mentioned in our example web.xml just add index.zhtml
<welcome-file-list>
<welcome-file>index.zul</welcome-file>
<welcome-file>index.zhtml</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
Instead of just the file userrights.zhtml
you can then create a folder with an index.zhtml inside, e.g. /userrights/index.zhtml
then you can access this file from the URL ..:8080/app/userrights
Maybe that's already enough, and doesn't require additional configuration/code. However if you need custom forwarding rules, you can always implement a servlet filter and forward requests as needed. Or add forwarding rules to your webserver, such as nginx or apache httpd.
Asked: 2019-07-03 19:14:35 +0800
Seen: 7 times
Last updated: Jul 04 '19
[ZK8.6 Preview] New media components coming soon!
Bug in Datebox with lenient=false and value 01.04.1981?
javascript cannot catch id of zul component. Please help.
failed to utilize getTop(), getLeft() on div(component). Please help.
Serving zul files from a directory outside web application