wierd stack trace regarding parsing of struts.xml

2012-11-30 Thread Davis, Chad
So, when I restarted my struts2 app this afternoon I got complains about unable to load configuration. - [unknown location]. But, the location of my struts.xml - inside of the classes folder of the WAR - has not changes. And, indeed, the file is there. The stack trace is below. For

RE: Struts2 Rest Plugin

2012-11-30 Thread Davis, Chad
I think, the basic idea was to allow cooperate the REST plugin with the Convention plugin and code behind is a deprecated plugin that will be discarded soon (with 3.x) 1) So, it doesn't depend on it, in any technical sense? 2) But it's made to work with the convention plugin, if that plugin

RE: wierd stack trace regarding parsing of struts.xml

2012-11-30 Thread Davis, Chad
Probably trying to go out to the web for a DTD/XSD or something? Okay. It does appear to be finding the struts.xml file, and then timing out while trying to get something else over the network. I guess my first reaction is . . . . does my struts app really need to be able to reach out

RE: wierd stack trace regarding parsing of struts.xml

2012-11-30 Thread Davis, Chad
Without knowing what you're specifying in your struts config it's tough to say. The times I've seen this are when there's a mismatch between what's in the config and what's in the libraries, like if it can't find the file locally, it goes on to the network. So, I think the issue is

RE: wierd stack trace regarding parsing of struts.xml

2012-11-30 Thread Davis, Chad
IMO it just needs to match the DTD in the jar; as I said, I've generally seen this happen when there's a mis-match. In regards to your SO question, it would depend completely on the implementation and its configuration. Here's the one that doesn't work: ?xml version=1.0 encoding=UTF-8?

Struts2 Rest Plugin

2012-11-28 Thread Davis, Chad
Hi! The docs for the REST plugin talk about how it builds on the Convention plugin ( sometimes it says code behind ). However, I don't see that using the REST plugin pulls in either of these plugins . . . in what sense does it build on them? Thanks, Chad

RE: implementaiton advise on custom TextProvider

2012-10-22 Thread Davis, Chad
2012/10/19 Davis, Chad chad.da...@emc.com: Thanks man! I'll check it out this morning. I think the protected seems like a great idea. It's an interesting question, whether to make such things protected or private. When this is a part of framework it should be protected. In apps

RE: implementaiton advise on custom TextProvider

2012-10-19 Thread Davis, Chad
PM To: Struts Users Mailing List Subject: Re: implementaiton advise on custom TextProvider 2012/10/18 Davis, Chad chad.da...@emc.com: Of course, and I'd even be happy to do the work. Perhaps you can advise me on a plan? Everything is ready, I'm just waiting for you to register

RE: implementaiton advise on custom TextProvider

2012-10-18 Thread Davis, Chad
But when I start the app I get the following error, thrown when the framework tries to create the text provider bean. It seems like the framework isn't recognizing that I'm referencing a spring bean with the class attribute . . . So, I have figured this out. The TextProvider is

RE: implementaiton advise on custom TextProvider

2012-10-18 Thread Davis, Chad
Of course, and I'd even be happy to do the work. Perhaps you can advise me on a plan? Everything is ready, I'm just waiting for you to register the issue ;-) I created the ticket. Let me know if the ticket conforms with struts2 standards for ticket submission; I'll be happy to edit it.

RE: implementaiton advise on custom TextProvider

2012-10-16 Thread Davis, Chad
Do you have the: constant name=struts.objectFactory value=spring/ constant defined in your struts.xml? That should be all that's needed. (*Chris*) I don't but . . . isn't that in the plugin.xml? And isn't the fact that I was able to autowire an action with a spring bean proof that

RE: implementaiton advise on custom TextProvider

2012-10-16 Thread Davis, Chad
Okay. I'm following this path. I've got the Spring Plugin in place. And it's working. I verified it by autowiring a trivial spring bean into one of my actions. But when I try to create my custom textprovider and then have it used as the framework default text provider I'm getting some

RE: implementaiton advise on custom TextProvider

2012-10-16 Thread Davis, Chad
Spring MVC might be a consideration! (wink) On Oct 16, 2012 1:26 PM, I heard it has a pretty good integration with the whole Spring ecosystem. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

RE: implementaiton advise on custom TextProvider

2012-10-15 Thread Davis, Chad
ActionSupport#getTextProviderSupport() uses the TextProviderFactory to obtain it's instance of a support object. Since it uses the di to inject this into the factory, my custom version is correctly injected. However, I need to initialize my custom support object with a resource that it

RE: implementaiton advise on custom TextProvider

2012-10-15 Thread Davis, Chad
If you are using the Spring Framework with your App, you should be able to define your TextProvider, with all it's dependencies, as a Spring Bean, then when you define the bean in Struts use the Spring Bean ID instead of using the full class name. Struts will use that Spring Bean in place

RE: implementaiton advise on custom TextProvider

2012-10-15 Thread Davis, Chad
If you are using the Spring Framework with your App, you should be able to define your TextProvider, with all it's dependencies, as a Spring Bean, then when you define the bean in Struts use the Spring Bean ID instead of using the full class name. Struts will use that Spring Bean in place

RE: overriding framework components

2012-10-04 Thread Davis, Chad
Here you have the full list of extension points http://struts.apache.org/2.x/docs/plugins.html#Plugins-ExtensionPoints Excellent. Thank you. And, since I think I saw your name on some comments in the TextProvider, I wonder what constructors get invoked when the TextProvider is

implementaiton advise on custom TextProvider

2012-10-04 Thread Davis, Chad
So, I want to have the framework use my own custom TextProvider. Since the framework uses DI to inject such things, I've been able to have my own custom TextProvider injected into the system. Now, I'm encountering some other issues related to how to correctly initialize my custom provider.

RE: overriding framework components

2012-10-04 Thread Davis, Chad
2012/10/4 Davis, Chad chad.da...@emc.com: And, since I think I saw your name on some comments in the TextProvider, I wonder what constructors get invoked when the TextProvider is injected in the TextProviderFactory on ActionSupport. The default TextProviderSupport has references to locale

overriding framework components

2012-10-03 Thread Davis, Chad
I want to override the framework's built in TextProvider with my own. I understand that I need to add mine as a bean in my strut.xml, but something about the precise mechanics is eluding me. For starters, this is from struts-default.xml bean type=com.opensymphony.xwork2.TextProvider

RE: overriding framework components

2012-10-03 Thread Davis, Chad
I guess I need to map a constant value to my bean, but where do I find that constant name? -Original Message- From: Davis, Chad [mailto:chad.da...@emc.com] Sent: Wednesday, October 03, 2012 10:55 AM To: user@struts.apache.org Subject: overriding framework components I want

RE: overriding framework components

2012-10-03 Thread Davis, Chad
Ok. I found it in the javadoc for TextProvider bean type=com.opensymphony.xwork2.TextProvider name=myProvider class=com.mycompany.struts2.MyTextProviderSupport scope=default/ constant name=struts.xworkTextProvider value=myProvider/ This works. -Original Message- From: Davis, Chad

Struts 2 Iterator, Param and Text tags usage

2012-08-27 Thread Davis, Chad
I'm trying to figure out how iterate over a collection of parameters to pump into a text tag. This is what I would like to do: s:text name=%{eventtype.i18nkey} s:iterator value=messageParameters s:params:property//s:param /s:iterator /s:text But it blows up and writes some stuff to

RE: Injecting Static/Mock Resources into my Struts 2 Actions

2012-08-23 Thread Davis, Chad
I do this all the time. Then I'm not crazy ;) Not sure what experiences you're looking for; if the data is _very_ complex it may be easier to just embed a DB and load it up with DBUnit or something like that. It's not the data that's complex so much as the whole distributed system

RE: Injecting Static/Mock Resources into my Struts 2 Actions

2012-08-23 Thread Davis, Chad
bean id=MockedService name=MockedService class=org.easymock.EasyMock factory-method=createStrictMock constructor-arg value=Interface.for.the.Service/ /bean How do you control the correct injections for the various deployments? Do you automate that with the build? Scripted?

Injecting Static/Mock Resources into my Struts 2 Actions

2012-08-22 Thread Davis, Chad
I would like to deploy my app to a UI testing / demo environment. In this environment, the regular business logic objects would be replaced ( via DI ) with mock implementations of those resources. These mocks would return a static data set, thus giving a predictable behavior against which we