Don Brown <donald.brown <at> gmail.com> writes:

> As I integrate jci into Struts Ti, I'm faced with how to display the
> compilation errors to the user.  What general strategy does Cocoon or
> any other web framework use to do this?  The asynchronous nature of
> the compiler makes it difficult to display the errors to the user the
> next time the refresh their browser.  Do you just assume they will be
> tailing the logs?  Is there any way to manually control the file
> monitor check so, for example, a refresh of the browser would trigger
> the check and compilation so the errors could simply be displayed on
> the page returned to the browser?

Hello Don,

do you really want to show compiler errors to the user? If so, you can pass a
problem handler that consumes the problems up to a refresh of a page. For this
refresh the problem handler is asked for the problems and they are passed to the
view. After getting the problems from the handler it can be resetted or cleared.
(BTW, this use case shows a different lifecycle for the handler and is another
signal for removing lifecycle specific stuff from the handler interface.)

For the integration into web frameworks: Do you need the CompilingClassLoader?
Isn't the Compiler sufficient? At least for XSP in Cocoon the reload is handled
by Cocoon. I'm going to provide a JCI implementation for the LanguageCompiler
interface (used in XSP), but probably not in the next two weeks.

Joerg


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

Reply via email to