My use case is a "development mode" for Struts Ti.  One of the key
features I'm going for in this mode is the ability to modify the
source code, the refresh your browser to see the changes.  For
example, if the user added an action method, but they made a typo that
would cause the compilation to fail, when they refreshed their
browser, they'd see a helpful error page detailing all the compilation
errors and code snippets where the error came from.

To do this, I'd imagine I need the ability to manually initiate a file
system check for new/modified/removed files on every web request. 
After all the changed files are finished compiling, I could pull out
the errors from my problem handler and generate a web page.

Don

On 8/21/05, Joerg Heinicke <[EMAIL PROTECTED]> wrote:
> 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]
> 
>

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

Reply via email to