I have read the source code of FileUploadInterceptor.

I think it do the message getting in it's private method, and dose not
use the maximumSize as a message format param.

So I believe there is no simple way to "extract interceptor interceptor param".

The simplest way I known is, hard coding the value in your message
properties file, like:
struts.messages.error.file.too.large=File {1} is {3} bytes which
exceeds the maximum 100123.

It is a little ugly, but looks like the only way.


The other way is, create a new class extend from
FileUploadInterceptor, and override the error message building part,
add the maximumSize as a message format param.
But it need many code, I don't think this issue is worth doing so may work.



2010/12/1  <stanl...@gmail.com>:
> Thanks Li --
>
> I saw what the interceptor was doing and decided that was not going to
> work.  Would you mind posting the "simple" technique to extract the
> parameter from the interceptor configuration.  I'll admit I'm not a Guice
> pro and studying the container build sent me straight to the bar last night.
>
> Scott
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to