2013/7/18 Paul Benedict :
> I have a global properties file with this key:
> emailSent=The email was sent to {0}.
>
> I add a message in my action:
> addActionMessage(getText("emailSent", Arrays.asList(email)));
>
> And the {0} stays in the output. Why is this?
Strange, it is well tested [1] line
I have a global properties file with this key:
emailSent=The email was sent to {0}.
I add a message in my action:
addActionMessage(getText("emailSent", Arrays.asList(email)));
And the {0} stays in the output. Why is this?
--
Cheers,
Paul
Yes, they are.
On Thu, Jul 18, 2013 at 2:24 PM, Dave Newton wrote:
> Aren't interceptors also created by the struts object factory?
> On Jul 18, 2013 12:28 PM, "David Greene" wrote:
>
> > And, now retracting my retraction - @Autowired DOES work for Actions (via
> > no setter), I was just in a
Aren't interceptors also created by the struts object factory?
On Jul 18, 2013 12:28 PM, "David Greene" wrote:
> And, now retracting my retraction - @Autowired DOES work for Actions (via
> no setter), I was just in a JEE Filter, not an Interceptor which obviously
> doesn't have Spring access for
And, now retracting my retraction - @Autowired DOES work for Actions (via
no setter), I was just in a JEE Filter, not an Interceptor which obviously
doesn't have Spring access for @Autowired.
On Thu, Jul 18, 2013 at 11:19 AM, David Greene wrote:
> I very well may do that. Thanks for the info.
I very well may do that. Thanks for the info.
And one correction to my assertion above - @Autowired does not do
anything. I had switched it to a Service Locator Context.getBean() a while
back while debugging and hadn't changed it back.
On Thu, Jul 18, 2013 at 11:13 AM, Paul Benedict wrote:
>
I too was surprised that I don't have to specify what to inject. In fact, I
didn't like it but came to live with it. I would prefer that only things
with @Inject be annotated, but Struts 2 was created well before CDI and JEE
6 annotations. I think perhaps the mythical Struts 3 can tidy things up.
B
Ah, there you have it.
Still though, that seems like a bug (or at least something that needs to be
defensively coded around for the struts2-spring plugin).
ActionContext.setFieldErrors(Map) is injected with some
random Map from the Spring context when autowire by type is
selected. I'd imagine no
You don't need @Autowired and @Inject in your Action with the Spring
plugin. It will call any setter based on type (or name).
On Thu, Jul 18, 2013 at 10:58 AM, David Greene wrote:
> I think I see the "what" now, but no idea on the why:
>
> 20:59:47,536 INFO [rss.web.filter.SignOnFilter] (http-
I think I see the "what" now, but no idea on the why:
20:59:47,536 INFO [rss.web.filter.SignOnFilter] (http--0.0.0.0-8443-2)
Redirecting to signon: /signon.action?redirectUri=index.action
20:59:47,735 DEBUG
[org.springframework.beans.factory.support.DefaultListableBeanFactory]
(http--0.0.0.0-8443
I had already tried that (breakpointing input()) - it's never executed.
I just added my freshly created debug interceptor and set a breakpoint
there, but yet again - no love.
I'm setting a breakpoint in ValidationInterceptor.doIntercept() line 265:
After inspecting the ActionInvocation, there i
Oh, right, could just override `input()`.
I forget about stuff like that since I just get my action stuff dumped out
:)
Dave
On Thu, Jul 18, 2013 at 11:11 AM, Paul Benedict wrote:
> Yes, Dave's proposal is easier and faster. When validation fails, you
> should have one or several errors/messag
Yes, Dave's proposal is easier and faster. When validation fails, you
should have one or several errors/messages. So dump those out or breakpoint
in your input() to inspect them.
On Thu, Jul 18, 2013 at 10:09 AM, Dave Newton wrote:
> * Is there any validation set up on the action?
> * Are there
* Is there any validation set up on the action?
* Are there any parameters being set on the action?
The easiest/quickest might just be to check the action's errors/messages
lists. As part of a debugging interceptor chain I had a small interceptor
that just dumped those to the log file after every
I'll start stepping through, but why would the Validation fail with
struts2-spring plugin doing DI on the Actions, but it passes when it's not
doing DI on the Actions. It seems quite arbitrary.
On Thu, Jul 18, 2013 at 10:07 AM, Paul Benedict wrote:
> I'd definitely would put a breakpoint in the
I'd definitely would put a breakpoint in the ValidationInterceptor code and
step through. Nothing in the Spring plugin is causing your issue; Spring
just does dependency injection.
On Thu, Jul 18, 2013 at 9:59 AM, David Greene wrote:
> How would I figure out what is failing validation (and more
How would I figure out what is failing validation (and more importantly)
why? I have logging set to DEBUG, but nothing is jumping out as a
Validation Error.
On Thu, Jul 18, 2013 at 9:57 AM, Dave Newton wrote:
> It's a validation or type conversion error.
>
>
> On Thu, Jul 18, 2013 at 10:44 AM,
It's a validation or type conversion error.
On Thu, Jul 18, 2013 at 10:44 AM, David Greene wrote:
> Wishful thinking...
>
> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
> to
>
>
>
> made no change. I couldn't find any other differences in the docs. I'll
> look at the tut
Wishful thinking...
to
made no change. I couldn't find any other differences in the docs. I'll
look at the tutorial next, but I'm not setting up a brand new project - I'm
integrating Spring into an existing (and fully functional) Struts2
application so I can verify that my only changes (thr
David:
We have a Struts - Spring example application at
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/
I recently tested this example application, which uses Struts 2 version
2.3.15, and did not encounter the issue you report. In the example there is
a save action tha
Uploading files is not working.
Files are not set in the action, there are no files in the request, and no
files detected by File Upload Interceptor (FUI).
Redirection Interceptor (RI) runs before the default stack FUI.
RI stores in session the request parameters before FUI has any chance to r
Just the things noted in this document:
http://struts.apache.org/release/2.0.x/docs/spring-plugin.html
and you know what, that's the evil of google, I just noticed (while
googling from home) that this is the appropriate doc:
http://struts.apache.org/release/2.3.x/docs/spring-plugin.html
I'm ass
Done :-)
http://struts.apache.org/development/2.x/docs/file-upload-interceptor.html
2013/7/18 Antonio Sánchez :
> http://struts.apache.org/release/2.2.x/docs/file-upload-interceptor.html
>
> Example code in "Example Action class:"
>
> Remove "" typos.
>
> Regards.
>
>
http://struts.apache.org/release/2.2.x/docs/file-upload-interceptor.html
Example code in "Example Action class:"
Remove "" typos.
Regards.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e
24 matches
Mail list logo