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: c:import url=/HelloWorld_input.action / But neither Tomcat nor Jboss seem to like this - but gives the reply: Importing /HelloWorld_input.action: The requested resource

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 bean id=countryService class=com.virtua.market.service.dao.CountryDaoService/ Then I have an action class where I define (with getters and setters): private ICountryService

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: dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher dispatcherFORWARD/dispatcher Nils-H On Thu, Sep 24, 2009 at 11:18 AM, Per Johansson

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 tomsatt...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday,

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

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 constant name=struts.convention.package.locators value=cimande/ and the example work well :) how can struts2 know the package locators

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

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, ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN

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,

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 nil...@gmail.com wrote: Can't you use the s:action tag? Anyway, this might have something to do with

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

Re: Spring 3.0 (REST) and Struts2

2009-09-24 Thread Wes Wannemacher
On Thu, Sep 24, 2009 at 6:01 AM, Frans Thamura fr...@meruvian.org 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

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

RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
OK, I'm stuck. applicationContext.xml (snipped): bean id=sMCBaseAction class=com.secmgmt.struts2.base.SMCBaseAction /bean struts.xml (snipped): constant name=struts.objectFactory value=org.apache.struts2.spring.StrutsSpringObjectFactory / interceptor-stack name=validationWorkflowStack

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

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): bean id=sMCBaseAction class=com.secmgmt.struts2.base.SMCBaseAction

RE: Interceptor IOC with Spring

2009-09-24 Thread Mike Baranski
beans xmlns=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

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 constant name=struts.objectFactory value=spring / 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

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

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 thechrispr...@gmail.com wrote: The only other difference I can see between my (working) example and yours is that I used the shortcut constant

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

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} tr td1/td td2/td

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 greg.zh...@barcap.com 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

Re: iterator tag: how to set iterate step?

2009-09-24 Thread Tommy Pham
- Original Message From: Musachy Barroso musa...@gmail.com To: Struts Users Mailing List user@struts.apache.org 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

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 tr s:iterator status=stat value={1,2,3,4,5} tds:property value=#stat.index //td s:if test=%{#stat.index %2 == 0} /trtr /s:if /s:iterator /tr That s:if should also make sure you're not on the last

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

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

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

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 i...@hoffmann.cx 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

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)

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

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

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 i...@hoffmann.cx wrote: In

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.

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 sx:textarea id=useid name=inUse st:param name=editorControls textGroup;|;justifyGroup/st:param /sx:textarea Any idea how to make it work

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

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: repository

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 dhi...@i-hicks.org 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

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

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

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