Vita Rara: A Life Uncommon

Dynamically loaded action

Hello I tried to create dynamically loaded Action writen in Groovy.
I created simple Groovy Action.

class SimpleGroovyAction extends ActionSupport{
	TestInterface groovyTest;

	public String getMessage(){
		return "I am the Actionnnnnnnnnnn";
	}
}

I can load it dynamically into Spring Context

< lang:groovy 
	id="groovyTest"
        scope="prototype"
	script-source="classpath:edu/pw/imio/groovy/SimpleGroovyAction.groovy"
	refresh-check-delay="1000">
< /lang:groovy >


Then Struts can load it by id

<action name="simpleGroovyAction" class="groovyTest" >
	<result>/WEB-INF/pages/groovyAction.jsp</result>
</action>

And it all works
But I can't access getMessage via ONGL. Do enybody know what is the problem
Sorry for &lt &gt

Finally I used Groovy Works But this plugin offers different aproach

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options