Title: RE: actionmapping set-property problem in 1.1 upgrade

Thanks Nazeer for the quick response. A follow up:
>Extend the com.participate.util.client.struts.ApplicationActionMapping
>to  have a getter and setter method for "continue" and change the
>className in the Struts config.

  What type for this 'continue' ? (i.e. boolean or String)

Also, how does struts use this? I grepped  for  'setContinue' and 'getContinue' and didn't find it anywhere.

thanks,

bill

-----Original Message-----
From: Syed, Nazeer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 11, 2003 10:11 AM
To: Struts Users Mailing List
Subject: RE: actionmapping set-property problem in 1.1 upgrade


Extend the com.participate.util.client.struts.ApplicationActionMapping
to  have a getter and setter method for "continue" and change the
className in the Struts config.

Then you can use set property

 

 

Thanks

Nazeer

 

-----Original Message-----
From: Bill Milbratz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 11, 2003 11:06 AM
To: '[EMAIL PROTECTED]'
Subject: actionmapping set-property problem in 1.1 upgrade

 

Hi,

We're upgrading to struts 1.1 and came across a problem with 'action
specific' 'set-property' elements. I've searched the archives but
haven't come across this problem.

Specifically this action entry:
        <!-- Display Public Profile -->
        <action path="/profile/publicprofile"
 
type="com.participate.pe.profile.client.actions.PublicProfileInit"
                name="publicProfileForm" scope="request"
 
className="com.participate.util.client.struts.ApplicationActionMapping">

              <set-property property="public" value="true"/>

            <forward name="continue"
path="/profile/include/publicprofile.jsp" />
        </action>

yields this error:
[2003-09-11 09:24:45,031] [ERROR] org.apache.commons.digester.Digester
(Digester.java:1275) - Begin event threw exception

java.lang.NoSuchMethodException: Bean has no property named public
at
org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:1
92)  at org.apache.commons.digester.Rule.begin(Rule.java:200)

The 1.1 dtd appears to still support the 'set-property' element in the
'action' element :
  ELEMENT action (icon?, display-name?, description?, set-property*,
exception*, forward*)>

The code looks like it only supports 'module-wide' mappings (from
initModuleConfig(String prefix, String paths) ):
        // Support for module-wide ActionMapping type override
        String mapping = getServletConfig().getInitParameter("mapping");

        if (mapping != null) {
            config.setActionMappingClass(mapping);
        }

Two questions:
1) Any workarounds for this?
2) We use this set-property to indicate which servlets are 'public
facing' and which require login. If anyone has a better solution for
distinguishing between such actions, I'd appreciate any insights.

thanks,

bill

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to