-
FEATURED COMPONENTS
First time here? Check out the FAQ!
In my ZK project, I am using UrlRewriteFilter for friendly urls. The problem is that the upload button won't work, producing an error message in a dialog: "The server is temporarily out of service."
If I take the following out of my web.xml, the upload button works as expected.
<filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>
UrlRewriteFilter is very powerful and easy to use and I would much rather use it than reimplementing everything using Richlets (by the way, this isn't related to ZK bookmarks). For example, in my urlrewrite.xml, I can have:
<rule>
<note>connect/username/cat</note>
<from>^/connect/(*[-]*)/(+)$</from>
<to>/index.zul?bun=$1&cat=$2</to>
</rule>
Any ideas on how to use upload with UrlRewriteFilter?
Hi Richard,
The 'upload' action will do POST repeatedly until upload finished, the POST link is ~/zkau/upload,
maybe it is match some rule and is rewritten?
You can check it by Firebug or Chrome's developer tools.
Regards,
Ben
Asked: 2012-07-21 15:04:14 +0800
Seen: 180 times
Last updated: Jul 25 '12