struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Racon" <lukasz.ra...@jgsullivan.com>
Subject RE: Custom action mapping / or configuration of actions....
Date Wed, 29 Dec 2004 23:29:05 GMT
Finally I had time to isolate the issue. The thing is that if you define
global action mapping in <action-mappings> and use multiple config files
(all in one module) the actions in config files that are processed later
will keep global setting from previous config file (unless you overwrite
the global setting).

More detail, example and patch are in bugzilla:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32882


Lukasz
Lukasz_public@racon.pl

-----Original Message-----
From: Joe Germuska [mailto:Joe@Germuska.com] 
Sent: Monday, December 20, 2004 5:01 PM
To: Peter Maas; Struts Users Mailing List
Subject: Re: Custom action mapping / or configuration of actions....

>When I do this I get a runtime error (I can understand that the
>actionmapping does not have this property...):

Ah... so you have to tell Struts to use your custom subclass.  This 
can be done for a single element using

<action className="com.example.MyActionMapping" ...>

or if you want to use it for all action mappings,

   <action-mappings type="com.example.MyActionMapping">
...

Note that I think there's a problem where if you use a custom 
action-mapping in the <action-mappings> element and you use a list of 
struts-config files, the value has a wider use than you'd expect -- I 
believe someone on my team told me that it also applied to action 
mappings in other struts config files which were processed later. 
You'd expect it would only apply to the action elements which are a 
child of the action-mappings element where that value is declared. 
I'll ask him to confirm and file a bug if that's true...

Joe




>//----------- stacktrace---------
>
>Dec 20, 2004 11:34:30 PM org.apache.commons.digester.Digester
>startElement
>SEVERE: Begin event threw exception
>java.lang.NoSuchMethodException: Bean has no property named
cacheTimeout
>         at
>org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:
192)
>         at org.apache.commons.digester.Rule.begin(Rule.java:200)
>         at
>org.apache.commons.digester.Digester.startElement(Digester.java:1273)
>         at
>com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEleme
nt(AbstractSAXParser.java:485)
>         at
>com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.em
ptyElement(AbstractXMLDocumentPars
>
>----------- stacktrace---------//
>
>Do I have to specify a custom actionmapping to get this done? Can this
>be specified per action or do I have to specify it globally in the
><action-mappings> parent...?
>

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

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


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


Mime
View raw message