-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
in a special circumstance, I have to read flow definition from a Servlet.
That is, I have to do something like this:
<?init class="org.zkoss.zwf.FlowHandler" arg0="http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml"?>
However, this results in the following exception:
java.lang.IllegalArgumentException: Illegal path: http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml
Is there any workaround to this?
I guess I have to derive from org.zkoss.zwf.FlowHandler, but I don't know where to start.
Appreciate for any suggestions, thanks!
Hi ~~
From the exception, I am guessing, is't a wrong URL, could you connect to "http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml" by browser and get file back
In the other hand, I saw a this Web Flowm and did't see a example use Servlet to get source, if you could connect to the URL, but still has exception, I am thinking, maybe you have to figure out another way to do it.
Hello, samchuang:
Thanks.
Yes, it is a valid URL and I can connect to it through browser.
It appears that zk web flow does not interpret it as "URL", and instead, it always try to
interpret given arguments as "file path".
However, it should not be difficult to modify this behavior. Furthermore, since URL is more generic,
I believe that (IMHO) based on URL is better than based on file paths.
Although we can still find some non-trivial solutions to achieve the same behavior,
scalability can be a problem since we have to "fool" zk web flow implementation with a temporary
file path.
Asked: 2010-01-13 21:04:27 +0800
Seen: 434 times
Last updated: Jan 18 '10