How to register an ActionEventListener implementation?

2009-09-24 Thread nodje

I need to have a way to print to console ExceptionStackTraces.

The interceptor in the Struts configuration would usually make the
StackTrace available to print on web page, but it seems it doesn't take care
of printing to the standard console.

implement ActionEventListener.handleException seem to be a good way to me
but I don't know how to register this implementation with Struts2/Xwork.

Any help or different point of view on how to handle printing stacktraces
welcome!!

cheers
-nodje
-- 
View this message in context: 
http://www.nabble.com/How-to-register-an-ActionEventListener-implementation--tp25606277p25606277.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [Struts 1.3] converter converts but not set property

2009-09-24 Thread senderj

Thanks for the reply. The warType is WarrType. The convert() method executed.
It has correct input parm and output return (I've used debugger to check
it). The copyProperties() just doesn't copy it after the convert(). That's
why I have to add copyProperty() to explicitly copy "warType".


Arthur Neves wrote:
> 
> BeansUtils just call your converter, if your form bean property "warType",
> will be a 'WarrType' .
> 
> On Wed, Sep 23, 2009 at 7:16 AM, senderj  wrote:
> 
>>
>> I wrote a converter to convert a enum for BeanUtils.copyProperties().  I
>> have
>> this in my struts config:
>>
>> > type="org.apache.struts.validator.DynaValidatorForm">
>>   
>>
>> Here is my converters (embedded class in my Action)
>>
>>public class MyConverter1 implements Converter {
>>@Override
>>public WarrType convert(Class c, Object s) {
>>Object result = null;
>>String ss = (String) s;
>>if (c.getSimpleName().equals("WarrType")) {
>>System.out.println(ss);
>>if (ss.equals("NONE")) result = WarrType.NONE;
>>if (ss.equals("CALL"))  result = WarrType.CALL;
>>if (ss.equals("PUT")) result = WarrType.PUT;
>>}
>>return (WarrType) result;
>>}
>>}
>>
>> and here is the code in my Action:
>>
>>MyConverter1 mc1 = new MyConverter1();
>>ConvertUtils.register(mc1, WarrType.class);
>>BeanUtils.copyProperties(stk, form);
>>
>> I've ensured both Stk and form have the same name "warType". But the
>> copyProperties() takes care of all other properties, except the warType!
>> I
>> have another converter for a date properties coded in similar way and it
>> works. Only this warType doesn't. I have checked the convert() method in
>> MyConverter in debug mode and it can convert correctly. But the
>> stk.warType
>> was not set (although its setWarType() was run with correct parm and
>> output).
>>
>> But if I add this code after the copyProperties() at the above, then it
>> works
>>BeanUtils.copyProperty(stk, "warType",
>> PropertyUtils.getSimpleProperty(form, "warType"));
>>
>> Any idea why?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Struts-1.3--converter-converts-but-not-set-property-tp25531070p25531070.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Struts-1.3--converter-converts-but-not-set-property-tp25531070p25605191.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



DefaultActionInvocation invokeAction

2009-09-24 Thread Antonius Ng
Hi all,

The following code is extracted from xwork source
DefaultActionInvocation.java and rest-plugin RestActionInvocation.java:

protected String invokeAction(Object action, ActionConfig actionConfig)
throws Exception {
String methodName = proxy.getMethod();

if (LOG.isDebugEnabled()) {
LOG.debug("Executing action method = " +
actionConfig.getMethodName());
}
...
 method = getAction().getClass().getMethod(methodName, new Class[0]);
...

Is there any reason why the log is debugging actionConfig.getMethodName()
while the one being used is from proxy.getMethod()? I don't see anywhere in
the code where actionConfig.getMethodName() is being used.

The reason I am asking this is also because I found out that:
1. for actions written in struts.xml  tag,
actionConfig.getMethodName() returns the method of the action as specified
in struts.xml
2. for controllers autoconfigured by rest-plugin,
actionConfig.getMethodName() returns null
3. I can have both controllers and actions defined with  tag working
together, with the following simple changes:
protected String invokeAction(Object action, ActionConfig actionConfig)
throws Exception {
String methodName =
(actionConfig.getMethodName()==null)?proxy.getMethod():actionConfig.getMethodName();

Thanks in advance.

Regards,
Anton


Re: How to get 2.1.8 for Maven build?

2009-09-24 Thread Wendy Smoak
On Thu, Sep 24, 2009 at 3:35 PM, David C. Hicks  wrote:
> I've added the snapshot repository to my pom.xml, but I'm still unable
> to get the 2.1.8 release.  I have found a message about 2.1.8 being
> available there dated 9/22/09, however.  Is there something else I
> should or should not be doing?
>
> Here's what I've added:
...
>            http://people.apache.org/repo/m2-snapshot-repository
...
>                2.1.8

A snapshot repository would not contain a released (non-SNAPSHOT) version.

2.1.8 is not yet in the central repository:
http://repo2.maven.org/maven2/org/apache/struts/struts2-core/

>From what I see on the dev list, it's being voted on, but has not yet
been officially released.  If you're interested in trying it out
pre-release, search the dev list archives for the vote thread and
you'll find the repository url.

-- 
Wendy

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



How to get 2.1.8 for Maven build?

2009-09-24 Thread David C. Hicks
I've added the snapshot repository to my pom.xml, but I'm still unable
to get the 2.1.8 release.  I have found a message about 2.1.8 being
available there dated 9/22/09, however.  Is there something else I
should or should not be doing?

Here's what I've added:


apache.snapshots
ASF Maven 2 Snapshot
http://people.apache.org/repo/m2-snapshot-repository

daily


daily



and


org.apache.struts
struts2-core
2.1.8


org.apache.struts
struts2-spring-plugin
2.1.8




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



Re: sx:textarea border (and label...)

2009-09-24 Thread h-m-g

I looked at CKEditor it is really cool, thanks for your help



Ignacio de Córdoba wrote:
> 
> I'm sorry I haven't. To be honest, I have forgotten about sx:textarea tag
> and I am using new CKEditor 3.0 ... simple to install and easy to connect
> into struts2 actions (it has a file uploader option with works ok with a
> struts2 action). Now i'm figuring out how to include a File Dialog, but
> that is a minor issue for me. CKEditor is just impressive.
> 
> 
> h-m-g wrote:
>> 
>> 
>> 
>> Ignacio de Córdoba wrote:
>>> 
>>> Hi,
>>> I am using sx:textarea in several pages and the HTML visutal text editor
>>> renders and works ok. I'd just like to make it have a simple border,
>>> like every input type text or type textarea has. I'd like to do this
>>> directly and avoid enclosing sx:textarea in some type of >> class="border"> to make it look have a real border.
>>> Any ideas on how to do this?
>>> 
>>> Thanks,
>>> Ignacio
>>> 
>>> P.D.: By the way... how to make label and labelposition work for
>>> sx:textarea?
>>> 
>> 
>> 
>> Hi Ignacio
>> I am facing the same issue, by any chance did you figure out how it
>> works?
>> 
>> Thanks
>> Hemant
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sx%3Atextarea-border-%28and-label...%29-tp23377969p25590921.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Customize Dojo Textarea Toolbar

2009-09-24 Thread h-m-g

Hi All,
I am using Dojo Textarea, and it works fine but I am not able to change the
toolbar options. 
Here is the code, it doesn’t not change any thing


textGroup;|;justifyGroup


Any idea how to make it work

Thanks
HMG

-- 
View this message in context: 
http://www.nabble.com/Customize-Dojo-Textarea-Toolbar-tp25587571p25587571.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Convention plugins problems

2009-09-24 Thread Ingo Hoffmann

I'm using the jetty-starter

On 24/09/2009, at 17:33, Musachy Barroso wrote:


hard to say. A good point to start debugging is in
PackageBasedActionConfigBuilder.buildUrlSet, for some reason it is not
finding the actions. I used jetty all the time, but I use it with the
maven jetty plugin.

musachy

On Thu, Sep 24, 2009 at 12:53 PM, Ingo Hoffmann   
wrote:

In contrast to Tomcat:

2009-09-24 16:51:08,115 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Setting

action default parent package to [convention-default]
2009-09-24 16:51:08,117 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Loading

action configurations
2009-09-24 16:51:08,117 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Actions
being loaded using package locators [action, actions, struts,  
struts2]

2009-09-24 16:51:08,118 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Excluding

actions from packages [org.apache.struts.*, org.apache.struts2.*,
org.springframework.web.struts.*, org.springframework.web.struts2.*,
org.hibernate.*]
2009-09-24 16:51:08,207 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Changed

action name from [HelloWorld] to [hello-world]
2009-09-24 16:51:08,208 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got
actionName for class [class cx.hoffmann.bab.web.actions.HelloWorld]  
of

[hello-world]
2009-09-24 16:51:08,209 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created
package config named [cx.hoffmann.bab.web.actions#convention- 
default#] with

a namespace []
2009-09-24 16:51:08,214 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using
non-default action namespace from the Action annotation of [/asd]
2009-09-24 16:51:08,214 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created
package config named [cx.hoffmann.bab.web.actions#convention- 
default#] with

a namespace []
2009-09-24 16:51:08,217 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Using final

calculated namespace []
2009-09-24 16:51:08,217 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching
for results in the Servlet container at [/WEB-INF/content/] with  
result

prefix of [/WEB-INF/content/asd]
2009-09-24 16:51:08,218 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/hello-world.jsp]
2009-09-24 16:51:08,218 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/hello-world.freemarker]
2009-09-24 16:51:08,219 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/index-success.ftl]
2009-09-24 16:51:08,219 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/index.ftl]
2009-09-24 16:51:08,220 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching
for results in the class path at [WEB-INF/content/] with a result  
prefix of

[/WEB-INF/content/asd] and action name [asd]
2009-09-24 16:51:08,227 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Changed

action name from [HelloWorld] to [hello-world]
2009-09-24 16:51:08,227 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got
actionName for class [class exemplo.actions.HelloWorld] of [hello- 
world]

2009-09-24 16:51:08,228 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created
package config named [exemplo.actions#convention-default#] with a  
namespace

[]
2009-09-24 16:51:08,229 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Using final

calculated namespace []
2009-09-24 16:51:08,230 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching
for results in the Servlet container at [/WEB-INF/content/] with  
result

prefix of [/WEB-INF/content/hello-world]
2009-09-24 16:51:08,230 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/hello-world.jsp]
2009-09-24 16:51:08,231 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The  
result
file [/WEB-INF/content/hello-world.jsp] has no result code and  
therefore
will be associated with success, input and error by default. This  
might be

overridden by another result file or an annotation.
2009-09-24 16:51:08,232 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing

resource path [/WEB-INF/content/hello-world.freemarker]
2009-09-24 16:51:08,233 [TRACE]
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The  
result

file [/WEB-INF/content/hello-world.freemarker] has no result code and
therefore will be associated with success, input and er

Re: Convention plugins problems

2009-09-24 Thread Musachy Barroso
hard to say. A good point to start debugging is in
PackageBasedActionConfigBuilder.buildUrlSet, for some reason it is not
finding the actions. I used jetty all the time, but I use it with the
maven jetty plugin.

musachy

On Thu, Sep 24, 2009 at 12:53 PM, Ingo Hoffmann  wrote:
> In contrast to Tomcat:
>
> 2009-09-24 16:51:08,115 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Setting
> action default parent package to [convention-default]
> 2009-09-24 16:51:08,117 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Loading
> action configurations
> 2009-09-24 16:51:08,117 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Actions
> being loaded using package locators [action, actions, struts, struts2]
> 2009-09-24 16:51:08,118 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Excluding
> actions from packages [org.apache.struts.*, org.apache.struts2.*,
> org.springframework.web.struts.*, org.springframework.web.struts2.*,
> org.hibernate.*]
> 2009-09-24 16:51:08,207 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Changed
> action name from [HelloWorld] to [hello-world]
> 2009-09-24 16:51:08,208 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got
> actionName for class [class cx.hoffmann.bab.web.actions.HelloWorld] of
> [hello-world]
> 2009-09-24 16:51:08,209 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Created
> package config named [cx.hoffmann.bab.web.actions#convention-default#] with
> a namespace []
> 2009-09-24 16:51:08,214 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using
> non-default action namespace from the Action annotation of [/asd]
> 2009-09-24 16:51:08,214 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Created
> package config named [cx.hoffmann.bab.web.actions#convention-default#] with
> a namespace []
> 2009-09-24 16:51:08,217 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using final
> calculated namespace []
> 2009-09-24 16:51:08,217 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Searching
> for results in the Servlet container at [/WEB-INF/content/] with result
> prefix of [/WEB-INF/content/asd]
> 2009-09-24 16:51:08,218 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/hello-world.jsp]
> 2009-09-24 16:51:08,218 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/hello-world.freemarker]
> 2009-09-24 16:51:08,219 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/index-success.ftl]
> 2009-09-24 16:51:08,219 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/index.ftl]
> 2009-09-24 16:51:08,220 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Searching
> for results in the class path at [WEB-INF/content/] with a result prefix of
> [/WEB-INF/content/asd] and action name [asd]
> 2009-09-24 16:51:08,227 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Changed
> action name from [HelloWorld] to [hello-world]
> 2009-09-24 16:51:08,227 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got
> actionName for class [class exemplo.actions.HelloWorld] of [hello-world]
> 2009-09-24 16:51:08,228 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Created
> package config named [exemplo.actions#convention-default#] with a namespace
> []
> 2009-09-24 16:51:08,229 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using final
> calculated namespace []
> 2009-09-24 16:51:08,230 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Searching
> for results in the Servlet container at [/WEB-INF/content/] with result
> prefix of [/WEB-INF/content/hello-world]
> 2009-09-24 16:51:08,230 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/hello-world.jsp]
> 2009-09-24 16:51:08,231 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The result
> file [/WEB-INF/content/hello-world.jsp] has no result code and therefore
> will be associated with success, input and error by default. This might be
> overridden by another result file or an annotation.
> 2009-09-24 16:51:08,232 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Processing
> resource path [/WEB-INF/content/hello-world.freemarker]
> 2009-09-24 16:51:08,233 [TRACE]
> (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The result
> file [/WEB-INF/content/hello-world.freemarker] has no result code and
> therefore will be associated with success, input an

RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
Wow, thanks Chris, you're right.  Changing to baseAction as the bean name
and setBaseAction as the method name fixed it...

Strange, as I have other beans like that with funky names...

>-Original Message-
>From: Chris Pratt [mailto:thechrispr...@gmail.com]
>Sent: Thursday, September 24, 2009 12:19 PM
>To: Struts Users Mailing List
>Subject: Re: Interceptor IOC with Spring
>
>If you have working examples in the same application, there must be
>something different about this instance.
>
>Could it be the bean name?  I've been occasionally baffled by what you
>have
>to do with strangely cased bean names.  I've particularly had trouble
>when
>one of the automatically cased characters butts up against an uppercase
>character (like ID, should it be iD, ID, id... depends on the system).
>
>As a test, I'd define a second bean with a more typical name, referring
>to
>the same class and add a mutator for it to your interceptor.  See if
>that
>one gets injected, but not the original.
>  (*Chris*)
>
>On Thu, Sep 24, 2009 at 8:54 AM, Mike Baranski <
>list-subscripti...@secmgmt.com> wrote:
>
>> Yes, and my other interceptor has my data source injected, and it's
>setup
>> the same way...
>>
>> >-Original Message-
>> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
>> >Sent: Thursday, September 24, 2009 11:51 AM
>> >To: Struts Users Mailing List
>> >Subject: Re: Interceptor IOC with Spring
>> >
>> >The only other difference I can see between my (working) example and
>> >yours
>> >is that I used the shortcut
>> >
>> >
>> >
>> >I don't know if there's a difference under the covers or not.
>> >
>> >Also, is the intercept method of your interceptor being called?
>> >  (*Chris*)
>> >
>> >On Thu, Sep 24, 2009 at 8:45 AM, Mike Baranski <
>> >list-subscripti...@secmgmt.com> wrote:
>> >
>> >> http://www.springframework.org/schema/beans";
>> >>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> >>   xmlns:util="http://www.springframework.org/schema/util";
>> >>
>xsi:schemaLocation="http://www.springframework.org/schema/beans
>> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> >> http://www.springframework.org/schema/util
>> >> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
>> >> default-autowire="byName">
>> >>
>> >> >-Original Message-
>> >> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
>> >> >Sent: Thursday, September 24, 2009 11:29 AM
>> >> >To: Struts Users Mailing List
>> >> >Subject: Re: Interceptor IOC with Spring
>> >> >
>> >> >What do you have default-autowire set to in your
>> >applicationContext.xml?
>> >> >  (*Chris*)
>> >> >
>> >> >On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
>> >> >list-subscripti...@secmgmt.com> wrote:
>> >> >
>> >> >> OK, I'm stuck.
>> >> >>
>> >> >> applicationContext.xml (snipped):
>> >> >> > >> >class="com.secmgmt.struts2.base.SMCBaseAction">
>> >> >> 
>> >> >>
>> >> >> struts.xml (snipped):
>> >> >> > >> >> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>> >> >>
>> >> >> 
>> >> >>> >> >name="redirectMessage"/>
>> >> >>
>> >> >>name="basicStack"/>
>> >> >>name="validation"/>
>> >> >>> >> >name="operatorHistory"/>
>> >> >>> >> >name="passwordExpired"/>
>> >> >>name="workflow"/>
>> >> >> 
>> >> >> 
>> >> >>
>> >> >> PasswordExpiredInterceptor method:
>> >> >> public void setSMCBaseAction(SMCBaseAction b) throws Exception
>> >> >>{
>> >> >>this.action = b;
>> >> >>l.debug("Calling setSMCBaseAction with: " + b);
>> >> >>this.initMe();
>> >> >>}
>> >> >>
>> >> >> Actions (and my operatorHistory) interceptor have *other* beans
>> >> >injected
>> >> >> just fine.  Can someone point out where I'm going wrong (I'm
>sure
>> >it's
>> >> >> something stupid).
>> >> >>
>> >> >> Thanks!
>> >> >>
>> >> >> >-Original Message-
>> >> >> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>> >> >> >Sent: Wednesday, September 23, 2009 2:17 PM
>> >> >> >To: 'Struts Users Mailing List'
>> >> >> >Subject: RE: Interceptor IOC with Spring
>> >> >> >
>> >> >> >Doh!  Sorry for the goose chase, I'll review my code and post
>it
>> >if
>> >> >I'm
>> >> >> >still stuck...
>> >> >> >
>> >> >> >>-Original Message-
>> >> >> >>From: Musachy Barroso [mailto:musa...@gmail.com]
>> >> >> >>Sent: Wednesday, September 23, 2009 1:59 PM
>> >> >> >>To: Struts Users Mailing List
>> >> >> >>Subject: Re: Interceptor IOC with Spring
>> >> >> >>
>> >> >> >>Meh, it all works. Autorired with/without annotations and
>> >@Resource
>> >> >> >>also works (in interceptors). @OP, something is wrong in your
>> >> >> >>configuration, show us the code :)
>> >> >> >>
>> >> >> >>musachy
>> >> >> >>
>> >> >> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Bar

Re: Convention plugins problems

2009-09-24 Thread Ingo Hoffmann

In contrast to Tomcat:

2009-09-24 16:51:08,115 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Setting action default parent package to [convention-default]
2009-09-24 16:51:08,117 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Loading action configurations
2009-09-24 16:51:08,117 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Actions being loaded using package locators [action, actions, struts,  
struts2]
2009-09-24 16:51:08,118 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Excluding actions from packages [org.apache.struts.*,  
org.apache.struts2.*, org.springframework.web.struts.*,  
org.springframework.web.struts2.*, org.hibernate.*]
2009-09-24 16:51:08,207 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Changed action name from [HelloWorld] to [hello-world]
2009-09-24 16:51:08,208 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got  
actionName for class [class cx.hoffmann.bab.web.actions.HelloWorld] of  
[hello-world]
2009-09-24 16:51:08,209 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created package config named [cx.hoffmann.bab.web.actions#convention- 
default#] with a namespace []
2009-09-24 16:51:08,214 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using  
non-default action namespace from the Action annotation of [/asd]
2009-09-24 16:51:08,214 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created package config named [cx.hoffmann.bab.web.actions#convention- 
default#] with a namespace []
2009-09-24 16:51:08,217 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using  
final calculated namespace []
2009-09-24 16:51:08,217 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching for results in the Servlet container at [/WEB-INF/content/]  
with result prefix of [/WEB-INF/content/asd]
2009-09-24 16:51:08,218 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/hello-world.jsp]
2009-09-24 16:51:08,218 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/hello-world.freemarker]
2009-09-24 16:51:08,219 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/index-success.ftl]
2009-09-24 16:51:08,219 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/index.ftl]
2009-09-24 16:51:08,220 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching for results in the class path at [WEB-INF/content/] with a  
result prefix of [/WEB-INF/content/asd] and action name [asd]
2009-09-24 16:51:08,227 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Changed action name from [HelloWorld] to [hello-world]
2009-09-24 16:51:08,227 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Got  
actionName for class [class exemplo.actions.HelloWorld] of [hello-world]
2009-09-24 16:51:08,228 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Created package config named [exemplo.actions#convention-default#]  
with a namespace []
2009-09-24 16:51:08,229 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) Using  
final calculated namespace []
2009-09-24 16:51:08,230 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Searching for results in the Servlet container at [/WEB-INF/content/]  
with result prefix of [/WEB-INF/content/hello-world]
2009-09-24 16:51:08,230 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/hello-world.jsp]
2009-09-24 16:51:08,231 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The  
result file [/WEB-INF/content/hello-world.jsp] has no result code and  
therefore will be associated with success, input and error by default.  
This might be overridden by another result file or an annotation.
2009-09-24 16:51:08,232 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/hello-world.freemarker]
2009-09-24 16:51:08,233 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69) The  
result file [/WEB-INF/content/hello-world.freemarker] has no result  
code and therefore will be associated with success, input and error by  
default. This might be overridden by another result file or an  
annotation.
2009-09-24 16:51:08,234 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Processing resource path [/WEB-INF/content/index-success.ftl]
2009-09-24 16:51:08,234 [TRACE]  
(com.opensymphony.xwork2.util.logging.comm

Re: Convention plugins problems

2009-09-24 Thread Ingo Hoffmann

The only thing TRACE returns:

2009-09-24 16:24:06,956 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Setting action default parent package to [convention-default]
2009-09-24 16:24:06,958 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Loading action configurations
2009-09-24 16:24:06,958 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Actions being loaded using package locators [action, actions, struts,  
struts2]
2009-09-24 16:24:06,959 [TRACE]  
(com.opensymphony.xwork2.util.logging.commons.CommonsLogger:69)  
Excluding actions from packages [org.apache.struts.*,  
org.apache.struts2.*, org.springframework.web.struts.*,  
org.springframework.web.struts2.*, org.hibernate.*]


On 24/09/2009, at 16:22, Musachy Barroso wrote:


Any traces or errors? Set the log level to TRACE

musachy

On Thu, Sep 24, 2009 at 12:20 PM, Ingo Hoffmann   
wrote:

Hi,

I have been trying to get the Convention plugin to work on Winstone  
and

Jetty without any luck. It seems it doesn't even start.

The same .war works without issues on Tomcat.

I set org.apache.struts2.convention to DEBUG and I see on the  
Tomcat logs
the convention plugins mapping my URLs to actions, but it doesn't  
show up on
Winstone or Jetty at all. The config-browser plugin doesn't show  
any actions

on the default namespace or any other namespace besides its own.

I'm using Maven 2.2.1 to build the .war. Tried Struts 2.1.6, 2.1.7  
and 2.1.8

without any luck.

Anyone with a similar experience?

Thanks,
Ingo Hoffmann

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






--
"Hey you! Would you help me to carry the stone?" Pink Floyd

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




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



Re: Convention plugins problems

2009-09-24 Thread Musachy Barroso
Any traces or errors? Set the log level to TRACE

musachy

On Thu, Sep 24, 2009 at 12:20 PM, Ingo Hoffmann  wrote:
> Hi,
>
> I have been trying to get the Convention plugin to work on Winstone and
> Jetty without any luck. It seems it doesn't even start.
>
> The same .war works without issues on Tomcat.
>
> I set org.apache.struts2.convention to DEBUG and I see on the Tomcat logs
> the convention plugins mapping my URLs to actions, but it doesn't show up on
> Winstone or Jetty at all. The config-browser plugin doesn't show any actions
> on the default namespace or any other namespace besides its own.
>
> I'm using Maven 2.2.1 to build the .war. Tried Struts 2.1.6, 2.1.7 and 2.1.8
> without any luck.
>
> Anyone with a similar experience?
>
> Thanks,
> Ingo Hoffmann
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Convention plugins problems

2009-09-24 Thread Ingo Hoffmann

Hi,

I have been trying to get the Convention plugin to work on Winstone  
and Jetty without any luck. It seems it doesn't even start.


The same .war works without issues on Tomcat.

I set org.apache.struts2.convention to DEBUG and I see on the Tomcat  
logs the convention plugins mapping my URLs to actions, but it doesn't  
show up on Winstone or Jetty at all. The config-browser plugin doesn't  
show any actions on the default namespace or any other namespace  
besides its own.


I'm using Maven 2.2.1 to build the .war. Tried Struts 2.1.6, 2.1.7 and  
2.1.8 without any luck.


Anyone with a similar experience?

Thanks,
Ingo Hoffmann

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



Re: sx:textarea border (and label...)

2009-09-24 Thread Ignacio de Córdoba

I'm sorry I haven't. To be honest, I have forgotten about sx:textarea tag and
I am using new CKEditor 3.0 ... simple to install and easy to connect into
struts2 actions (it has a file uploader option with works ok with a struts2
action). Now i'm figuring out how to include a File Dialog, but that is a
minor issue for me. CKEditor is just impressive.


h-m-g wrote:
> 
> 
> 
> Ignacio de Córdoba wrote:
>> 
>> Hi,
>> I am using sx:textarea in several pages and the HTML visutal text editor
>> renders and works ok. I'd just like to make it have a simple border, like
>> every input type text or type textarea has. I'd like to do this directly
>> and avoid enclosing sx:textarea in some type of  to
>> make it look have a real border.
>> Any ideas on how to do this?
>> 
>> Thanks,
>> Ignacio
>> 
>> P.D.: By the way... how to make label and labelposition work for
>> sx:textarea?
>> 
> 
> 
> Hi Ignacio
> I am facing the same issue, by any chance did you figure out how it works?
> 
> Thanks
> Hemant
> 

-- 
View this message in context: 
http://www.nabble.com/sx%3Atextarea-border-%28and-label...%29-tp23377969p25579221.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: sx:textarea border (and label...)

2009-09-24 Thread h-m-g



Ignacio de Córdoba wrote:
> 
> Hi,
> I am using sx:textarea in several pages and the HTML visutal text editor
> renders and works ok. I'd just like to make it have a simple border, like
> every input type text or type textarea has. I'd like to do this directly
> and avoid enclosing sx:textarea in some type of  to
> make it look have a real border.
> Any ideas on how to do this?
> 
> Thanks,
> Ignacio
> 
> P.D.: By the way... how to make label and labelposition work for
> sx:textarea?
> 


Hi Ignacio
I am facing the same issue, by any chance did you figure out how it works?

Thanks
Hemant
-- 
View this message in context: 
http://www.nabble.com/sx%3Atextarea-border-%28and-label...%29-tp23377969p25578773.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: iterator tag: how to set iterate step?

2009-09-24 Thread Dale Newfield

Tommy Pham wrote:

arrays {1,2,3,4,5}

 1   2
 3   4
 5



What about

  


  

  



That s:if should also make sure you're not on the last iteration, 
otherwise you'll end up with an empty row.


-Dale

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



Re: iterator tag: how to set iterate step?

2009-09-24 Thread Tommy Pham




- Original Message 
> From: Musachy Barroso 
> To: Struts Users Mailing List 
> Sent: Thursday, September 24, 2009 10:19:55 AM
> Subject: Re: iterator tag: how to set iterate step?
> 
> no way i know of in 2.1.6. There will be one in the next release
> 
> musachy
> 
> On Thu, Sep 24, 2009 at 9:28 AM, samsun wrote:
> >
> > I have array to iterate through using iterator tag, for each loop i want to
> > print out pair of array's element
> > the last row could have only one element if the array length is odd. for
> > example, i want to dump arrays into table , each row has two element.
> >
> > arrays {1,2,3,4,5}
> >
> > 
> >  1   2
> > 
> >
> > 
> >  3   4
> > 
> >
> > 
> >  5
> > 
> >
> >
> > each loop's step should set to 2, but looks like there is no step attribute
> > for the iterator tag.
> > any idea how to do this
> >
> > thanks,
> >
> > --
> > View this message in context: 
> http://www.nabble.com/iterator-tag%3A-how-to-set-iterate-step--tp25577792p25577792.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

What about










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



Re: iterator tag: how to set iterate step?

2009-09-24 Thread Musachy Barroso
no way i know of in 2.1.6. There will be one in the next release

musachy

On Thu, Sep 24, 2009 at 9:28 AM, samsun  wrote:
>
> I have array to iterate through using iterator tag, for each loop i want to
> print out pair of array's element
> the last row could have only one element if the array length is odd. for
> example, i want to dump arrays into table , each row has two element.
>
> arrays {1,2,3,4,5}
>
> 
>  1   2
> 
>
> 
>  3   4
> 
>
> 
>  5
> 
>
>
> each loop's step should set to 2, but looks like there is no step attribute
> for the iterator tag.
> any idea how to do this
>
> thanks,
>
> --
> View this message in context: 
> http://www.nabble.com/iterator-tag%3A-how-to-set-iterate-step--tp25577792p25577792.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



iterator tag: how to set iterate step?

2009-09-24 Thread samsun

I have array to iterate through using iterator tag, for each loop i want to
print out pair of array's element
the last row could have only one element if the array length is odd. for
example, i want to dump arrays into table , each row has two element.

arrays {1,2,3,4,5} 


  1   2

 

 3   4



 5 



each loop's step should set to 2, but looks like there is no step attribute
for the iterator tag.
any idea how to do this

thanks,

-- 
View this message in context: 
http://www.nabble.com/iterator-tag%3A-how-to-set-iterate-step--tp25577792p25577792.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Interceptor IOC with Spring

2009-09-24 Thread Chris Pratt
If you have working examples in the same application, there must be
something different about this instance.

Could it be the bean name?  I've been occasionally baffled by what you have
to do with strangely cased bean names.  I've particularly had trouble when
one of the automatically cased characters butts up against an uppercase
character (like ID, should it be iD, ID, id... depends on the system).

As a test, I'd define a second bean with a more typical name, referring to
the same class and add a mutator for it to your interceptor.  See if that
one gets injected, but not the original.
  (*Chris*)

On Thu, Sep 24, 2009 at 8:54 AM, Mike Baranski <
list-subscripti...@secmgmt.com> wrote:

> Yes, and my other interceptor has my data source injected, and it's setup
> the same way...
>
> >-Original Message-
> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
> >Sent: Thursday, September 24, 2009 11:51 AM
> >To: Struts Users Mailing List
> >Subject: Re: Interceptor IOC with Spring
> >
> >The only other difference I can see between my (working) example and
> >yours
> >is that I used the shortcut
> >
> >
> >
> >I don't know if there's a difference under the covers or not.
> >
> >Also, is the intercept method of your interceptor being called?
> >  (*Chris*)
> >
> >On Thu, Sep 24, 2009 at 8:45 AM, Mike Baranski <
> >list-subscripti...@secmgmt.com> wrote:
> >
> >> http://www.springframework.org/schema/beans";
> >>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >>   xmlns:util="http://www.springframework.org/schema/util";
> >>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >> http://www.springframework.org/schema/util
> >> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
> >> default-autowire="byName">
> >>
> >> >-Original Message-
> >> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
> >> >Sent: Thursday, September 24, 2009 11:29 AM
> >> >To: Struts Users Mailing List
> >> >Subject: Re: Interceptor IOC with Spring
> >> >
> >> >What do you have default-autowire set to in your
> >applicationContext.xml?
> >> >  (*Chris*)
> >> >
> >> >On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
> >> >list-subscripti...@secmgmt.com> wrote:
> >> >
> >> >> OK, I'm stuck.
> >> >>
> >> >> applicationContext.xml (snipped):
> >> >>  >> >class="com.secmgmt.struts2.base.SMCBaseAction">
> >> >> 
> >> >>
> >> >> struts.xml (snipped):
> >> >>  >> >> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
> >> >>
> >> >> 
> >> >> >> >name="redirectMessage"/>
> >> >>
> >> >>
> >> >>
> >> >> >> >name="operatorHistory"/>
> >> >> >> >name="passwordExpired"/>
> >> >>
> >> >> 
> >> >> 
> >> >>
> >> >> PasswordExpiredInterceptor method:
> >> >> public void setSMCBaseAction(SMCBaseAction b) throws Exception
> >> >>{
> >> >>this.action = b;
> >> >>l.debug("Calling setSMCBaseAction with: " + b);
> >> >>this.initMe();
> >> >>}
> >> >>
> >> >> Actions (and my operatorHistory) interceptor have *other* beans
> >> >injected
> >> >> just fine.  Can someone point out where I'm going wrong (I'm sure
> >it's
> >> >> something stupid).
> >> >>
> >> >> Thanks!
> >> >>
> >> >> >-Original Message-
> >> >> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
> >> >> >Sent: Wednesday, September 23, 2009 2:17 PM
> >> >> >To: 'Struts Users Mailing List'
> >> >> >Subject: RE: Interceptor IOC with Spring
> >> >> >
> >> >> >Doh!  Sorry for the goose chase, I'll review my code and post it
> >if
> >> >I'm
> >> >> >still stuck...
> >> >> >
> >> >> >>-Original Message-
> >> >> >>From: Musachy Barroso [mailto:musa...@gmail.com]
> >> >> >>Sent: Wednesday, September 23, 2009 1:59 PM
> >> >> >>To: Struts Users Mailing List
> >> >> >>Subject: Re: Interceptor IOC with Spring
> >> >> >>
> >> >> >>Meh, it all works. Autorired with/without annotations and
> >@Resource
> >> >> >>also works (in interceptors). @OP, something is wrong in your
> >> >> >>configuration, show us the code :)
> >> >> >>
> >> >> >>musachy
> >> >> >>
> >> >> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso
> >> >
> >> >> >>wrote:
> >> >> >>> Chris, if autowiring works then using @Autowire with @Qualifier
> >> >> >>> (equivalent to @Resource) should also work, I have to try that.
> >> >> >>>
> >> >> >>> musachy
> >> >> >>>
> >> >> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
> >> >> >
> >> >> >>wrote:
> >> >>  In my struts.xml I have:
> >> >> 
> >> >>   
> >> >> 
> >> >>  And at the top of my applicationContext.xml I have:
> >> >> 
> >> >>  
> >> >> 
> >> >>  And my Interceptors are getting injected just fine.  On
> >anoth

Re: Interceptor IOC with Spring

2009-09-24 Thread Musachy Barroso
I am surprised it works at all. Add a @Required to that method and see
what spring complains about.

On Thu, Sep 24, 2009 at 8:51 AM, Chris Pratt  wrote:
> The only other difference I can see between my (working) example and yours
> is that I used the shortcut
>
> 
>
> I don't know if there's a difference under the covers or not.
>
> Also, is the intercept method of your interceptor being called?
>  (*Chris*)
>
> On Thu, Sep 24, 2009 at 8:45 AM, Mike Baranski <
> list-subscripti...@secmgmt.com> wrote:
>
>> http://www.springframework.org/schema/beans";
>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>       xmlns:util="http://www.springframework.org/schema/util";
>>       xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> http://www.springframework.org/schema/util
>> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
>> default-autowire="byName">
>>
>> >-Original Message-
>> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
>> >Sent: Thursday, September 24, 2009 11:29 AM
>> >To: Struts Users Mailing List
>> >Subject: Re: Interceptor IOC with Spring
>> >
>> >What do you have default-autowire set to in your applicationContext.xml?
>> >  (*Chris*)
>> >
>> >On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
>> >list-subscripti...@secmgmt.com> wrote:
>> >
>> >> OK, I'm stuck.
>> >>
>> >> applicationContext.xml (snipped):
>> >> > >class="com.secmgmt.struts2.base.SMCBaseAction">
>> >> 
>> >>
>> >> struts.xml (snipped):
>> >> > >> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>> >>
>> >> 
>> >>                                > >name="redirectMessage"/>
>> >>                                
>> >>                                
>> >>                                
>> >>                                > >name="operatorHistory"/>
>> >>                                > >name="passwordExpired"/>
>> >>                                
>> >> 
>> >> 
>> >>
>> >> PasswordExpiredInterceptor method:
>> >> public void setSMCBaseAction(SMCBaseAction b) throws Exception
>> >>        {
>> >>            this.action = b;
>> >>            l.debug("Calling setSMCBaseAction with: " + b);
>> >>            this.initMe();
>> >>        }
>> >>
>> >> Actions (and my operatorHistory) interceptor have *other* beans
>> >injected
>> >> just fine.  Can someone point out where I'm going wrong (I'm sure it's
>> >> something stupid).
>> >>
>> >> Thanks!
>> >>
>> >> >-Original Message-
>> >> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>> >> >Sent: Wednesday, September 23, 2009 2:17 PM
>> >> >To: 'Struts Users Mailing List'
>> >> >Subject: RE: Interceptor IOC with Spring
>> >> >
>> >> >Doh!  Sorry for the goose chase, I'll review my code and post it if
>> >I'm
>> >> >still stuck...
>> >> >
>> >> >>-Original Message-
>> >> >>From: Musachy Barroso [mailto:musa...@gmail.com]
>> >> >>Sent: Wednesday, September 23, 2009 1:59 PM
>> >> >>To: Struts Users Mailing List
>> >> >>Subject: Re: Interceptor IOC with Spring
>> >> >>
>> >> >>Meh, it all works. Autorired with/without annotations and @Resource
>> >> >>also works (in interceptors). @OP, something is wrong in your
>> >> >>configuration, show us the code :)
>> >> >>
>> >> >>musachy
>> >> >>
>> >> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso
>> >
>> >> >>wrote:
>> >> >>> Chris, if autowiring works then using @Autowire with @Qualifier
>> >> >>> (equivalent to @Resource) should also work, I have to try that.
>> >> >>>
>> >> >>> musachy
>> >> >>>
>> >> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
>> >> >
>> >> >>wrote:
>> >>  In my struts.xml I have:
>> >> 
>> >>   
>> >> 
>> >>  And at the top of my applicationContext.xml I have:
>> >> 
>> >>  
>> >> 
>> >>  And my Interceptors are getting injected just fine.  On another
>> >> >>project, I
>> >>  have autowiring turned off, but then you have to define each
>> >> >>interceptor as
>> >>  a bean in the applicationContext.xml and specifically define the
>> >> >>objects
>> >>  that get injected into it.
>> >>   (*Chris*)
>> >> 
>> >>  On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
>> >>  list-subscripti...@secmgmt.com> wrote:
>> >> 
>> >> > Correct me if I'm wrong, please, but if I have an interceptor,
>> >it
>> >> >>should
>> >> > get
>> >> > injected by spring.
>> >> >
>> >> > I have a bean I'm expecting, the set method written, and the
>> >bean
>> >> >>defined
>> >> > in
>> >> > applicationContext.
>> >> >
>> >> > My main struts.xml has:
>> >> >
>> >> > > >> > value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>> >> >
>> >> > My setter is not getting called, is there anything else I need
>> >to
>> >> >>do?
>> >> >
>> >> >
>> >> > M.
>> >> >
>> >> >
>> >> > 

RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
Yes, and my other interceptor has my data source injected, and it's setup
the same way...

>-Original Message-
>From: Chris Pratt [mailto:thechrispr...@gmail.com]
>Sent: Thursday, September 24, 2009 11:51 AM
>To: Struts Users Mailing List
>Subject: Re: Interceptor IOC with Spring
>
>The only other difference I can see between my (working) example and
>yours
>is that I used the shortcut
>
>
>
>I don't know if there's a difference under the covers or not.
>
>Also, is the intercept method of your interceptor being called?
>  (*Chris*)
>
>On Thu, Sep 24, 2009 at 8:45 AM, Mike Baranski <
>list-subscripti...@secmgmt.com> wrote:
>
>> http://www.springframework.org/schema/beans";
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>   xmlns:util="http://www.springframework.org/schema/util";
>>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> http://www.springframework.org/schema/util
>> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
>> default-autowire="byName">
>>
>> >-Original Message-
>> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
>> >Sent: Thursday, September 24, 2009 11:29 AM
>> >To: Struts Users Mailing List
>> >Subject: Re: Interceptor IOC with Spring
>> >
>> >What do you have default-autowire set to in your
>applicationContext.xml?
>> >  (*Chris*)
>> >
>> >On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
>> >list-subscripti...@secmgmt.com> wrote:
>> >
>> >> OK, I'm stuck.
>> >>
>> >> applicationContext.xml (snipped):
>> >> > >class="com.secmgmt.struts2.base.SMCBaseAction">
>> >> 
>> >>
>> >> struts.xml (snipped):
>> >> > >> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>> >>
>> >> 
>> >>> >name="redirectMessage"/>
>> >>
>> >>
>> >>
>> >>> >name="operatorHistory"/>
>> >>> >name="passwordExpired"/>
>> >>
>> >> 
>> >> 
>> >>
>> >> PasswordExpiredInterceptor method:
>> >> public void setSMCBaseAction(SMCBaseAction b) throws Exception
>> >>{
>> >>this.action = b;
>> >>l.debug("Calling setSMCBaseAction with: " + b);
>> >>this.initMe();
>> >>}
>> >>
>> >> Actions (and my operatorHistory) interceptor have *other* beans
>> >injected
>> >> just fine.  Can someone point out where I'm going wrong (I'm sure
>it's
>> >> something stupid).
>> >>
>> >> Thanks!
>> >>
>> >> >-Original Message-
>> >> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>> >> >Sent: Wednesday, September 23, 2009 2:17 PM
>> >> >To: 'Struts Users Mailing List'
>> >> >Subject: RE: Interceptor IOC with Spring
>> >> >
>> >> >Doh!  Sorry for the goose chase, I'll review my code and post it
>if
>> >I'm
>> >> >still stuck...
>> >> >
>> >> >>-Original Message-
>> >> >>From: Musachy Barroso [mailto:musa...@gmail.com]
>> >> >>Sent: Wednesday, September 23, 2009 1:59 PM
>> >> >>To: Struts Users Mailing List
>> >> >>Subject: Re: Interceptor IOC with Spring
>> >> >>
>> >> >>Meh, it all works. Autorired with/without annotations and
>@Resource
>> >> >>also works (in interceptors). @OP, something is wrong in your
>> >> >>configuration, show us the code :)
>> >> >>
>> >> >>musachy
>> >> >>
>> >> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso
>> >
>> >> >>wrote:
>> >> >>> Chris, if autowiring works then using @Autowire with @Qualifier
>> >> >>> (equivalent to @Resource) should also work, I have to try that.
>> >> >>>
>> >> >>> musachy
>> >> >>>
>> >> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
>> >> >
>> >> >>wrote:
>> >>  In my struts.xml I have:
>> >> 
>> >>   
>> >> 
>> >>  And at the top of my applicationContext.xml I have:
>> >> 
>> >>  
>> >> 
>> >>  And my Interceptors are getting injected just fine.  On
>another
>> >> >>project, I
>> >>  have autowiring turned off, but then you have to define each
>> >> >>interceptor as
>> >>  a bean in the applicationContext.xml and specifically define
>the
>> >> >>objects
>> >>  that get injected into it.
>> >>   (*Chris*)
>> >> 
>> >>  On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
>> >>  list-subscripti...@secmgmt.com> wrote:
>> >> 
>> >> > Correct me if I'm wrong, please, but if I have an
>interceptor,
>> >it
>> >> >>should
>> >> > get
>> >> > injected by spring.
>> >> >
>> >> > I have a bean I'm expecting, the set method written, and the
>> >bean
>> >> >>defined
>> >> > in
>> >> > applicationContext.
>> >> >
>> >> > My main struts.xml has:
>> >> >
>> >> > > >> > value="org.apache.struts2.spring.StrutsSpringObjectFactory"
>/>
>> >> >
>> >> > My setter is not getting called, is there anything else I
>need
>> >to
>> >> >>do?

Re: Interceptor IOC with Spring

2009-09-24 Thread Chris Pratt
The only other difference I can see between my (working) example and yours
is that I used the shortcut



I don't know if there's a difference under the covers or not.

Also, is the intercept method of your interceptor being called?
  (*Chris*)

On Thu, Sep 24, 2009 at 8:45 AM, Mike Baranski <
list-subscripti...@secmgmt.com> wrote:

> http://www.springframework.org/schema/beans";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:util="http://www.springframework.org/schema/util";
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util-2.0.xsd";
> default-autowire="byName">
>
> >-Original Message-
> >From: Chris Pratt [mailto:thechrispr...@gmail.com]
> >Sent: Thursday, September 24, 2009 11:29 AM
> >To: Struts Users Mailing List
> >Subject: Re: Interceptor IOC with Spring
> >
> >What do you have default-autowire set to in your applicationContext.xml?
> >  (*Chris*)
> >
> >On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
> >list-subscripti...@secmgmt.com> wrote:
> >
> >> OK, I'm stuck.
> >>
> >> applicationContext.xml (snipped):
> >>  >class="com.secmgmt.struts2.base.SMCBaseAction">
> >> 
> >>
> >> struts.xml (snipped):
> >>  >> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
> >>
> >> 
> >> >name="redirectMessage"/>
> >>
> >>
> >>
> >> >name="operatorHistory"/>
> >> >name="passwordExpired"/>
> >>
> >> 
> >> 
> >>
> >> PasswordExpiredInterceptor method:
> >> public void setSMCBaseAction(SMCBaseAction b) throws Exception
> >>{
> >>this.action = b;
> >>l.debug("Calling setSMCBaseAction with: " + b);
> >>this.initMe();
> >>}
> >>
> >> Actions (and my operatorHistory) interceptor have *other* beans
> >injected
> >> just fine.  Can someone point out where I'm going wrong (I'm sure it's
> >> something stupid).
> >>
> >> Thanks!
> >>
> >> >-Original Message-
> >> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
> >> >Sent: Wednesday, September 23, 2009 2:17 PM
> >> >To: 'Struts Users Mailing List'
> >> >Subject: RE: Interceptor IOC with Spring
> >> >
> >> >Doh!  Sorry for the goose chase, I'll review my code and post it if
> >I'm
> >> >still stuck...
> >> >
> >> >>-Original Message-
> >> >>From: Musachy Barroso [mailto:musa...@gmail.com]
> >> >>Sent: Wednesday, September 23, 2009 1:59 PM
> >> >>To: Struts Users Mailing List
> >> >>Subject: Re: Interceptor IOC with Spring
> >> >>
> >> >>Meh, it all works. Autorired with/without annotations and @Resource
> >> >>also works (in interceptors). @OP, something is wrong in your
> >> >>configuration, show us the code :)
> >> >>
> >> >>musachy
> >> >>
> >> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso
> >
> >> >>wrote:
> >> >>> Chris, if autowiring works then using @Autowire with @Qualifier
> >> >>> (equivalent to @Resource) should also work, I have to try that.
> >> >>>
> >> >>> musachy
> >> >>>
> >> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
> >> >
> >> >>wrote:
> >>  In my struts.xml I have:
> >> 
> >>   
> >> 
> >>  And at the top of my applicationContext.xml I have:
> >> 
> >>  
> >> 
> >>  And my Interceptors are getting injected just fine.  On another
> >> >>project, I
> >>  have autowiring turned off, but then you have to define each
> >> >>interceptor as
> >>  a bean in the applicationContext.xml and specifically define the
> >> >>objects
> >>  that get injected into it.
> >>   (*Chris*)
> >> 
> >>  On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
> >>  list-subscripti...@secmgmt.com> wrote:
> >> 
> >> > Correct me if I'm wrong, please, but if I have an interceptor,
> >it
> >> >>should
> >> > get
> >> > injected by spring.
> >> >
> >> > I have a bean I'm expecting, the set method written, and the
> >bean
> >> >>defined
> >> > in
> >> > applicationContext.
> >> >
> >> > My main struts.xml has:
> >> >
> >> >  >> > value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
> >> >
> >> > My setter is not getting called, is there anything else I need
> >to
> >> >>do?
> >> >
> >> >
> >> > M.
> >> >
> >> >
> >> > 
> >---
> >> >-
> >> >>-
> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > For additional commands, e-mail: user-h...@struts.apache.org
> >> >
> >> >
> >> 
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >> >>

RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:util="http://www.springframework.org/schema/util";
   xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd";
default-autowire="byName">

>-Original Message-
>From: Chris Pratt [mailto:thechrispr...@gmail.com]
>Sent: Thursday, September 24, 2009 11:29 AM
>To: Struts Users Mailing List
>Subject: Re: Interceptor IOC with Spring
>
>What do you have default-autowire set to in your applicationContext.xml?
>  (*Chris*)
>
>On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
>list-subscripti...@secmgmt.com> wrote:
>
>> OK, I'm stuck.
>>
>> applicationContext.xml (snipped):
>> class="com.secmgmt.struts2.base.SMCBaseAction">
>> 
>>
>> struts.xml (snipped):
>> > value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>>
>> 
>>name="redirectMessage"/>
>>
>>
>>
>>name="operatorHistory"/>
>>name="passwordExpired"/>
>>
>> 
>> 
>>
>> PasswordExpiredInterceptor method:
>> public void setSMCBaseAction(SMCBaseAction b) throws Exception
>>{
>>this.action = b;
>>l.debug("Calling setSMCBaseAction with: " + b);
>>this.initMe();
>>}
>>
>> Actions (and my operatorHistory) interceptor have *other* beans
>injected
>> just fine.  Can someone point out where I'm going wrong (I'm sure it's
>> something stupid).
>>
>> Thanks!
>>
>> >-Original Message-
>> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>> >Sent: Wednesday, September 23, 2009 2:17 PM
>> >To: 'Struts Users Mailing List'
>> >Subject: RE: Interceptor IOC with Spring
>> >
>> >Doh!  Sorry for the goose chase, I'll review my code and post it if
>I'm
>> >still stuck...
>> >
>> >>-Original Message-
>> >>From: Musachy Barroso [mailto:musa...@gmail.com]
>> >>Sent: Wednesday, September 23, 2009 1:59 PM
>> >>To: Struts Users Mailing List
>> >>Subject: Re: Interceptor IOC with Spring
>> >>
>> >>Meh, it all works. Autorired with/without annotations and @Resource
>> >>also works (in interceptors). @OP, something is wrong in your
>> >>configuration, show us the code :)
>> >>
>> >>musachy
>> >>
>> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso
>
>> >>wrote:
>> >>> Chris, if autowiring works then using @Autowire with @Qualifier
>> >>> (equivalent to @Resource) should also work, I have to try that.
>> >>>
>> >>> musachy
>> >>>
>> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
>> >
>> >>wrote:
>>  In my struts.xml I have:
>> 
>>   
>> 
>>  And at the top of my applicationContext.xml I have:
>> 
>>  
>> 
>>  And my Interceptors are getting injected just fine.  On another
>> >>project, I
>>  have autowiring turned off, but then you have to define each
>> >>interceptor as
>>  a bean in the applicationContext.xml and specifically define the
>> >>objects
>>  that get injected into it.
>>   (*Chris*)
>> 
>>  On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
>>  list-subscripti...@secmgmt.com> wrote:
>> 
>> > Correct me if I'm wrong, please, but if I have an interceptor,
>it
>> >>should
>> > get
>> > injected by spring.
>> >
>> > I have a bean I'm expecting, the set method written, and the
>bean
>> >>defined
>> > in
>> > applicationContext.
>> >
>> > My main struts.xml has:
>> >
>> > > > value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>> >
>> > My setter is not getting called, is there anything else I need
>to
>> >>do?
>> >
>> >
>> > M.
>> >
>> >
>> > 
>---
>> >-
>> >>-
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>> 
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >>>
>> >>
>> >>
>> >>
>> >>--
>> >>"Hey you! Would you help me to carry the stone?" Pink Floyd
>> >>
>> >>
>-
>> >>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >>For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>> >-
>> >To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr..

Re: Interceptor IOC with Spring

2009-09-24 Thread Chris Pratt
What do you have default-autowire set to in your applicationContext.xml?
  (*Chris*)

On Thu, Sep 24, 2009 at 8:08 AM, Mike Baranski <
list-subscripti...@secmgmt.com> wrote:

> OK, I'm stuck.
>
> applicationContext.xml (snipped):
> 
> 
>
> struts.xml (snipped):
>  value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
> 
>
>
>
>
>
>
>
> 
> 
>
> PasswordExpiredInterceptor method:
> public void setSMCBaseAction(SMCBaseAction b) throws Exception
>{
>this.action = b;
>l.debug("Calling setSMCBaseAction with: " + b);
>this.initMe();
>}
>
> Actions (and my operatorHistory) interceptor have *other* beans injected
> just fine.  Can someone point out where I'm going wrong (I'm sure it's
> something stupid).
>
> Thanks!
>
> >-Original Message-
> >From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
> >Sent: Wednesday, September 23, 2009 2:17 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: Interceptor IOC with Spring
> >
> >Doh!  Sorry for the goose chase, I'll review my code and post it if I'm
> >still stuck...
> >
> >>-Original Message-
> >>From: Musachy Barroso [mailto:musa...@gmail.com]
> >>Sent: Wednesday, September 23, 2009 1:59 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: Interceptor IOC with Spring
> >>
> >>Meh, it all works. Autorired with/without annotations and @Resource
> >>also works (in interceptors). @OP, something is wrong in your
> >>configuration, show us the code :)
> >>
> >>musachy
> >>
> >>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso 
> >>wrote:
> >>> Chris, if autowiring works then using @Autowire with @Qualifier
> >>> (equivalent to @Resource) should also work, I have to try that.
> >>>
> >>> musachy
> >>>
> >>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
> >
> >>wrote:
>  In my struts.xml I have:
> 
>   
> 
>  And at the top of my applicationContext.xml I have:
> 
>  
> 
>  And my Interceptors are getting injected just fine.  On another
> >>project, I
>  have autowiring turned off, but then you have to define each
> >>interceptor as
>  a bean in the applicationContext.xml and specifically define the
> >>objects
>  that get injected into it.
>   (*Chris*)
> 
>  On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
>  list-subscripti...@secmgmt.com> wrote:
> 
> > Correct me if I'm wrong, please, but if I have an interceptor, it
> >>should
> > get
> > injected by spring.
> >
> > I have a bean I'm expecting, the set method written, and the bean
> >>defined
> > in
> > applicationContext.
> >
> > My main struts.xml has:
> >
> >  > value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
> >
> > My setter is not getting called, is there anything else I need to
> >>do?
> >
> >
> > M.
> >
> >
> > ---
> >-
> >>-
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> >>>
> >>>
> >>>
> >>> --
> >>> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >>>
> >>
> >>
> >>
> >>--
> >>"Hey you! Would you help me to carry the stone?" Pink Floyd
> >>
> >>-
> >>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> >-
> >To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >For additional commands, e-mail: user-h...@struts.apache.org
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: co-exist REST and Old model

2009-09-24 Thread Dale Newfield

Frans Thamura wrote:

i try several small REST and old S2 development

and the old one cannot work


I built something that allows you to use different action mappers for 
different segments of urls.  I've never quite wrapped it up well enough 
to contribute (no test cases), but since I've gotten tired of sending it 
via email whenever people ask for it, I've just put what I've got as a 
feature request in JIRA, anyway.  You can grab the 
"PrefixBasedActionMapper" class from 
.


-Dale

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



RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
OK, I'm stuck.

applicationContext.xml (snipped):



struts.xml (snipped):













PasswordExpiredInterceptor method:
public void setSMCBaseAction(SMCBaseAction b) throws Exception
{
this.action = b;
l.debug("Calling setSMCBaseAction with: " + b);
this.initMe();
}

Actions (and my operatorHistory) interceptor have *other* beans injected
just fine.  Can someone point out where I'm going wrong (I'm sure it's
something stupid).

Thanks!

>-Original Message-
>From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>Sent: Wednesday, September 23, 2009 2:17 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Interceptor IOC with Spring
>
>Doh!  Sorry for the goose chase, I'll review my code and post it if I'm
>still stuck...
>
>>-Original Message-
>>From: Musachy Barroso [mailto:musa...@gmail.com]
>>Sent: Wednesday, September 23, 2009 1:59 PM
>>To: Struts Users Mailing List
>>Subject: Re: Interceptor IOC with Spring
>>
>>Meh, it all works. Autorired with/without annotations and @Resource
>>also works (in interceptors). @OP, something is wrong in your
>>configuration, show us the code :)
>>
>>musachy
>>
>>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso 
>>wrote:
>>> Chris, if autowiring works then using @Autowire with @Qualifier
>>> (equivalent to @Resource) should also work, I have to try that.
>>>
>>> musachy
>>>
>>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
>
>>wrote:
 In my struts.xml I have:

  

 And at the top of my applicationContext.xml I have:

 

 And my Interceptors are getting injected just fine.  On another
>>project, I
 have autowiring turned off, but then you have to define each
>>interceptor as
 a bean in the applicationContext.xml and specifically define the
>>objects
 that get injected into it.
  (*Chris*)

 On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
 list-subscripti...@secmgmt.com> wrote:

> Correct me if I'm wrong, please, but if I have an interceptor, it
>>should
> get
> injected by spring.
>
> I have a bean I'm expecting, the set method written, and the bean
>>defined
> in
> applicationContext.
>
> My main struts.xml has:
>
>  value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
> My setter is not getting called, is there anything else I need to
>>do?
>
>
> M.
>
>
> ---
>-
>>-
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

>>>
>>>
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>
>>
>>
>>--
>>"Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>-
>>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>For additional commands, e-mail: user-h...@struts.apache.org
>
>
>-
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org


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



Re: Benefit of

2009-09-24 Thread Wes Wannemacher
The ng.* filters are where we are moving. The original filter worked,
but there were problems that led us to create multiple filters for
situations where we need to execute some stuff up front, let another
filter do some stuff (sitemesh, in particular), then finish up with
another one of our own filters.

If you aren't using Sitemesh or anything that needs to go in the
middle, then I think there is another filter you can use
PrepareAndExecuteFilter ?

-Wes

On Thu, Sep 24, 2009 at 7:08 AM, Frans Thamura  wrote:
> hi all
>
> i use org.apache.struts2.dispatcher.FilterDispatcher, the system run
> well with it ;)
>
> but i found  NG Dispatcher,
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
>
>
> any idea?
>
>
> F
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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



Re: Spring 3.0 (REST) and Struts2

2009-09-24 Thread Wes Wannemacher
On Thu, Sep 24, 2009 at 6:01 AM, Frans Thamura  wrote:
[snip]
>
> there is declarative transaction inside spring that may be can benefit
> S2 apps, can share this experience?
>

Frans, I use Spring's declarative transaction management, but there
are some caveats. The biggest being that it depends on AOP. This is
subtle, but I have been bitten by a few of the side-effects. First of
all, behind the scenes, Spring tries to use Dynamic JDK proxies which
imposes the requirement that the "intercepted" methods must be
implementations from an interface. This means that if you try to use
@Transactional on an action method like the following -

public class SomeAction extends ActionSupport {
  ...

  @Transactional
  public String someInterestingMethod() {
doSomethingInteresting(BusinessClass bizInstance);
return SUCCESS;
  }
}

This does not work, since you can see from the class declaration,
SomeAction is not implementing an interface that exposes 'public
String someInterestingMethod();' This is easily mitigated by
configuring Spring to use CGLIB rather than JDK proxies. This imposes
a rule though that any classes using @Transactional must have a
default, no-arg constructor.

The next issue that bit me was that 'self-invocation' does not work
(which makes sense and I should have known it wouldn't work).
Self-invocation is a situation like this -

public class SomeServiceImpl implements SomeService {
  ...
  @Transactional
  public BusinessClass save(BusinessClass bizClass) {
...
  }

  public BusinessClass create(String id, String value) {
BusinessClass newInstance = new BusinessClass();
newInstance.setId(id);
newInstance.setValue(value);
return save(newInstance);
  }
}

Notice that 'create' doesn't have @Transactional? It shouldn't need
it, right, 'save' has it... Well, this doesn't work. The call to
'save' isn't intercepted (IIRC, it doesn't matter if the proxies are
JDK or CGLIB).

That being said, declarative transaction management is great! I still
prefer it, and just work around these issues. I have found that if I
separate things appropriately (service = interfaces, implementations =
spring beans) then I don't have to worry too much. I don't mess with
transactions in Struts actions and if I feel like I need a transaction
in an action, I just refactor the service.

-Wes

PS. As to Spring 3, as soon as it's released, we will work toward
getting it working.

-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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



Re: Struts 2 custom ClassLoader

2009-09-24 Thread Wes Wannemacher
One place to start is the XmlConfigurationProvider in xwork. Struts
has its own XmlConfigurationProvider, imaginatively named
StrutsXmlConfigurationProvider, but struts' version simply overrides
xwork's and sets some filenames to be struts-*.xml and
struts.properties, etc. then injects the ServletContext into the
Container. Depending on how complex your needs are, I would consider
starting with XmlConfigurationProvider/StrutsXmlConfigurationProvider
and see if you can get what you want via inheritance. If not, it may
be easier to simply implement your own ConfigurationProvider and
figure out how to get the Dispatcher to call
ConfigurationManager.addConfigurationProvider(ConfigurationProvider
yourImpl) on your class.

-Wes

On Thu, Sep 24, 2009 at 8:58 AM, Andriy Pererva  wrote:
> Thank you so much, guys!
> I created the custom ObjectFactory, override the only method -
> getClassInstance() in order to enforce Struts to use my custom
> ClassLoader, so now all the action classes load from the "right
> place".
> Now just one problem remained. Some of my struts.xml's parts should
> also stay in the custom location (not under classpath, as regular
> struts.xml). How can I enforce Struts to use my custom classloader's
> getResource()/getResourceAsStream() methods to load these
> configuration file parts?
> According to the book "Struts 2 in Action", the ObjectFactory
> considered an "official" extension point for plug-ins (pages 320 -
> 321), but I haven't seen any extension points for configuration
> providers. What class/method should I override and how can I wire this
> class with Struts in plug-in-like way, i.e. without tampering in the
> struts core libs?
> Thank you in advance for any useful answer!
>
> With best regards,
> Andriy
>
>
> On Wed, Sep 9, 2009 at 4:41 PM, Wes Wannemacher wrote:
>> I don't know if I would override the class loader (did I suggest that
>> earlier, if so, sorry :( ). I would take a look at overriding the
>> buildBean methods. Use your custom classloader to build the 'beans'
>> but do it in a way that tries your classloader first, then falls
>> through to the super class... For instance, the key lines in xwork's
>> SpringObjectFactory (which is where the meat of the spring-plugin is
>> located) looks like this -
>>
>>            if (appContext.containsBean(className)) {
>>                clazz = appContext.getBean(className).getClass();
>>            } else {
>>                clazz = super.getClassInstance(className);
>>            }
>>
>> The SpringObjectFactory is a bit large-ish because we added some
>> helpful spring integration (supporting autowiring, etc.), but IMO it
>> is still the best example for you to get what you want. I don't think
>> our fisheye instance at opensymphony is working, so the best thing to
>> do is either check out xwork from svn -
>>
>> svn co http://svn.opensymphony.com/svn/xwork/trunk
>>
>> And you'll find SpringObjectFactory.java in there under
>> trunk/core/src/main/java/com/opensymphony/xwork2/spring
>>
>> Or if you're not into svn, then you can probably just download the
>> file by hitting the following URL in your browser -
>>
>> http://svn.opensymphony.com/svn/xwork/trunk/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
>>
>> -Wes
>>
>> On Wed, Sep 9, 2009 at 6:25 AM, Andriy Pererva  
>> wrote:
>>> Hello, Wes!
>>> Thank you for your quick help! I did exactly what you advised me, but
>>> something still doesn't work. Here are my steps:
>>> 1) Created CustomObjectFactory which extends StrutsObjectFactory, with
>>> only one method overriden - setClassLoader(). Inside this method I
>>> simply pass my custom classloader to super.setClassLoader().
>>> 2) Inserted in my struts.xml (right after struts-default.xml
>>> inclusion) next strings:
>>>  >> name="customFactory"
>>> class="efi.base.web.framework.CustomObjectFactory" />
>>>  
>>> After that I tried to debug my CustomObjectFactory in Eclipse, but my
>>> overriden method setClassLoader() hasn't been invoked during struts
>>> initialization.
>>> Currently we are using Struts 2.0.11.
>>> Please, tell me what I'm doing wrong? What is the most neat way to
>>> intelligently pass my classloader to Struts?
>>> Again, thank you in advance for you answer!
>>>
>>>
>>> With best regards,
>>> Andriy
>>>
>>>
>>>
>>> On Thu, Sep 3, 2009 at 4:39 PM, Wes Wannemacher wrote:
 I would suggest creating your own plugin... If the custom classes are
 actions, validators, interceptors and type converters then just take a
 look at the spring plugin for an example. You will want to write your
 own implementation of the ObjectFactory, the ObjectFactory is in
 charge of creating the struts2 app's actions, validators,
 interceptors, type converters and beans.

 As far as enhancing the functionality of struts.xml processing, I
 would first suggest you see if you can retrofit your application to
 work with one of the existing plugins like 'conventions'. I only say

Re: How to import a struts 2 action into a jsp?

2009-09-24 Thread Wes Wannemacher
+1 to Nils suggestion on the s:action tag. If you want the output from
'running' the action, set executeResult=true on the tag.

-Wes

On Thu, Sep 24, 2009 at 6:01 AM, Nils-Helge Garli Hegvik
 wrote:
> Can't you use the s:action tag? Anyway, this might have something to
> do with filter configuration. Try adding this to the filter definition
> in web.xml:
>
> REQUEST
> INCLUDE
> FORWARD
>
> Nils-H
>
> On Thu, Sep 24, 2009 at 11:18 AM, Per Johansson  wrote:
>> Hi,
>>
>> I am new to Struts and want to import a Struts 2 action into a jsp by
>> jstl import:
>>        
>> But neither Tomcat nor Jboss seem to like this - but gives the reply:
>> Importing /HelloWorld_input.action: The requested resource
>> (/HelloImport/HelloWorld_input.action) is not available
>>
>> Using c:import does not seem to trigger the processing of the struts
>> filter dispatcher.
>>
>> If I import via an intermediate jsp instead, it works:
>> 
>>
>> With hello.jsp:
>> ---
>>    
>>        
>>            
>>            
>>        
>>    
>> ---
>>
>> And struts.xml:
>> 
>>    
>>        
>>            /hello.jsp
>>        
>>        
>>            /success.jsp
>>        
>>    
>> 
>>
>>
>> With Struts you should never access jsp:s directly, but always work
>> with actions.
>> Is there any trick to import a Struts 2 action directly into a JSP?
>>
>>
>> /Best regards, Per Johansson
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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



Benefit of

2009-09-24 Thread Frans Thamura
hi all

i use org.apache.struts2.dispatcher.FilterDispatcher, the system run
well with it ;)

but i found  NG Dispatcher,
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter


any idea?


F

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



co-exist REST and Old model

2009-09-24 Thread Frans Thamura
hi all

i try several small REST and old S2 development

and the old one cannot work

can help?

this is simple xml of S2.xml,





http://struts.apache.org/dtds/struts-2.0.dtd";>










/success.jsp




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



Spring 3.0 (REST) and Struts2

2009-09-24 Thread Frans Thamura
hi all

i just put Spring 3.0 to S2 REST environment, and still trying to work with,

i still testing several small code of old S2 inside, but the spring
has work unconnected with Spring.

S2-Spring work well also with Spring 3M3.

i read several url like this

http://blog.springsource.com/2009/03/08/rest-in-spring-3-mvc/

and got that Spring 3 also move to REST

any comment it?


and also

there is declarative transaction inside spring that may be can benefit
S2 apps, can share this experience?

thx
Frans

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



Implement Locateor for S2 2.1.6 with REST plugins

2009-09-24 Thread Frans Thamura
hi all

i am working with REST now, and the example with
org.apache.struts.example work well

i try to refactor become org.blueoxygen.cimande from


i put this



and the example work well :)

how can struts2 know the package locators is cimande from
org.blueoxygen.cimande ,



i try to put org.blueoxygen.cimande and got this error

There is no Action mapped for namespace / and action name messages. -
[unknown location]


can help all?



Frans

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



Re: Struts 2 custom ClassLoader

2009-09-24 Thread Andriy Pererva
Thank you so much, guys!
I created the custom ObjectFactory, override the only method -
getClassInstance() in order to enforce Struts to use my custom
ClassLoader, so now all the action classes load from the "right
place".
Now just one problem remained. Some of my struts.xml's parts should
also stay in the custom location (not under classpath, as regular
struts.xml). How can I enforce Struts to use my custom classloader's
getResource()/getResourceAsStream() methods to load these
configuration file parts?
According to the book "Struts 2 in Action", the ObjectFactory
considered an "official" extension point for plug-ins (pages 320 -
321), but I haven't seen any extension points for configuration
providers. What class/method should I override and how can I wire this
class with Struts in plug-in-like way, i.e. without tampering in the
struts core libs?
Thank you in advance for any useful answer!

With best regards,
Andriy


On Wed, Sep 9, 2009 at 4:41 PM, Wes Wannemacher wrote:
> I don't know if I would override the class loader (did I suggest that
> earlier, if so, sorry :( ). I would take a look at overriding the
> buildBean methods. Use your custom classloader to build the 'beans'
> but do it in a way that tries your classloader first, then falls
> through to the super class... For instance, the key lines in xwork's
> SpringObjectFactory (which is where the meat of the spring-plugin is
> located) looks like this -
>
>            if (appContext.containsBean(className)) {
>                clazz = appContext.getBean(className).getClass();
>            } else {
>                clazz = super.getClassInstance(className);
>            }
>
> The SpringObjectFactory is a bit large-ish because we added some
> helpful spring integration (supporting autowiring, etc.), but IMO it
> is still the best example for you to get what you want. I don't think
> our fisheye instance at opensymphony is working, so the best thing to
> do is either check out xwork from svn -
>
> svn co http://svn.opensymphony.com/svn/xwork/trunk
>
> And you'll find SpringObjectFactory.java in there under
> trunk/core/src/main/java/com/opensymphony/xwork2/spring
>
> Or if you're not into svn, then you can probably just download the
> file by hitting the following URL in your browser -
>
> http://svn.opensymphony.com/svn/xwork/trunk/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
>
> -Wes
>
> On Wed, Sep 9, 2009 at 6:25 AM, Andriy Pererva  wrote:
>> Hello, Wes!
>> Thank you for your quick help! I did exactly what you advised me, but
>> something still doesn't work. Here are my steps:
>> 1) Created CustomObjectFactory which extends StrutsObjectFactory, with
>> only one method overriden - setClassLoader(). Inside this method I
>> simply pass my custom classloader to super.setClassLoader().
>> 2) Inserted in my struts.xml (right after struts-default.xml
>> inclusion) next strings:
>>  > name="customFactory"
>> class="efi.base.web.framework.CustomObjectFactory" />
>>  
>> After that I tried to debug my CustomObjectFactory in Eclipse, but my
>> overriden method setClassLoader() hasn't been invoked during struts
>> initialization.
>> Currently we are using Struts 2.0.11.
>> Please, tell me what I'm doing wrong? What is the most neat way to
>> intelligently pass my classloader to Struts?
>> Again, thank you in advance for you answer!
>>
>>
>> With best regards,
>> Andriy
>>
>>
>>
>> On Thu, Sep 3, 2009 at 4:39 PM, Wes Wannemacher wrote:
>>> I would suggest creating your own plugin... If the custom classes are
>>> actions, validators, interceptors and type converters then just take a
>>> look at the spring plugin for an example. You will want to write your
>>> own implementation of the ObjectFactory, the ObjectFactory is in
>>> charge of creating the struts2 app's actions, validators,
>>> interceptors, type converters and beans.
>>>
>>> As far as enhancing the functionality of struts.xml processing, I
>>> would first suggest you see if you can retrofit your application to
>>> work with one of the existing plugins like 'conventions'. I only say
>>> this because enhancing the XmlConfigurationProvider is quite a bit
>>> more daunting than extending the ObjectFactory. If you really can't
>>> adopt an existing plugin for configuration, then create an
>>> implementation of ConfigurationProvider and take a look at the
>>> StrutsXmlConfigurationProvider and see if you can get the dispatcher
>>> to honor your new ConfigurationProvider.
>>>
>>> -Wes
>>>
>>> On Thu, Sep 3, 2009 at 9:33 AM, Andriy Pererva 
>>> wrote:
 Hi, all!
 I'm working on a big java web project, which is based on Struts 2
 framework. Now we are going to do some refactoring and split the
 project up in some parts: core and other auxillary functionality
 modules. Core classes located under classpath, but all the auxillary
 functionality classes will be moved to database and loaded via our
 custom ClassLoader. Among these classes there are some Stu

Re: Question about 'if' tag

2009-09-24 Thread Dennis Atkinson
Yes, this all works now!  Thanks so much to Pawel, Wes, Tom for helping a 
newbie like me.  I hope not to be a newbie for too much longer!

--Dennis






From: Thomas Sattler 
To: Struts Users Mailing List 
Sent: Wednesday, September 23, 2009 8:01:22 PM
Subject: Re: Question about 'if' tag

I think Pawel omitted something in the original reply.

You can't say:


That won't work.

Instead, you have to say:






2009/9/23 Paweł Wielgus 

> Hi again,
> firstly You should read about OGNL basics because You are using it,
> then if You write  it works, why?,
> because struts is treating it like a regular getter,
> so it adds get and makes can to camel case Can and in result it
> searches for getCanEditCustomer() method, and it finds it in action.
> It is a general shortcut for dealing with fields which has getters and
> setters.
>
> Now when You write  struts sees this ()
> at the end and it searches for canEditCustomer() method and of course
> it's not finding it anywhere.
>
> And last the method should be isCanEditCustomer(), but that is just my
> habbit.
>
> Also keep in mind what Wes was writing about, hidding a link is not
> suficient.
>
> Best greetings,
> Paweł Wielgus.
>
> 2009/9/23 Dennis Atkinson :
> > I have gone through Pawel's example and it is not working for me.
> >
> > Here is the iterator:
> >
> > 
> >
> > I created three methods in my action class:
> >
> > public boolean getCanEditCustomer()
> > {
> >return false ;
> > }
> >
> > public boolean getCanEditCustomer(Integer anInt)
> > {
> >return false ;
> > }
> >
> > public boolean getCanEditCustomer(Customer aCustomer)
> > {
> >return false ;
> > }
> >
> > These are dummy methods just to see if everything will work.  I set an
> Eclipse breakpoint on each return statement.  So in theory, Eclipse should
> stop on one of the statements whether I pass in nothing, an integer, or a
> Customer object.
> >
> > The results are:
> >
> >   (This stops in the first
> method)
> > (This never stops)
> >   (This never stops)
> >(This never stops)
> >
> > So it seems like no parameters are being passed in; in fact when I use
> the braces to indicate no parameter, that doesn't work either.
> >
> >
> >
> >
> >
> >
> >
> > 
> > From: Wes Wannemacher 
> > To: Struts Users Mailing List 
> > Sent: Wednesday, September 23, 2009 4:20:33 PM
> > Subject: Re: Question about 'if' tag
> >
> > In addition to what Pawel is saying, be careful that you also check
> > the 'canEditCustomer(target)' call in the target action since there is
> > nothing to stop someone from figuring out the URL pattern and editing
> > people they weren't intended to edit.
> >
> > -Wes
> >
> > 2009/9/23 Paweł Wielgus :
> >> Hi Dennis,
> >> You are nesting tags, it's not possible/permitted,
> >> what You should do is something like:
> >>  or  var="iter">
> >> 
> >> 
> >>
> >> Which simply is naming your iterator variable to "iter" and use it in if
> tag,
> >> depending on struts2 version it will be id or var.
> >>
> >> Best greetings,
> >> Paweł Wielgus.
> >>
> >>
> >> 2009/9/23 Dennis Atkinson :
> >>> Hi all.
> >>>
> >>> In my Struts2 application, I have a collection of Customer objects, and
> various users have the rights to edit some of them and not others.  I have
> created a Struts iterator tag, and in the iterator, I put the various
> Customer attributes into an HTML table.  All this works.
> >>>
> >>> In one cell of the table, I have the string "Edit", and if it's
> clicked, it goes to another Action class to edit that particular Customer
> object.  All that works too.
> >>>
> >>> What I want to do is only show the "Edit" string if the user has the
> right to edit that Customer.  I'm trying to set a " but I am sure I'm not doing it right (because it's not working).
> >>>
> >>> I am trying:
> >>>
> >>> 
> >>>
> >>> hoping "property" is the current object in the iteration.  But whatever
> is happening, this doesn't do what I hope it does.  Am I anywhere close to
> the right solution here?
> >>>
> >>> Thanks,
> >>> Dennis
> >>>
> >>>
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
> >
> >
> > --
> > Wes Wannemacher
> >
> > Head Engineer, WanTii, Inc.
> > Need Training? Struts, Spring, Maven, Tomcat...
> > Ask me for a quote!
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



  

Re: How to import a struts 2 action into a jsp?

2009-09-24 Thread Nils-Helge Garli Hegvik
Can't you use the s:action tag? Anyway, this might have something to
do with filter configuration. Try adding this to the filter definition
in web.xml:

REQUEST
INCLUDE
FORWARD

Nils-H

On Thu, Sep 24, 2009 at 11:18 AM, Per Johansson  wrote:
> Hi,
>
> I am new to Struts and want to import a Struts 2 action into a jsp by
> jstl import:
>        
> But neither Tomcat nor Jboss seem to like this - but gives the reply:
> Importing /HelloWorld_input.action: The requested resource
> (/HelloImport/HelloWorld_input.action) is not available
>
> Using c:import does not seem to trigger the processing of the struts
> filter dispatcher.
>
> If I import via an intermediate jsp instead, it works:
> 
>
> With hello.jsp:
> ---
>    
>        
>            
>            
>        
>    
> ---
>
> And struts.xml:
> 
>    
>        
>            /hello.jsp
>        
>        
>            /success.jsp
>        
>    
> 
>
>
> With Struts you should never access jsp:s directly, but always work
> with actions.
> Is there any trick to import a Struts 2 action directly into a JSP?
>
>
> /Best regards, Per Johansson
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



Instance object with spring in struts2

2009-09-24 Thread Francisco Exposito

Hello,

I've installed spring plugin fullhibernatecore plugin. Then I have defined in 
applicationContext 



Then I have an action class where I define (with getters and setters):

private ICountryService countryService;

And when the action happens it instances the countryService.


Also I have the same, but in a conversion class(public class CountryConversion 
extends StrutsTypeConverter), and it works properly.

But I have another action where nothing happens. It maintains the 
variable=null. This new class is a util class which I have to instantiate to 
execute its methods. Here is the class.

package com.virtua.market.util;

import java.util.List;

import com.virtua.market.service.interfaces.ICountryService;
import com.virtua.market.vo.Country;

public class ComboUtilPersistenceFunctions
{
private ICountryService countryService;

public List getCountries()
{
List countries=null;
countries = countryService.getAll();
return countries;
}

public void setCountryService(ICountryService countryService)
{
this.countryService = countryService;
}

public ICountryService getCountryService()
{
return countryService;
}
}


Anybody knows what can I do?

Thanks in advance
  
_
Llévate Messenger en el móvil a todas partes ¡Conéctate!
http://www.microsoft.com/spain/windowsmobile/messenger/default.mspx

How to import a struts 2 action into a jsp?

2009-09-24 Thread Per Johansson
Hi,

I am new to Struts and want to import a Struts 2 action into a jsp by
jstl import:

But neither Tomcat nor Jboss seem to like this - but gives the reply:
Importing /HelloWorld_input.action: The requested resource
(/HelloImport/HelloWorld_input.action) is not available

Using c:import does not seem to trigger the processing of the struts
filter dispatcher.

If I import via an intermediate jsp instead, it works:


With hello.jsp:
---






---

And struts.xml:



/hello.jsp


/success.jsp





With Struts you should never access jsp:s directly, but always work
with actions.
Is there any trick to import a Struts 2 action directly into a JSP?


/Best regards, Per Johansson

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