Re: ActionMapping problem: upgrading struts1.0 to struts1.1 question

2004-03-03 Thread Alexander Craen
where are you trying to access your actionmapping?

- Original Message - 
From: "Averbukh Stella" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 6:13 PM
Subject: ActionMapping problem: upgrading struts1.0 to struts1.1 question


> In the current struts 1.0 application, we do following:
> 
> String actionNameFind = "/" + thisForm.getAction();
> ActionMapping newMapping = (ActionMapping)
> getServlet().findMapping(actionNameFind); 
> 
> Does anybody know how I can retrieve ActionMapping in a similar manner in
> struts 1.1?
> 
> Thank you so much.
> Stella.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



ActionMapping problem: upgrading struts1.0 to struts1.1 question

2004-03-03 Thread Averbukh Stella
In the current struts 1.0 application, we do following:

String actionNameFind = "/" + thisForm.getAction();
ActionMapping newMapping = (ActionMapping)
getServlet().findMapping(actionNameFind); 

Does anybody know how I can retrieve ActionMapping in a similar manner in
struts 1.1?

Thank you so much.
Stella.


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



RE: obtaining ActionMapping object

2004-01-22 Thread Bubeník Miroslav
I need send data from more than one formbean to the business logic. And before that I 
need validate that beans, becouse it is not "wizzard like flow".

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 5:39 PM
To: Struts Users Mailing List
Subject: Re: obtaining ActionMapping object



You need the "path" to specify which mapping you want.  From the RequestProcessor 
class, you can use:

    ActionMapping mapping = (ActionMapping)
moduleConfig.findActionConfig(path);

You can use RequestUtils to get your ModuleConfig.

Why not call the formbean's validate() method?


--- Bubeník_Miroslav <[EMAIL PROTECTED]> wrote:
> Hi,
> how can I obtain ActionMapping object for non-active path. I need it 
> for validating non active formbeans (but existing) stored in session. 
> thanx
>  
> miro
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it! 
http://webhosting.yahoo.com/ps/sb/

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


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



Re: obtaining ActionMapping object

2004-01-22 Thread Hubert Rabago

You need the "path" to specify which mapping you want.  From the RequestProcessor
class, you can use:

ActionMapping mapping = (ActionMapping)
moduleConfig.findActionConfig(path);

You can use RequestUtils to get your ModuleConfig.

Why not call the formbean's validate() method?


--- Bubeník_Miroslav <[EMAIL PROTECTED]> wrote:
> Hi,
> how can I obtain ActionMapping object for non-active path. I need it for
> validating non active formbeans (but existing) stored in session.
> thanx
>  
> miro
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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



obtaining ActionMapping object

2004-01-22 Thread Bubeník Miroslav
Hi,
how can I obtain ActionMapping object for non-active path. I need it for validating 
non active formbeans (but existing) stored in session.
thanx
 
miro


Re: ActionMapping - regexp pattern matching for path

2003-12-17 Thread Ted Husted
Not in 1.1, but you can use wildcards in the nightly build.

http://jakarta.apache.org/struts/userGuide/building_controller.html#action_mapping_wildcards

Sergey Proskurnya wrote:

Hello to all,

In Struts-1.1 it is possible to bind Actions to static URL path,
but is it possible to bind Actions to the set of the paths,
described by Java regular expression?
For example:




I mean that in this case the requests for "/users/John/",
"/users/Mary/" and etc. will be handled by "com.mysite.UserPageAction".
Thanks for attention,
  Sergey Proskurnya.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


RE: ActionMapping - regexp pattern matching for path

2003-12-17 Thread David Friedman
Can't you use a module and set the action mapping to 'unknown="true"' so
that one particular action is used for everything?  If so, you'd need to be
mapping actions as 'do/*' instead of '*.do', theoretically.  I've been
meaning to try this now that I'm using /do/* as my Struts v1.1 mapping but I
haven't got around to using any modules yet.  (I'm sooo slow on ths project,
like I don't want to do it).

Regards,
David

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 3:27 PM
To: Struts Users Mailing List
Subject: Re: ActionMapping - regexp pattern matching for path


No, I don't believe this is possible currently. Wildcards of any kind
(extending to regexps) are not support for ActionMapping paths.

Sergey Proskurnya wrote:

>Hello to all,
>
>In Struts-1.1 it is possible to bind Actions to static URL path,
>but is it possible to bind Actions to the set of the paths,
>described by Java regular expression?
>For example:
>
>   type="com.mysite.UserPageAction"
>   scope="session"
>   validate="false">
>   
>
>
>I mean that in this case the requests for "/users/John/",
>"/users/Mary/" and etc. will be handled by "com.mysite.UserPageAction".
>
>Thanks for attention,
>  Sergey Proskurnya.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


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



Re: ActionMapping - regexp pattern matching for path

2003-12-17 Thread Brice Ruth
No, I don't believe this is possible currently. Wildcards of any kind 
(extending to regexps) are not support for ActionMapping paths.

Sergey Proskurnya wrote:

Hello to all,

In Struts-1.1 it is possible to bind Actions to static URL path,
but is it possible to bind Actions to the set of the paths,
described by Java regular expression?
For example:

   


I mean that in this case the requests for "/users/John/",
"/users/Mary/" and etc. will be handled by "com.mysite.UserPageAction".
Thanks for attention,
 Sergey Proskurnya.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ActionMapping - regexp pattern matching for path

2003-12-17 Thread Sergey Proskurnya
Hello to all,

In Struts-1.1 it is possible to bind Actions to static URL path,
but is it possible to bind Actions to the set of the paths,
described by Java regular expression?
For example:





I mean that in this case the requests for "/users/John/",
"/users/Mary/" and etc. will be handled by "com.mysite.UserPageAction".

Thanks for attention,
  Sergey Proskurnya.

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



ActionMapping - dependency - question

2003-12-03 Thread Zimmek, Jan
Hi,

I have started to develop several reusable struts-enhancements like
(conditional-execution of actions, workflow, ...).
All of them have been realized using the nested  element of
the  element which is working very nice ;)

What I do not understand is, why the ConfigRuleSet.java defines the
following rule:

digester.addSetProperty("struts-config/action-mappings/action/set-property",
"property", "value");

instead of something similar to the datasource/plugin - rule:

digester.addRule("struts-config/plug-in/set-property", new
PlugInSetPropertyRule());

which invokes a method E.g. :

addProperty(String key, String value)

and not a "setter"-method like (when property="test") :

setTest(String value)


Due to this fact I am running into problem because I am not able to use
multiple enhancements at the same time, unless the defined
"ActionMapping"-class of the action implements "setter"-methods for all
required properties.

E.g:

class MyMapping
{
  setPermissionName()
  setNextFlow()
  setXXX
  ...
}

In my opinion this is a dependency which contradicts the independency of the
struts-framework as a whole.

It would be great if one of you could give me a hint on how to solve my
problem without changing the struts.DTD or anything along those lines.

Any help is very appreciated.

Jan Zimmek

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



Re: actionmapping set-property problem in 1.1 upgrade

2003-09-12 Thread Joe Germuska
At 0:30 +0200 9/12/03, Jan Zimmek wrote:
Adding a custom digester rule (like for "data-source" and "plugin") 
in this class:

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java?rev=1.15&content-type=text/vnd.viewcvs-markup

plus adding a java.lang.Map class-attribute should solve the 
problem, but this would mean to recompile an own struts-binary. 
Better someone who has cvs-write access fix it to be sure it is in 
the next nightly build.
You can extend the way that digester handles struts-config without 
recompiling ConfigRuleSet by setting a "rulesets" initialization 
parameter in the web.xml deployment descriptor:

http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config

Joe

--
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"If nature worked that way, the universe would crash all the time." 
	--Jaron Lanier

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


Re: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Jan Zimmek
RE: actionmapping set-property problem in 1.1 upgradeHi,

an alternative is the "parameter" - attribute of the "action" - element. But this way 
you can only pass one parameter (except you use a csv value and split this in your 
action manually).

Adding a custom digester rule (like for "data-source" and "plugin") in this class:

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java?rev=1.15&content-type=text/vnd.viewcvs-markup

plus adding a java.lang.Map class-attribute should solve the problem, but this would 
mean to recompile an own struts-binary. Better someone who has cvs-write access fix it 
to be sure it is in the next nightly build.

greets
Jan Zimmek

  - Original Message - 
  From: Bill Milbratz 
  To: 'Struts Users Mailing List' 
  Sent: Friday, September 12, 2003 12:15 AM
  Subject: RE: actionmapping set-property problem in 1.1 upgrade 


  I believe this is a bug in struts 1.1. Jan Zimmek posted a similar problem today. It 
seems that either the documentation or the code requires updating.

  The issue is that  no longer works for  as it did in 1.0.2.   
I upgraded to 1.1 from 1.0.2 today and first came across this problem.

  For example, this  element in struts-config.xml: 
  
  


  
  


  yields this message and exception  in the 1.1 log (includes Digester DEBUG):

  [2003-09-11 16:04:52,362] [DEBUG] org.apache.commons.digester.Digester 
(SetPropertyRule.java:174) - 
[SetPropertyRule]{struts-config/action-mappings/action/forward/set-property} Set 
org.apache.struts.action.ActionForward property public to true
  [2003-09-11 16:04:52,372] [ERROR] org.apache.commons.digester.Digester 
(Digester.java:1275) - Begin event threw exception
  java.lang.NoSuchMethodException: Bean has no property named public

  Based on the 'className' attribute in the  I would have expected to see:
Set com.participate.util.client.struts.ApplicationActionMapping public to true


  The documenation in the 1.1 dtd suggests that action should work fine.

  Documentation on classname attribute on action from dtd:
  

  any comments or workarounds?

  thanks,

  bill milbratz



--


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

RE: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Bill Milbratz
Title: RE: actionmapping set-property problem in 1.1 upgrade




I believe this is a bug in struts 1.1. Jan Zimmek 
posted a similar problem today. It seems that either the documentation or the 
code requires updating.
 
The issue is that  no longer works 
for  as it did in 1.0.2.   I upgraded to 1.1 from 1.0.2 
today and first came across this problem.
 

For example, this  element in 
struts-config.xml: 

            
type="com.participate.pe.profile.client.actions.PublicProfileInit"    
name="publicProfileForm" 
scope="request"    
className="com.participate.util.client.struts.ApplicationActionMapping">  

 
    
    

 
yields this message and exception  in the 1.1 
log (includes Digester 
DEBUG):
 
[2003-09-11 16:04:52,362] 
[DEBUG] org.apache.commons.digester.Digester (SetPropertyRule.java:174) - 
[SetPropertyRule]{struts-config/action-mappings/action/forward/set-property} Set 
org.apache.struts.action.ActionForward property public to true[2003-09-11 
16:04:52,372] [ERROR] org.apache.commons.digester.Digester (Digester.java:1275) 
- Begin event threw exceptionjava.lang.NoSuchMethodException: Bean has no 
property named public
 
Based on the 'className' attribute in the  I would have 
expected to see:
  Set 
com.participate.util.client.struts.ApplicationActionMapping public to 
true
 
The documenation in the 1.1 dtd suggests that action should work 
fine.
 
Documentation on classname attribute on action from 
dtd:

any comments or workarounds?
 
thanks,
 
bill milbratz
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Bill Milbratz
Title: RE: actionmapping set-property problem in 1.1 upgrade





>So, in this, Struts is looking at an instance of 
>"com.participate.util.client.struts.ApplicationActionMapping" for a 
>method called "setPublic(...)"


Right.  This class has had a setPublic(boolean) for a long time and it's worked correctly in struts 1.0.


Only when I updated to struts 1.1 today did the problem arise.


It looks like struts as of 1.1 does not use the classname attribute in the action element as it did in 1.0:


    
    type="com.participate.pe.profile.client.actions.PublicProfileInit"
    name="publicProfileForm" scope="request"
    className="com.participate.util.client.struts.ApplicationActionMapping">
  
    
    


[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:192)  at org.apache.commons.digester.Rule.begin(Rule.java:200) 


Thanks for the comments on the  Digester and ConvertUtils. I'll check them out.


bill



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

RE: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Joe Germuska
At 11:10 -0500 9/11/03, Bill Milbratz wrote:
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.
When, inside an  element, you have a , Struts uses that as an instruction to call 
a method on the ActionMapping class.



type="com.participate.pe.profile.client.actions.PublicProfileInit"
name="publicProfileForm" scope="request"
className="com.participate.util.client.struts.ApplicationActionMapping">

  



So, in this, Struts is looking at an instance of 
"com.participate.util.client.struts.ApplicationActionMapping" for a 
method called "setPublic(...)"

The type of the "public" property can be anything that ConvertUtils 
can convert from a String.  (See 
http://jakarta.apache.org/commons/beanutils/ to learn more about this 
very important library which was factored out of Struts and which 
provides a lot of the important behavior in Struts).

In this case, I'd expect property to be String, Boolean, or boolean.

I don't know the com.participate classes, so I have no idea if you're 
using it correctly, but this is what Struts is trying to do, and 
that's why Struts (actually Digester, another important Commons 
package) says java.lang.NoSuchMethodException: Bean has no property 
named public

I'm not sure why Nazeer suggested adding a "continue" property, 
unless he was accidentally looking at your  element instead 
of your  element.

Joe

--
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"If nature worked that way, the universe would crash all the time." 
	--Jaron Lanier

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


RE: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Bill Milbratz
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: 
     
    
 
type="com.participate.pe.profile.client.actions.PublicProfileInit" 
    name="publicProfileForm" scope="request" 
 
className="com.participate.util.client.struts.ApplicationActionMapping">


   


    
path="/profile/include/publicprofile.jsp" /> 
     


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]

RE: actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Syed, Nazeer
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: 
 


   

 
 

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 



actionmapping set-property problem in 1.1 upgrade

2003-09-11 Thread Bill Milbratz
Title: 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:
    
    
    type="com.participate.pe.profile.client.actions.PublicProfileInit"
    name="publicProfileForm" scope="request"
    className="com.participate.util.client.struts.ApplicationActionMapping">
  


    
    


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:192)  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]

RE: Probs migrating custom ActionMapping from 1.0.2 to 1.1

2003-08-25 Thread James Childers
Unfortunately that didn't work. I'm still getting the ClassCastException when trying 
to cast from ActionConfig to SecureActionMapping. 

Here's something very strange: If I do a log.debug(modCfg.getActionMappingClass()) 
guess what it returns?

pkg.SecureActionMapping

And yet it still bombs with a ClassCastException as soon as I try and cast it from 
ActionConfig to SecureActionMapping. Very, very strange.

-= J

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> 
> For 1.1, I believe you'd use:
> 
> 
>   
>   ...
> 
> 
> The "mapping" init-parameter is deprecated in 1.1. You could 
> also customize the
> actions on an individual basis with:
> 
> 
>   
>   ...
> 
> 
> Quoting James Childers <[EMAIL PROTECTED]>:
> 
> > Ladies and gents,
> > 
> > Having an issue with migrating our application over from 
> 1.0.2 to 1.1.
> > Specifically, we have a problem in the following line from our
> > ActionServlet:
> > 
> > ModuleConfig modCfg = RequestUtils.getModuleConfig(request,
> > getServletContext());
> > SecureActionMapping secAMapping = (SecureActionMapping)
> > modCfg.findActionConfig(path);
> > 
> > The second line gives a ClassCastException whenever a 
> request is made. The
> > hierarchy for SecureActionMapping is:
> > 
> > ActionConfig
> > +- ActionMapping
> > +- SecureActionConfig
> > +- PackagingActionMapping
> > +- SecureActionMapping
> > 
> > Further, the "mapping" init-param in web.xml points to this
> > SecureActionMapping class. The class type being returned by the
> > findActionConfig(String) method is ActionConfig, although 
> the servlet appears
> > to be configuring itself properly during the 
> initModuleConfig(String, String)
> > method of ActionServlet.
> > 
> > So my question is this: Is there a different mechanism for 
> specifying the
> > default ActionMapping class than doing so in web.xml?
> > 
> > Thanks in advance,
> > 
> > -= James
> 
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: Probs migrating custom ActionMapping from 1.0.2 to 1.1

2003-08-25 Thread Kris Schneider
For 1.1, I believe you'd use:


  
  ...


The "mapping" init-parameter is deprecated in 1.1. You could also customize the
actions on an individual basis with:


  
  ...


Quoting James Childers <[EMAIL PROTECTED]>:

> Ladies and gents,
> 
> Having an issue with migrating our application over from 1.0.2 to 1.1.
> Specifically, we have a problem in the following line from our
> ActionServlet:
> 
> ModuleConfig modCfg = RequestUtils.getModuleConfig(request,
> getServletContext());
> SecureActionMapping secAMapping = (SecureActionMapping)
> modCfg.findActionConfig(path);
> 
> The second line gives a ClassCastException whenever a request is made. The
> hierarchy for SecureActionMapping is:
> 
> ActionConfig
>   +- ActionMapping
>   +- SecureActionConfig
>   +- PackagingActionMapping
>   +- SecureActionMapping
> 
> Further, the "mapping" init-param in web.xml points to this
> SecureActionMapping class. The class type being returned by the
> findActionConfig(String) method is ActionConfig, although the servlet appears
> to be configuring itself properly during the initModuleConfig(String, String)
> method of ActionServlet.
> 
> So my question is this: Is there a different mechanism for specifying the
> default ActionMapping class than doing so in web.xml?
> 
> Thanks in advance,
> 
> -= James

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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



Probs migrating custom ActionMapping from 1.0.2 to 1.1

2003-08-25 Thread James Childers
Ladies and gents,

Having an issue with migrating our application over from 1.0.2 to 1.1. Specifically, 
we have a problem in the following line from our ActionServlet:

ModuleConfig modCfg = RequestUtils.getModuleConfig(request, getServletContext());
SecureActionMapping secAMapping = (SecureActionMapping) modCfg.findActionConfig(path);

The second line gives a ClassCastException whenever a request is made. The hierarchy 
for SecureActionMapping is:

ActionConfig
+- ActionMapping
+- SecureActionConfig
+- PackagingActionMapping
+- SecureActionMapping

Further, the "mapping" init-param in web.xml points to this SecureActionMapping class. 
The class type being returned by the findActionConfig(String) method is ActionConfig, 
although the servlet appears to be configuring itself properly during the 
initModuleConfig(String, String) method of ActionServlet.

So my question is this: Is there a different mechanism for specifying the default 
ActionMapping class than doing so in web.xml?

Thanks in advance,

-= James


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



Re: "attribute" and "name" attributes of ActionMapping

2003-08-19 Thread Emerson Cargnin
> If you use mapping.getName() all the time, you're stuck with storing the
> form bean only under the form bean's name.  That may or may not be a big
> deal to your current app, but I'd suggest using getAttribute() instead to
> protect yourself against future changes (such as, for example, having
> multiple actions that want to use the same form bean in session 
scope, but
> under different attribute names).

thanks craig, now I got it : ) the docs are not very clear regard to 
parameter use. The "Structs in Action" explain it as you did (just found 
it now:)).

Craig R. McClanahan wrote:
On Mon, 18 Aug 2003, Emerson Cargnin wrote:


Date: Mon, 18 Aug 2003 19:10:57 -0300
From: Emerson Cargnin <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: "attribute" and "name" attributes of ActionMapping
In the struts-example application, the LogonAction uses the "attribute"
attribute to read or delete the formBean
eg : session.removeAttribute(mapping.getAttribute());

If "attribute" is not used (just the name), is it possible to use the
same approache? is it a good technic?


If you look at the implementation of the getAttribute() method in
ActionForm, you'll see that it uses the form name if you don't explicitly
reference something else.  Therefore, using getAttribute() instead of
getName() gives you the *option* to store the form bean under an attribute
different than the form bean name, without having to worry about whether
or not a particular Action really uses this.
If you use mapping.getName() all the time, you're stuck with storing the
form bean only under the form bean's name.  That may or may not be a big
deal to your current app, but I'd suggest using getAttribute() instead to
protect yourself against future changes (such as, for example, having
multiple actions that want to use the same form bean in session scope, but
under different attribute names).
Craig

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



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: "attribute" and "name" attributes of ActionMapping

2003-08-18 Thread Craig R. McClanahan
On Mon, 18 Aug 2003, Emerson Cargnin wrote:

> Date: Mon, 18 Aug 2003 19:10:57 -0300
> From: Emerson Cargnin <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: "attribute" and "name" attributes of ActionMapping
>
> In the struts-example application, the LogonAction uses the "attribute"
> attribute to read or delete the formBean
>
> eg : session.removeAttribute(mapping.getAttribute());
>
> If "attribute" is not used (just the name), is it possible to use the
> same approache? is it a good technic?
>

If you look at the implementation of the getAttribute() method in
ActionForm, you'll see that it uses the form name if you don't explicitly
reference something else.  Therefore, using getAttribute() instead of
getName() gives you the *option* to store the form bean under an attribute
different than the form bean name, without having to worry about whether
or not a particular Action really uses this.

If you use mapping.getName() all the time, you're stuck with storing the
form bean only under the form bean's name.  That may or may not be a big
deal to your current app, but I'd suggest using getAttribute() instead to
protect yourself against future changes (such as, for example, having
multiple actions that want to use the same form bean in session scope, but
under different attribute names).

Craig


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



"attribute" and "name" attributes of ActionMapping

2003-08-18 Thread Emerson Cargnin
In the struts-example application, the LogonAction uses the "attribute" 
attribute to read or delete the formBean

eg : session.removeAttribute(mapping.getAttribute());

If "attribute" is not used (just the name), is it possible to use the 
same approache? is it a good technic?



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ActionMapping forward to another mapping

2003-08-14 Thread Shryock, Chad
Hello,

I have an action mapping:










I am having a problem when I forward to the "form" forward. The ActionClass
is not getting the ActionForm object that the /notamEntryLoad Action and
/notamWorkingList are sharing. Here is the ActionMapping for the
/notamEntryLoad








Any help would be greatly appreciated. Thanks in advance,
Chad Shryock.

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



Re: ActionMapping forward to another mapping

2003-08-14 Thread Mark Lowe
try



or scope the form to the session..



On Saturday, August 9, 2003, at 05:45 PM, Shryock, Chad wrote:

Hello,

I have an action mapping:


type="naimes.aisr.flightplan.action.NotamWorkingListAction" 
name="notamForm"
scope="request" validate="false">
	
	
	
	
	
	


I am having a problem when I forward to the "form" forward. The 
ActionClass
is not getting the ActionForm object that the /notamEntryLoad Action 
and
/notamWorkingList are sharing. Here is the ActionMapping for the
/notamEntryLoad


type="naimes.aisr.flightplan.action.NotamEntryLoadAction" 
validate="false">
	
	
	
	


Any help would be greatly appreciated. Thanks in advance,
Chad Shryock.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Dynamic ActionMapping params

2003-07-23 Thread Steve Caswell
The way I've solved this is to:

- get the configured ActionForward from mapping.findFoward("BLA")
- build a new path string using the path from the configured ActionForward and the 
dynamic querystring
- create a new instance of ActionForward
- populate it with the new path and the other properties from the configured 
ActionForward
- return this new ActionForward

May not be elegant, but it works for me.

-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 3:03 PM
To: [EMAIL PROTECTED]
Subject: Dynamic ActionMapping params


I have created several sites that use the "mapping.findForward("BLA") method to 
forward (or redirect) to a relative URL.  This has always been statically specified in 
my struts-config.xml like this:



then in code I do:

mapping.findForward("BLA");   //(simple stuff)



Now I have a need to forward to a URL that will have dynamic parameters like this:

/main_layout.jsp?param1=value¶m2=value$param3=value

Not sure how to pull this off.  Obviously I can't use a statically defined forward 
definition.  I guess I could put the params in the request, which works fine if I 
forward, but what if I redirect.  I would have to put them in the session.  Not clean 
coding in my opinion.  I would rather specify as querystring params.

Anyone done this?

I am using Struts v1.02



Jim Kennedy
IT Consultant
-



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



Re: Dynamic ActionMapping params

2003-07-23 Thread Michael Ruppin

--- Jim Kennedy <[EMAIL PROTECTED]> wrote:
> I have created several sites that use the
> "mapping.findForward("BLA") method to forward (or
> redirect) to a relative URL.  This has always been
> statically specified in my struts-config.xml like
> this:
> 
>  redirect="true"/>
> 
> then in code I do:
> 
> mapping.findForward("BLA");   //(simple stuff)
> 
> 
> 
> Now I have a need to forward to a URL that will have
> dynamic parameters like this:
> 
>
/main_layout.jsp?param1=value¶m2=value$param3=value
> 
> Not sure how to pull this off.  Obviously I can't
> use a statically defined forward definition.  I
> guess I could put the params in the request, which
> works fine if I forward, but what if I redirect.  I
> would have to put them in the session.  Not clean
> coding in my opinion.  I would rather specify as
> querystring params.

I'm doing that, with 1.1-rc1:

  ActionForward forwardfrommapping =
mapping.findForward("BLA");
  if (forwardfrommapping != null)
  {
  forward = new
ActionForward(forwardfrommapping.getPath() +
"?param1=" + param1.value(), true);
  }

Of course, beware that getPath() may give you more
than "/main_layout.jsp" when the struts-config changes
;)

m

> Anyone done this?
> 
> I am using Struts v1.02
> 
> 
> 
> Jim Kennedy
> IT Consultant
>
-
> 
> 
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Dynamic ActionMapping params

2003-07-23 Thread Jim Kennedy
I have created several sites that use the "mapping.findForward("BLA") method to 
forward (or redirect) to a relative URL.  This has always been statically specified in 
my struts-config.xml like this:



then in code I do:

mapping.findForward("BLA");   //(simple stuff)



Now I have a need to forward to a URL that will have dynamic parameters like this:

/main_layout.jsp?param1=value¶m2=value$param3=value

Not sure how to pull this off.  Obviously I can't use a statically defined forward 
definition.  I guess I could put the params in the request, which works fine if I 
forward, but what if I redirect.  I would have to put them in the session.  Not clean 
coding in my opinion.  I would rather specify as querystring params.

Anyone done this?

I am using Struts v1.02



Jim Kennedy
IT Consultant
-




RE: getting an ActionMapping class from within a custom tag

2003-07-21 Thread Alex Shneyderman


> -Original Message-
> From: p [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 10:46 AM
> To: [EMAIL PROTECTED]
> Subject: getting an ActionMapping class from within a custom tag
> 
> Hi,
> 
> What: I would like to find the roles associated with an ActionMapping
> from within a custom tag, but I only have the action name so I guess I
> need to get an instance of the ActionMapping class. How can I do this?
> How do I get an ActionMapping class, given the name of the action?

ModuleConfig mc = RequestUtils.getRequestModuleConfig (request);
ActionMapping am = (ActionMapping) mc.findActionConfig (actionName);

> Why: I want a generalized way to hide links to actions that the
> currently logged-in user doesn't have access to. So what I plan to do
> is subclass the html:link tag-- my subclass will check the current
> user's access to the action for the specified link, and either hide
it,
> or print only the link text.

You can do it easier with tiles I think.



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



getting an ActionMapping class from within a custom tag

2003-07-21 Thread p
Hi,

What: I would like to find the roles associated with an ActionMapping 
from within a custom tag, but I only have the action name so I guess I 
need to get an instance of the ActionMapping class. How can I do this? 
How do I get an ActionMapping class, given the name of the action?

Why: I want a generalized way to hide links to actions that the 
currently logged-in user doesn't have access to. So what I plan to do 
is subclass the html:link tag-- my subclass will check the current 
user's access to the action for the specified link, and either hide it, 
or print only the link text.

Thanks in advance.

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


Re: Is it possible to get the ActionMapping object in a filter ?

2003-07-18 Thread Erik Price


Navjot Singh wrote:
correct me if i am wrong

The filter servlet is hit before the request reaches the main servlet -
ActionServlet in struts case. As the request has not even reached
ActionServlet, ActionMapping object has not been initialized as of now.
You can always have the access code performed in the Filter, *after* the 
filter chain has been invoked.  However, it might be of no use for your 
use case by that time.

MyFilterActionServlet Mapping
   | |   |
   | |   |
   - doChain()   |   |
  | |--->-   |
  | |   | | instantiates |
  | |   | |->-
  | |   | | | |
  | |   | |
  | |getRoles   | |
  | |-->| |




Erik

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


RE: Is it possible to get the ActionMapping object in a filter ?

2003-07-18 Thread ashwani . kalra

Only if you load the servlet at startup ? Other wise on the first request
which may pose problem in filter .  Correct me if I am wrong





   
 
"Andrew Hill"  
 
<[EMAIL PROTECTED]To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>  
dnode.com>cc: (bcc: ashwani.kalra/Polaris) 
 
  Subject: RE: Is it possible to 
get the ActionMapping object in a  
07/18/2003 01:25 PM   filter ? 
 
Please respond to  
 
"Struts Users Mailing  
 
List"  
 
   
 
   
 





ActionMappings are initialised at startup surely and available from the
servlet context?

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Friday, 18 July 2003 15:47
To: Struts Users Mailing List
Subject: RE: Is it possible to get the ActionMapping object in a filter
?


correct me if i am wrong

The filter servlet is hit before the request reaches the main servlet -
ActionServlet in struts case. As the request has not even reached
ActionServlet, ActionMapping object has not been initialized as of now.

so, you CANNOT have Mapping object in filter

navjot

|-Original Message-
|From: Ajay Patil [mailto:[EMAIL PROTECTED]
|Sent: Friday, July 18, 2003 1:20 PM
|To: [EMAIL PROTECTED]
|Subject: Is it possible to get the ActionMapping object in a filter ?
|
|
|Hi,
|
|Is it possible to retrieve the Action mapping object in the Filter
|class ?
|
|To describe further, I am writing the filter (as per Servlet 2.3) to
|authenticate the Strut actions and was wondering if I could get
|the roles for the action triggered. I think Struts 1.1 allows for
|roles to be stored in the ActionMapping.
|
|Thanks in advance,
|Ajay
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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


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





This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: Is it possible to get the ActionMapping object in a filter ?

2003-07-18 Thread Andrew Hill
ActionMappings are initialised at startup surely and available from the
servlet context?

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Friday, 18 July 2003 15:47
To: Struts Users Mailing List
Subject: RE: Is it possible to get the ActionMapping object in a filter
?


correct me if i am wrong

The filter servlet is hit before the request reaches the main servlet -
ActionServlet in struts case. As the request has not even reached
ActionServlet, ActionMapping object has not been initialized as of now.

so, you CANNOT have Mapping object in filter

navjot

|-Original Message-
|From: Ajay Patil [mailto:[EMAIL PROTECTED]
|Sent: Friday, July 18, 2003 1:20 PM
|To: [EMAIL PROTECTED]
|Subject: Is it possible to get the ActionMapping object in a filter ?
|
|
|Hi,
|
|Is it possible to retrieve the Action mapping object in the Filter
|class ?
|
|To describe further, I am writing the filter (as per Servlet 2.3) to
|authenticate the Strut actions and was wondering if I could get
|the roles for the action triggered. I think Struts 1.1 allows for
|roles to be stored in the ActionMapping.
|
|Thanks in advance,
|Ajay
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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


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



RE: Is it possible to get the ActionMapping object in a filter ?

2003-07-18 Thread Navjot Singh
correct me if i am wrong

The filter servlet is hit before the request reaches the main servlet -
ActionServlet in struts case. As the request has not even reached
ActionServlet, ActionMapping object has not been initialized as of now.

so, you CANNOT have Mapping object in filter

navjot

|-Original Message-
|From: Ajay Patil [mailto:[EMAIL PROTECTED]
|Sent: Friday, July 18, 2003 1:20 PM
|To: [EMAIL PROTECTED]
|Subject: Is it possible to get the ActionMapping object in a filter ?
|
|
|Hi,
|
|Is it possible to retrieve the Action mapping object in the Filter
|class ?
|
|To describe further, I am writing the filter (as per Servlet 2.3) to
|authenticate the Strut actions and was wondering if I could get
|the roles for the action triggered. I think Struts 1.1 allows for
|roles to be stored in the ActionMapping.
|
|Thanks in advance,
|Ajay
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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



Is it possible to get the ActionMapping object in a filter ?

2003-07-18 Thread Ajay Patil
Hi,

Is it possible to retrieve the Action mapping object in the Filter
class ? 

To describe further, I am writing the filter (as per Servlet 2.3) to
authenticate the Strut actions and was wondering if I could get
the roles for the action triggered. I think Struts 1.1 allows for
roles to be stored in the ActionMapping.

Thanks in advance,
Ajay


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



RE: Any Possibility of Passing Parameters to a ActionMapping

2003-07-02 Thread Jimmy Emmanual
yes.

you can do it in the config file if it is just a static parameter or in the
Action Class.

1. 

2.
ActionForward forward = mapping.findForward("test");
StingBuffer path = new StringBuffer(forward.getPath();
path.append("?thistest=mytest");
return new ActionForward(path.toString());

Jimmy


-Original Message-
From: AshokD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 6:58 AM
To: Struts Users Mailing List
Subject: Any Possibility of Passing Parameters to a ActionMapping


Hi,

I have a question regarding ActionMapping and Forwards.

I have a url which is configured in struts-config.xml as forward.

>From my Action class I can simply forward to this url, but I need to pass a
parameter to this URL.

Is it possible ?

If yes how can we do this?


Thanks in Advance,
Ashok.D



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

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



Any Possibility of Passing Parameters to a ActionMapping

2003-07-02 Thread AshokD
Hi,

I have a question regarding ActionMapping and Forwards.

I have a url which is configured in struts-config.xml as forward.

>From my Action class I can simply forward to this url, but I need to pass a
parameter to this URL.

Is it possible ?

If yes how can we do this?


Thanks in Advance,
Ashok.D



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



RE: Subclassing ActionMapping

2003-06-09 Thread Jerry Jalenak
Like I said, it ought to be so obvious.

That was the whole problem.  Here I'm expecting Struts to pass in my
subclassed ActionMapping class (since I specified that on the className
parameter), never thinking that Struts would instead pass in the base class
and then I'd have to cast it over to my subclass.  Doh!  

Thanks!

Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


-Original Message-
From: José Ventura [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 1:24 PM
To: Struts Users Mailing List
Subject: Re: Subclassing ActionMapping


I'm just guessing here, but have you tried using the
first signature (using the "normal" ActionMapping) and
then casting it inside your action to "myActionMapping"?

HTH
- v

- Original Message -
From: "Jerry Jalenak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 09, 2003 3:18 PM
Subject: Subclassing ActionMapping


> This should be so stinkin' obvious that I ought to be seeing it, but after
> spending all morning trying to figure this out, I hope someone can shed
some
> light for me.  I've subclassed ActionMapping so I can include a couple of
>  tags in my Actions.  This seems to work OK as I can see the
> 'setters' being called when the web app initializes.  The question I have
is
> this - which class do I specify for my execute action?  Do I use the
> standard method signature of
>
> public ActionForward execute(ActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> or do I use my subclass?
>
> public ActionForward execute(myActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> I've tried both.  When I use the normal signature, I can't see my custom
> attributes.  If I specify my subclassed ActionMapping class
> (myActionMapping), nothing seems to work (i.e. can't forward to anything,
> action never actually gets invoked).  In my struts-config I specify my
> subclassed ActionMapping class using the className attribute on the

> tag.
>
> Arrgh.  This shouldn't be this tough, but I just can't see it.
>
>
> Jerry Jalenak
> Team Lead, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
>
> [EMAIL PROTECTED]
>
>
> This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at the following email address:
[EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



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



RE: Subclassing ActionMapping

2003-06-09 Thread Mike Jasnowski
When you extract the ActionMapping are you casting it to your new subclassed
actionMapping or the parent class?

MyExtension ext = (MyExtension)actionMapping;

Where MyExtension is the class named in the "className" attribute of your
config

HTH,
Mike

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 2:19 PM
To: '[EMAIL PROTECTED]'
Subject: Subclassing ActionMapping


This should be so stinkin' obvious that I ought to be seeing it, but after
spending all morning trying to figure this out, I hope someone can shed some
light for me.  I've subclassed ActionMapping so I can include a couple of
 tags in my Actions.  This seems to work OK as I can see the
'setters' being called when the web app initializes.  The question I have is
this - which class do I specify for my execute action?  Do I use the
standard method signature of

public ActionForward execute(ActionMapping am, ActionForm af,
HttpServletRequest req, HttpServletResponse res)

or do I use my subclass?

public ActionForward execute(myActionMapping am, ActionForm af,
HttpServletRequest req, HttpServletResponse res)

I've tried both.  When I use the normal signature, I can't see my custom
attributes.  If I specify my subclassed ActionMapping class
(myActionMapping), nothing seems to work (i.e. can't forward to anything,
action never actually gets invoked).  In my struts-config I specify my
subclassed ActionMapping class using the className attribute on the 
tag.

Arrgh.  This shouldn't be this tough, but I just can't see it.


Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at the following email address:
[EMAIL PROTECTED]



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



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



Re: Subclassing ActionMapping

2003-06-09 Thread José Ventura
I'm just guessing here, but have you tried using the
first signature (using the "normal" ActionMapping) and
then casting it inside your action to "myActionMapping"?

HTH
- v

- Original Message -
From: "Jerry Jalenak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 09, 2003 3:18 PM
Subject: Subclassing ActionMapping


> This should be so stinkin' obvious that I ought to be seeing it, but after
> spending all morning trying to figure this out, I hope someone can shed
some
> light for me.  I've subclassed ActionMapping so I can include a couple of
>  tags in my Actions.  This seems to work OK as I can see the
> 'setters' being called when the web app initializes.  The question I have
is
> this - which class do I specify for my execute action?  Do I use the
> standard method signature of
>
> public ActionForward execute(ActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> or do I use my subclass?
>
> public ActionForward execute(myActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> I've tried both.  When I use the normal signature, I can't see my custom
> attributes.  If I specify my subclassed ActionMapping class
> (myActionMapping), nothing seems to work (i.e. can't forward to anything,
> action never actually gets invoked).  In my struts-config I specify my
> subclassed ActionMapping class using the className attribute on the

> tag.
>
> Arrgh.  This shouldn't be this tough, but I just can't see it.
>
>
> Jerry Jalenak
> Team Lead, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
>
> [EMAIL PROTECTED]
>
>
> This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at the following email address:
[EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Subclassing ActionMapping

2003-06-09 Thread Jerry Jalenak
This should be so stinkin' obvious that I ought to be seeing it, but after
spending all morning trying to figure this out, I hope someone can shed some
light for me.  I've subclassed ActionMapping so I can include a couple of
 tags in my Actions.  This seems to work OK as I can see the
'setters' being called when the web app initializes.  The question I have is
this - which class do I specify for my execute action?  Do I use the
standard method signature of

public ActionForward execute(ActionMapping am, ActionForm af,
HttpServletRequest req, HttpServletResponse res)

or do I use my subclass?

public ActionForward execute(myActionMapping am, ActionForm af,
HttpServletRequest req, HttpServletResponse res)

I've tried both.  When I use the normal signature, I can't see my custom
attributes.  If I specify my subclassed ActionMapping class
(myActionMapping), nothing seems to work (i.e. can't forward to anything,
action never actually gets invoked).  In my struts-config I specify my
subclassed ActionMapping class using the className attribute on the 
tag.

Arrgh.  This shouldn't be this tough, but I just can't see it.


Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at the following email 
address: [EMAIL PROTECTED]



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



Re: ActionMapping

2003-06-02 Thread Puneet Agarwal

You can write your own ActionMapping Class, which should extend the struts
provided ActionMapping  class.

In struts-config.xml file

in the tag  we can specify type
="com.xx.x...YpurActionMapping"

for indivudual action we can specify this in the individual  tag
as


Hope this helps..!


Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031)
FAX              : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ... Action &
BC4J...!!!


   

Tridev Kodamasingh 

<[EMAIL PROTECTED]To: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>
ramer.com>   cc:   

 Subject: ActionMapping

06/02/03 02:46 PM  

Please respond to  

"Struts Users Mailing  

List"  

   

   





hi,

In Struts :-
Is it possible to define own set of propertys' for a ActionMapping ?

Suppose,  i want to define following two entries  in struts_config.xml
validator = "com.MyValidator"
rule   = "myrule"

And want to access them in execute() method of  my action class .

Can somebody give some idea how to go about it ?

Regards

Tridev

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





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



ActionMapping

2003-06-02 Thread Tridev Kodamasingh
hi,

In Struts :-
Is it possible to define own set of propertys' for a ActionMapping ?

Suppose,  i want to define following two entries  in struts_config.xml
validator = "com.MyValidator"
rule   = "myrule"   

And want to access them in execute() method of  my action class .

Can somebody give some idea how to go about it ? 

Regards

Tridev

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



Re: Submitting form to an ActionMapping with no formbean?

2003-03-13 Thread Kevin Williams
I had this same problem...it was because I had accidentally included
some additional information in my action mapping for that action in my
struts-config.xml file.  I've successfully done what you're talking
about if I keep it at just:





On Thu, 2003-03-13 at 17:22, [EMAIL PROTECTED] wrote:
> 
> 
> 
> 
> Hello all, I have a quick question...  if I have an ActionMapping defined,
> which uses type org.apache.struts.actions.ForwardAction, and I want
> to invoke this Action via a form submit button, what is the best way
> to accomplish this?
> 
> If I don't specify a formbean in the ActionMapping definition,
> I get an error "Cannot retrieve definition for form bean null'" but
> in this case, the Action doesn't need any form information.
> 
> For now, I worked around this by creating a class NullForm that
> extends ActionForm, and creating a formbean "dummy" using
> this class, and then naming it in my ActionMapping definition.
> I was wondering if there was a better way to do this?
> 
> Thanks,
> 
> 
> Phillip Rhodes
> Application Designer
> Voice Data Solutions
> 919-571-4300 x225
> [EMAIL PROTECTED]
> 
> Those who are willing to sacrifice essential liberties for a little order,
> will
> lose both and deserve neither. - Benjamin Franklin
> 
> This country, with its institutions, belongs to the people who inhabit it.
> 
> Whenever they shall grow weary of the existing government, they can
> exercise
> their constitutional right of amending it, or exercise their revolutionary
> right to overthrow it.  - Abraham Lincoln
> 
> No citizen shall be denied the right to bear arms, if as a last resort, to
> protect themselves from tyranny in Government. - Thomas Jefferson
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



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



Submitting form to an ActionMapping with no formbean?

2003-03-13 Thread prhodes




Hello all, I have a quick question...  if I have an ActionMapping defined,
which uses type org.apache.struts.actions.ForwardAction, and I want
to invoke this Action via a form submit button, what is the best way
to accomplish this?

If I don't specify a formbean in the ActionMapping definition,
I get an error "Cannot retrieve definition for form bean null'" but
in this case, the Action doesn't need any form information.

For now, I worked around this by creating a class NullForm that
extends ActionForm, and creating a formbean "dummy" using
this class, and then naming it in my ActionMapping definition.
I was wondering if there was a better way to do this?

Thanks,


Phillip Rhodes
Application Designer
Voice Data Solutions
919-571-4300 x225
[EMAIL PROTECTED]

Those who are willing to sacrifice essential liberties for a little order,
will
lose both and deserve neither. - Benjamin Franklin

This country, with its institutions, belongs to the people who inhabit it.

Whenever they shall grow weary of the existing government, they can
exercise
their constitutional right of amending it, or exercise their revolutionary
right to overthrow it.  - Abraham Lincoln

No citizen shall be denied the right to bear arms, if as a last resort, to
protect themselves from tyranny in Government. - Thomas Jefferson


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



the ActionMapping input property can optionally be the name of an ActionForward instead. but ERROR

2003-02-25 Thread Ferran Parra
Hi all,
I configure this in the struts-config.xml :


but this error is returned when application redirect to ActionMapping input
property with the name of Global ActionForward:
The requested resource (/ibercamera/adminPreCreateUser) is not available.

any idea?? thanks in advanced.


Ferran Parra [EMAIL PROTECTED]
Departament de Noves Tecnologies
MUBIMEDIA S.L.
Mallorca, 275, 1r 2a 08008
BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21


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



RE: ActionMapping enhancement?

2003-02-24 Thread Brandon Goodin
Also, if someone is accessing an action mapping from outside the website the
solution Jerome provided will set the default values even without the
querystring.  only works if you are accessing the url from within
the website and can access the forward param ensuring that the querystring
will exist. I like having a way of providing the default values when the url
is accessed from any avenue.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 11:25 AM
To: Struts Users Mailing List
Subject: RE: ActionMapping enhancement?


Good point :-D. I haven't used that feature. So, it wansn't on the forefront
of my mind.

However, there are some legitimate times to provide non-form based runtime
info to the action class. The technique expressed by Jerome is great. Also,
Jerome's technique is good for those who do not use jsp tags.

Jerome's Technique:
http://shorl.com/dutydapedroho

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: ActionMapping enhancement?


>Default parameters that are contained in a url querystring get difficult to
>handle. It is nice to be able to change them in one place when needed. This
>avoids having to pillage through every page that may contain a reference to
>a partical url/querystring combo and adjust the parameters rather that just
>one.

Couldn't you define a forward in struts-config that contained your default
query string parameters?  Then you could change it in one place by using the
 tag to lookup the forward.

David


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus


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



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



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



RE: ActionMapping enhancement?

2003-02-24 Thread Brandon Goodin
Good point :-D. I haven't used that feature. So, it wansn't on the forefront
of my mind.

However, there are some legitimate times to provide non-form based runtime
info to the action class. The technique expressed by Jerome is great. Also,
Jerome's technique is good for those who do not use jsp tags.

Jerome's Technique:
http://shorl.com/dutydapedroho

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: ActionMapping enhancement?


>Default parameters that are contained in a url querystring get difficult to
>handle. It is nice to be able to change them in one place when needed. This
>avoids having to pillage through every page that may contain a reference to
>a partical url/querystring combo and adjust the parameters rather that just
>one.

Couldn't you define a forward in struts-config that contained your default
query string parameters?  Then you could change it in one place by using the
 tag to lookup the forward.

David


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus


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



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



RE: ActionMapping enhancement?

2003-02-24 Thread Brandon Goodin
interesting.



I wasn't aware that property(xxx) notation could be used to populate and
retrieve map values within the struts-config.xml.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:53 AM
To: Struts Users Mailing List
Subject: RE: ActionMapping enhancement?


Hi Brandon,

I just posted something on a different topic that may solve your problem.
Basically it is like your Solution #2, except it doesn't use a "comma
delimited value" getter/setter.  Not sure why you need that.  Anyway, here's
the posting URL.

http://shorl.com/dutydapedroho

-Jerome

> -Original Message-
> From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 12:35 PM
> To: Struts User List
> Subject: ActionMapping enhancement?
>
>
> Do any of you face this issue? and how do you deal with it?
>
> SCENARIO:
> I have a set of classes that handle event calendars.
>
> The same classes can be used within one site to maintain multiple event
> calendars.
>
> The event calendar contains multiple categories.
>
> I want to utilize the event calendar from various urls to display specific
> event calendars:
>
> /do/ec/city - shows event calendar for city events
> /do/ec/elksclub - shows event calendar for elks club
> etc...
>
> But I want to provide default parameters to each of the mappings
> so that the
> event calendar action knows which event calendar to display without having
> to pass it in through a query parameter.
>
> In other words I want to handle the default parameters in the
> struts-config.xml.
>
> The only solutions both include extending the ActionMapping class
> and using
> the set-property in the action-mapping of the struts-config.xml:
>
> SOLUTIONS
>
> 1) Create a new module (Event Calendar module). Provide a custom extended
> ActionMapping to handle properties that may be passed in for the classes
> used under the module.
>
> 2) Extend the ActionMapping class and provide a setter/getter
> that receives
> a comma delimited value ([0],[1];0=key 1=value) and stores it
> into a HashMap
> in the extended ActionMapping class. I could then provide an
> accessor method
> to retrieve a particular property in the hashmap (i.e. getValue(String
> key)). I could then retrieve the value from the action mapping reference
> within my action class to initialize default values based on the
> mapping of
> the url.
>
> Thoughts? Corrections?
>
> REASONS:
> Default parameters that are contained in a url querystring get
> difficult to
> handle. It is nice to be able to change them in one place when
> needed. This
> avoids having to pillage through every page that may contain a
> reference to
> a partical url/querystring combo and adjust the parameters rather
> that just
> one.
> Also, if the action mapping could contain a hashmap of properties... one
> could provide runtime configuration info to an Action class in order to
> affect it's behavior a certain way. This promotes reusability of code.
>
> Brandon Goodin
> Phase Web and Multimedia
> PO Box 85
> Whitefish MT 59937
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


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



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



RE: ActionMapping enhancement?

2003-02-24 Thread Brandon Goodin
Great.

Question:
I don't want to write an action-mapping class that has properties for my
event calendar action classes being used for my content management action
classes. That is the problem that I see. One ActionMapping class for all
your actions in the struts-config.xml. I like the idea of the hashmap so
that I can access dynamic/configurable properties from a common place in all
my action classes. But, at the same time I don't fill up my action mapping
class with a bunch of unneccessary getter/setters that don't apply to all my
action classes.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:51 AM
To: Struts Users Mailing List
Subject: RE: ActionMapping enhancement?


Brandon,

I have a similar situation and I ended up extending ActionMapping
and using the set-property in the action-mapping in the struts-config file.


robert

> -Original Message-
> From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 12:35 PM
> To: Struts User List
> Subject: ActionMapping enhancement?
>
>
> Do any of you face this issue? and how do you deal with it?
>
> SCENARIO:
> I have a set of classes that handle event calendars.
>
> The same classes can be used within one site to maintain multiple event
> calendars.
>
> The event calendar contains multiple categories.
>
> I want to utilize the event calendar from various urls to display specific
> event calendars:
>
> /do/ec/city - shows event calendar for city events
> /do/ec/elksclub - shows event calendar for elks club
> etc...
>
> But I want to provide default parameters to each of the mappings
> so that the
> event calendar action knows which event calendar to display without having
> to pass it in through a query parameter.
>
> In other words I want to handle the default parameters in the
> struts-config.xml.
>
> The only solutions both include extending the ActionMapping class
> and using
> the set-property in the action-mapping of the struts-config.xml:
>
> SOLUTIONS
>
> 1) Create a new module (Event Calendar module). Provide a custom extended
> ActionMapping to handle properties that may be passed in for the classes
> used under the module.
>
> 2) Extend the ActionMapping class and provide a setter/getter
> that receives
> a comma delimited value ([0],[1];0=key 1=value) and stores it
> into a HashMap
> in the extended ActionMapping class. I could then provide an
> accessor method
> to retrieve a particular property in the hashmap (i.e. getValue(String
> key)). I could then retrieve the value from the action mapping reference
> within my action class to initialize default values based on the
> mapping of
> the url.
>
> Thoughts? Corrections?
>
> REASONS:
> Default parameters that are contained in a url querystring get
> difficult to
> handle. It is nice to be able to change them in one place when
> needed. This
> avoids having to pillage through every page that may contain a
> reference to
> a partical url/querystring combo and adjust the parameters rather
> that just
> one.
> Also, if the action mapping could contain a hashmap of properties... one
> could provide runtime configuration info to an Action class in order to
> affect it's behavior a certain way. This promotes reusability of code.
>
> Brandon Goodin
> Phase Web and Multimedia
> PO Box 85
> Whitefish MT 59937
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



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



Re: ActionMapping enhancement?

2003-02-24 Thread David Graham
Default parameters that are contained in a url querystring get difficult to
handle. It is nice to be able to change them in one place when needed. This
avoids having to pillage through every page that may contain a reference to
a partical url/querystring combo and adjust the parameters rather that just
one.
Couldn't you define a forward in struts-config that contained your default 
query string parameters?  Then you could change it in one place by using the 
 tag to lookup the forward.

David

_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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


RE: ActionMapping enhancement?

2003-02-24 Thread Jerome Jacobsen
Hi Brandon,

I just posted something on a different topic that may solve your problem.
Basically it is like your Solution #2, except it doesn't use a "comma
delimited value" getter/setter.  Not sure why you need that.  Anyway, here's
the posting URL.

http://shorl.com/dutydapedroho

-Jerome

> -Original Message-
> From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 12:35 PM
> To: Struts User List
> Subject: ActionMapping enhancement?
>
>
> Do any of you face this issue? and how do you deal with it?
>
> SCENARIO:
> I have a set of classes that handle event calendars.
>
> The same classes can be used within one site to maintain multiple event
> calendars.
>
> The event calendar contains multiple categories.
>
> I want to utilize the event calendar from various urls to display specific
> event calendars:
>
> /do/ec/city - shows event calendar for city events
> /do/ec/elksclub - shows event calendar for elks club
> etc...
>
> But I want to provide default parameters to each of the mappings
> so that the
> event calendar action knows which event calendar to display without having
> to pass it in through a query parameter.
>
> In other words I want to handle the default parameters in the
> struts-config.xml.
>
> The only solutions both include extending the ActionMapping class
> and using
> the set-property in the action-mapping of the struts-config.xml:
>
> SOLUTIONS
>
> 1) Create a new module (Event Calendar module). Provide a custom extended
> ActionMapping to handle properties that may be passed in for the classes
> used under the module.
>
> 2) Extend the ActionMapping class and provide a setter/getter
> that receives
> a comma delimited value ([0],[1];0=key 1=value) and stores it
> into a HashMap
> in the extended ActionMapping class. I could then provide an
> accessor method
> to retrieve a particular property in the hashmap (i.e. getValue(String
> key)). I could then retrieve the value from the action mapping reference
> within my action class to initialize default values based on the
> mapping of
> the url.
>
> Thoughts? Corrections?
>
> REASONS:
> Default parameters that are contained in a url querystring get
> difficult to
> handle. It is nice to be able to change them in one place when
> needed. This
> avoids having to pillage through every page that may contain a
> reference to
> a partical url/querystring combo and adjust the parameters rather
> that just
> one.
> Also, if the action mapping could contain a hashmap of properties... one
> could provide runtime configuration info to an Action class in order to
> affect it's behavior a certain way. This promotes reusability of code.
>
> Brandon Goodin
> Phase Web and Multimedia
> PO Box 85
> Whitefish MT 59937
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


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



RE: ActionMapping enhancement?

2003-02-24 Thread Robert Taylor
Brandon,

I have a similar situation and I ended up extending ActionMapping
and using the set-property in the action-mapping in the struts-config file.


robert

> -Original Message-
> From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 12:35 PM
> To: Struts User List
> Subject: ActionMapping enhancement?
>
>
> Do any of you face this issue? and how do you deal with it?
>
> SCENARIO:
> I have a set of classes that handle event calendars.
>
> The same classes can be used within one site to maintain multiple event
> calendars.
>
> The event calendar contains multiple categories.
>
> I want to utilize the event calendar from various urls to display specific
> event calendars:
>
> /do/ec/city - shows event calendar for city events
> /do/ec/elksclub - shows event calendar for elks club
> etc...
>
> But I want to provide default parameters to each of the mappings
> so that the
> event calendar action knows which event calendar to display without having
> to pass it in through a query parameter.
>
> In other words I want to handle the default parameters in the
> struts-config.xml.
>
> The only solutions both include extending the ActionMapping class
> and using
> the set-property in the action-mapping of the struts-config.xml:
>
> SOLUTIONS
>
> 1) Create a new module (Event Calendar module). Provide a custom extended
> ActionMapping to handle properties that may be passed in for the classes
> used under the module.
>
> 2) Extend the ActionMapping class and provide a setter/getter
> that receives
> a comma delimited value ([0],[1];0=key 1=value) and stores it
> into a HashMap
> in the extended ActionMapping class. I could then provide an
> accessor method
> to retrieve a particular property in the hashmap (i.e. getValue(String
> key)). I could then retrieve the value from the action mapping reference
> within my action class to initialize default values based on the
> mapping of
> the url.
>
> Thoughts? Corrections?
>
> REASONS:
> Default parameters that are contained in a url querystring get
> difficult to
> handle. It is nice to be able to change them in one place when
> needed. This
> avoids having to pillage through every page that may contain a
> reference to
> a partical url/querystring combo and adjust the parameters rather
> that just
> one.
> Also, if the action mapping could contain a hashmap of properties... one
> could provide runtime configuration info to an Action class in order to
> affect it's behavior a certain way. This promotes reusability of code.
>
> Brandon Goodin
> Phase Web and Multimedia
> PO Box 85
> Whitefish MT 59937
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



ActionMapping enhancement?

2003-02-24 Thread Brandon Goodin
Do any of you face this issue? and how do you deal with it?

SCENARIO:
I have a set of classes that handle event calendars.

The same classes can be used within one site to maintain multiple event
calendars.

The event calendar contains multiple categories.

I want to utilize the event calendar from various urls to display specific
event calendars:

/do/ec/city - shows event calendar for city events
/do/ec/elksclub - shows event calendar for elks club
etc...

But I want to provide default parameters to each of the mappings so that the
event calendar action knows which event calendar to display without having
to pass it in through a query parameter.

In other words I want to handle the default parameters in the
struts-config.xml.

The only solutions both include extending the ActionMapping class and using
the set-property in the action-mapping of the struts-config.xml:

SOLUTIONS

1) Create a new module (Event Calendar module). Provide a custom extended
ActionMapping to handle properties that may be passed in for the classes
used under the module.

2) Extend the ActionMapping class and provide a setter/getter that receives
a comma delimited value ([0],[1];0=key 1=value) and stores it into a HashMap
in the extended ActionMapping class. I could then provide an accessor method
to retrieve a particular property in the hashmap (i.e. getValue(String
key)). I could then retrieve the value from the action mapping reference
within my action class to initialize default values based on the mapping of
the url.

Thoughts? Corrections?

REASONS:
Default parameters that are contained in a url querystring get difficult to
handle. It is nice to be able to change them in one place when needed. This
avoids having to pillage through every page that may contain a reference to
a partical url/querystring combo and adjust the parameters rather that just
one.
Also, if the action mapping could contain a hashmap of properties... one
could provide runtime configuration info to an Action class in order to
affect it's behavior a certain way. This promotes reusability of code.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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



AW: error in the attribute input of actionmapping when accesing a globalforward

2003-02-21 Thread Hirschmann, Bernhard

Hey Ferran,

I think the problem is the path you're using:
/do/admin/AdminPreCreateUserentity=rol&action=find&reference=rol

The syntax is not correct. I can't see where the URI ends and the arrtibutes
start, but a correct syntax would be:
/admin/ActionName.do?attribute1=value&attribute2=anothervalue

So you at least miss the "?" 

Bernhard

-Ursprüngliche Nachricht-
Von: Ferran Parra [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Februar 2003 16:49
An: Struts Users Mailing List
Betreff: error in the attribute input of actionmapping when accesing a
globalforward


Hi all,
I have the globalforward in the property input of the one action in
action-mapping, i configure this in the controller in the struts-config.xml
file in the struts1.1b3 

in the struts-config.xml i have:
  

and in one actionmapping in the input attribute i refer a global forward:


...
 
...
  

  
...




...
  

then the error ocurr when i have redirect to input attribute of
AdminCreateUser actionmapping. the tomcat says:

type Status report
message /adminCreateUser
description The requested resource (/adminCreateUser) is not available.

any idea??? thanks
Ferran Parra

Departament de Noves Tecnologies
MUBIMEDIA S.L.
--
[EMAIL PROTECTED]
Mallorca, 275, 1r 2a
08008 BARCELONA
T. (+34) 93 215 21 91
F. (+34) 93 215 41 21


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




Re: error in the attribute input of actionmapping when accesing a globalforward

2003-02-21 Thread Ferran Parra
- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 4:55 PM
Subject: RE: error in the attribute input of actionmapping when accesing a
globalforward


> Is this part correct?
> > path="/do/admin/AdminPreCreateUserentity=rol&...
>^^^
>
> Perhaps you forgot the '?'

No, is in my struts-config.xml, is a error while write a message:

..path="/do/admin/AdminPreCreateUser?entity=rol&...



>
>
>
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org/
>
> "The man who does not read good books has no advantage over the man who
> cannot read them."
> - Mark Twain (1835-1910)
>
>
>
> > -Original Message-
> > From: Ferran Parra [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 21, 2003 10:49 AM
> > To: Struts Users Mailing List
> > Subject: error in the attribute input of actionmapping when
> > accesing a globalforward
> >
> >
> > Hi all,
> > I have the globalforward in the property input of the one
> > action in action-mapping, i configure this in the controller
> > in the struts-config.xml file in the struts1.1b3
> >
> > in the struts-config.xml i have:
> >>  inputForward="true"
> >  nocache="true"
> >  locale="true"/>
> >
> > and in one actionmapping in the input attribute i refer a
> > global forward:
> >
> > 
> > ...
> >   > path="/do/admin/AdminPreCreateUserentity=rol&action=find&a
> > mp;reference=rol" />
> > ...
> >   
> >
> >   
> > ...
> > 
> >  >  type="com.mubimedia.project.struts.action.AdminAction"
> >  input="adminCreateUser"
> >  name="userForm"
> >  scope="request"
> >  validate="true"
> >  >
> > 
> > 
> > ...
> >   
> >
> > then the error ocurr when i have redirect to input attribute
> > of AdminCreateUser actionmapping. the tomcat says:
> >
> > type Status report
> > message /adminCreateUser
> > description The requested resource (/adminCreateUser) is not
> > available.
> >
> > any idea??? thanks
> > Ferran Parra
> >
> > Departament de Noves Tecnologies
> > MUBIMEDIA S.L.
> > --
> > [EMAIL PROTECTED]
> > Mallorca, 275, 1r 2a
> > 08008 BARCELONA
> > T. (+34) 93 215 21 91
> > F. (+34) 93 215 41 21
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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




RE: error in the attribute input of actionmapping when accesing a globalforward

2003-02-21 Thread James Mitchell
Is this part correct?
> path="/do/admin/AdminPreCreateUserentity=rol&...
   ^^^

Perhaps you forgot the '?'



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)



> -Original Message-
> From: Ferran Parra [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, February 21, 2003 10:49 AM
> To: Struts Users Mailing List
> Subject: error in the attribute input of actionmapping when 
> accesing a globalforward
> 
> 
> Hi all,
> I have the globalforward in the property input of the one 
> action in action-mapping, i configure this in the controller 
> in the struts-config.xml file in the struts1.1b3 
> 
> in the struts-config.xml i have:
> inputForward="true"
>  nocache="true"
>  locale="true"/>
> 
> and in one actionmapping in the input attribute i refer a 
> global forward:
> 
> 
> ...
>   path="/do/admin/AdminPreCreateUserentity=rol&action=find&a
> mp;reference=rol" />
> ...
>   
> 
>   
> ...
> 
>   type="com.mubimedia.project.struts.action.AdminAction"
>  input="adminCreateUser"
>  name="userForm"
>  scope="request"
>  validate="true"
>  >
> 
> 
> ...
>   
> 
> then the error ocurr when i have redirect to input attribute 
> of AdminCreateUser actionmapping. the tomcat says:
> 
> type Status report
> message /adminCreateUser
> description The requested resource (/adminCreateUser) is not 
> available.
> 
> any idea??? thanks
> Ferran Parra
> 
> Departament de Noves Tecnologies
> MUBIMEDIA S.L.
> --
> [EMAIL PROTECTED]
> Mallorca, 275, 1r 2a
> 08008 BARCELONA
> T. (+34) 93 215 21 91
> F. (+34) 93 215 41 21
> 
> 


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




error in the attribute input of actionmapping when accesing a globalforward

2003-02-21 Thread Ferran Parra
Hi all,
I have the globalforward in the property input of the one action in action-mapping, i 
configure this in the controller in the struts-config.xml file in the struts1.1b3 

in the struts-config.xml i have:
  

and in one actionmapping in the input attribute i refer a global forward:


...
 
...
  

  
...




...
  

then the error ocurr when i have redirect to input attribute of AdminCreateUser 
actionmapping. the tomcat says:

type Status report
message /adminCreateUser
description The requested resource (/adminCreateUser) is not available.

any idea??? thanks
Ferran Parra

Departament de Noves Tecnologies
MUBIMEDIA S.L.
--
[EMAIL PROTECTED]
Mallorca, 275, 1r 2a
08008 BARCELONA
T. (+34) 93 215 21 91
F. (+34) 93 215 41 21




Re: Accessing ActionMapping in JSP

2003-02-05 Thread Kris Schneider
Have you tried the  tag (was also available in 1.0.2)?

http://jakarta.apache.org/struts/userGuide/struts-bean.html#struts

P.S.

new String("** hacMapping Null** ") is *EVIL*! A simple String literal will do.

Quoting Mark Ahnell <[EMAIL PROTECTED]>:

> I have recently migrated from 1.0 to 1.1 and have been having a problem
> with
> accessing the ActionMapping in my JSP.  I have a custom ActionMapping,
> HACActionMapping, which I have added several getters and mutators.
> 
> With version 1.0, I used this code in my JSP:
> 
> <%
>   ActionMappings actionMappings =
> (ActionMappings)application.getAttribute(Action.MAPPINGS_KEY);
> 
>   HACActionMapping hacMapping =
> (HACActionMapping)actionMappings.findMapping("/tmsLogin"); // Path hard
> coded for example
>   if (hacMapping == null) {
> %>  <%=(new String("** hacMapping Null** "))%> <%
>   } else {
> %>  <%=hacMapping.isLoginRequired()%> <%
>   }
> 
> %>
> 
> This works, when there is only one struts-config.xml.  In Struts 1.1,
> ActionMappings has been deprecated, and I don't know how to code this for
> 1.1.
> 
> I am also using the new module functionality for my application.  When a
> user logs in, they are switched to another module using a SwitchAction. 
> So,
> there are three struts-config files for my app.  After I log in, I am now
> in
> a new module with a new struts-config-pp.xml.  If I use the old
> ActionMappings way, I only have access to the mappings that are in my
> default sturts-config.xml.  This was confirmed, when I placed this piece of
> code in my JSP
> 
> <%
>   String[] allMappings = actionMappings.findMappings();
>   out.println("*X*\n");
>   for (int j=0; j < allMappings.length; j++)
> out.println(allMappings[j]+"\n");
>   out.println("*X*\n");
> %>
> 
> When this ran, it only produced a list of actions in my default
> struts-config.xml.  Does someone know how I would code this using modules,
> in 1.1?  I have converted all items that needed to be converted for 1.1,
> i.e., created new config/moduleName entires in my web.xml, and removed the
> "mapping" parameter in web.xml and replaced it with an entry in
>  
> - Mark Ahnell
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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




RE: Accessing ActionMapping in JSP

2003-02-05 Thread Mark Ahnell
This one might have gotten buried in the morning download of email, has
anyone looked at this problem?  Thanks.  :)

- Mark

-Original Message-
From: Mark Ahnell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 12:52 AM
To: [EMAIL PROTECTED]
Subject: Accessing ActionMapping in JSP


I have recently migrated from 1.0 to 1.1 and have been having a problem with
accessing the ActionMapping in my JSP.  I have a custom ActionMapping,
HACActionMapping, which I have added several getters and mutators.

With version 1.0, I used this code in my JSP:

<%
  ActionMappings actionMappings =
(ActionMappings)application.getAttribute(Action.MAPPINGS_KEY);

  HACActionMapping hacMapping =
(HACActionMapping)actionMappings.findMapping("/tmsLogin"); // Path hard
coded for example
  if (hacMapping == null) {
%>  <%=(new String("** hacMapping Null** "))%> <%
  } else {
%>  <%=hacMapping.isLoginRequired()%> <%
  }

%>

This works, when there is only one struts-config.xml.  In Struts 1.1,
ActionMappings has been deprecated, and I don't know how to code this for
1.1.

I am also using the new module functionality for my application.  When a
user logs in, they are switched to another module using a SwitchAction.  So,
there are three struts-config files for my app.  After I log in, I am now in
a new module with a new struts-config-pp.xml.  If I use the old
ActionMappings way, I only have access to the mappings that are in my
default sturts-config.xml.  This was confirmed, when I placed this piece of
code in my JSP

<%
  String[] allMappings = actionMappings.findMappings();
  out.println("*X*\n");
  for (int j=0; j < allMappings.length; j++)
out.println(allMappings[j]+"\n");
  out.println("*X*\n");
%>

When this ran, it only produced a list of actions in my default
struts-config.xml.  Does someone know how I would code this using modules,
in 1.1?  I have converted all items that needed to be converted for 1.1,
i.e., created new config/moduleName entires in my web.xml, and removed the
"mapping" parameter in web.xml and replaced it with an entry in



Accessing ActionMapping in JSP

2003-02-04 Thread Mark Ahnell
I have recently migrated from 1.0 to 1.1 and have been having a problem with
accessing the ActionMapping in my JSP.  I have a custom ActionMapping,
HACActionMapping, which I have added several getters and mutators.

With version 1.0, I used this code in my JSP:

<%
  ActionMappings actionMappings =
(ActionMappings)application.getAttribute(Action.MAPPINGS_KEY);

  HACActionMapping hacMapping =
(HACActionMapping)actionMappings.findMapping("/tmsLogin"); // Path hard
coded for example
  if (hacMapping == null) {
%>  <%=(new String("** hacMapping Null** "))%> <%
  } else {
%>  <%=hacMapping.isLoginRequired()%> <%
  }

%>

This works, when there is only one struts-config.xml.  In Struts 1.1,
ActionMappings has been deprecated, and I don't know how to code this for
1.1.

I am also using the new module functionality for my application.  When a
user logs in, they are switched to another module using a SwitchAction.  So,
there are three struts-config files for my app.  After I log in, I am now in
a new module with a new struts-config-pp.xml.  If I use the old
ActionMappings way, I only have access to the mappings that are in my
default sturts-config.xml.  This was confirmed, when I placed this piece of
code in my JSP

<%
  String[] allMappings = actionMappings.findMappings();
  out.println("*X*\n");
  for (int j=0; j < allMappings.length; j++)
out.println(allMappings[j]+"\n");
  out.println("*X*\n");
%>

When this ran, it only produced a list of actions in my default
struts-config.xml.  Does someone know how I would code this using modules,
in 1.1?  I have converted all items that needed to be converted for 1.1,
i.e., created new config/moduleName entires in my web.xml, and removed the
"mapping" parameter in web.xml and replaced it with an entry in



Re: ActionMapping/ActionConfig cast in RequestProcessor.java

2003-01-24 Thread Craig R. McClanahan


On Fri, 24 Jan 2003, Bueno Carlos  M wrote:

> Date: Fri, 24 Jan 2003 16:18:49 -0500
> From: Bueno Carlos  M <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: ActionMapping/ActionConfig cast in RequestProcessor.java
>
> Howdy --
> I have what is I guess a noob question, but I simply can't figure out these
> seemingly important lines of code in RequestProcessor.java:
>
>
> 646ActionMapping mapping = (ActionMapping)
> 647moduleConfig.findActionConfig(path);
>
>
> This appears on lines 646-7 in both 1.02 and 1.1. ActionMapping is a
> *subclass* of ActionConfig, so how does this execute without throwing a
> ClassCastException? I can cast an ActionMapping as an ActionConfig but not
> the other way around. Yet, somehow, RequestProcessor seems to be doing just
> that. Below is some sample code to illustrate my question. Can anyone shed
> some light on this? It's too much majic for me.
>

It really is magic ... more so than I normally like to employ, but it was
necessary for backwards compatibility.

In Struts 1.0, the name of the JavaBean that stored stuff from an
 element was ActionMapping -- and, this method was passed as an
argument to every Action in the world.

In Struts 1.1, we migrated the configuration objects to a new package
(org.apache.struts.config), and gave them all names consistent with the
element name that they represented (ActionConfig in this case).  However,
it wasn't a good idea to break everyone's existing Actions by changing the
calling sequence, so ActionMapping is now a subclass of ActionConfig.

The secret to making this work is that the objects stored (in
ModuleConfig) for this collection really are ActionMappings and not just
ActionConfigs -- so, when you pull them back out, the cast works.  It also
works for custom user subclasses, as long as the user extends
ActionMapping and not ActionConfig.

>  -- Carlos

Craig



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




ActionMapping/ActionConfig cast in RequestProcessor.java

2003-01-24 Thread Bueno Carlos M
Howdy --
I have what is I guess a noob question, but I simply can't figure out these
seemingly important lines of code in RequestProcessor.java:


646    ActionMapping mapping = (ActionMapping)
647moduleConfig.findActionConfig(path);


This appears on lines 646-7 in both 1.02 and 1.1. ActionMapping is a
*subclass* of ActionConfig, so how does this execute without throwing a
ClassCastException? I can cast an ActionMapping as an ActionConfig but not
the other way around. Yet, somehow, RequestProcessor seems to be doing just
that. Below is some sample code to illustrate my question. Can anyone shed
some light on this? It's too much majic for me.

 -- Carlos


-- snip --
import org.apache.struts.action.*;
import org.apache.struts.config.*;
import org.apache.struts.config.impl.*;

//config the module
ModuleConfig module = new ModuleConfigImpl("");
ActionConfig LOGIN = new ActionConfig();
LOGIN.setPath("/login");
LOGIN.setType("org.foo.LoginAction");
LOGIN.setInput("/login.jsp");
module.addActionConfig(LOGIN);
module.freeze();

//this throws a CCE
ActionMapping mapping = (ActionMapping) module.findActionConfig("/login");

-- snip --




Re: ActionMapping, struts-config and custom attributes

2003-01-05 Thread David M. Karr
>>>>> "Steve" == Steve Vanspall <[EMAIL PROTECTED]> writes:

Steve> Is there a way to set a custom attribute for an action mapping, then
Steve> retrieve that attribute through the ActionMapping class?

Steve> I am using Struts 1.1-b2

It appears there's two ways to do this.  You can get a hint about this by
looking at the "struts-config_1_1.dtd" in the distribution.  I've never tried
either of these, but it's relatively clear how to use them from the DTD.

First is the "parameter" attribute of the "action" element.  This just allows
you to set one value, and retrieve it with "getParameter()" on the
ActionMapping.

Second is to use nested "set-property" elements in your "action" element.  This
requires adding additional javabean setters/getters to your Action class.  It's
useful to know that the "set-property" nested element is available in several
other places in the struts-config.xml file.

I have not checked to see whether either of these features were available in
1.1b2.  I see them in the latest source.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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




ActionMapping, struts-config and custom attributes

2003-01-05 Thread Steve Vanspall
Hi there,

Me again.

Is there a way to set a custom attribute for an action mapping, then
retrieve that attribute through the ActionMapping class?

I am using Struts 1.1-b2

Regards

Steve Vanspall


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




not getting right ActionMapping class with StrutsTestCase

2002-12-17 Thread Afshartous, Nick

I noticed the following when trying to use StrutsTestCase
(latest version of StrutsTestCase with Struts B2). 

 It seems that when a request is sent via StrutsTest that 
RequestProcessor,processMapping does not find
the ActionMapping class that has been configured in
web.xml.  Instead it finds the Struts ActionMapping class.

If I hit the same server via the browser then the configured
ActionMapping class is found by RequestProcessor,processMapping.

Thanks for any explanation as to why the these two
situations are behaving differently.

--
Nick




Newbie question - ActionMapping

2002-12-03 Thread Curtis, Sean
hey all..

just installed struts, got demo up and running fine on iPlanet Web Server.
just trying to create a simple demo app.
1 view(jsp) 2 fields
1 form, matching fields
1 action

It seems that my jsp forwards correctly to my action mapping, my bean is
populated correctly and validated. my logs look like this:
[03/Dec/2002:13:50:23] info ( 2956):  action: Processing a POST for
/submitform1  
[03/Dec/2002:13:50:23] info ( 2956):  action: Setting locale 'en_US'  
[03/Dec/2002:13:50:23] info ( 2956):  action: Looking for ActionForm bean
under attribute 'form1'  
[03/Dec/2002:13:50:23] info ( 2956):  action: Creating new ActionForm
instance of class 'com.sc.struts.form.Form1'  [03/Dec/2002:13:50:23] info (
2956):  action: Storing instance under attribute 'form1' in scope 'session'
[03/Dec/2002:13:50:23] info ( 2956):  action: Populating bean properties
from this request  
[03/Dec/2002:13:50:23] info ( 2956):  action: Validating input form
properties  
[03/Dec/2002:13:50:23] info ( 2956):  action: No errors detected, accepting
input  
[03/Dec/2002:13:50:23] info ( 2956):  action: Looking for Action instance
for class com.sc.struts.action.Form1Action  [03/Dec/2002:13:50:23] info (
2956):  action: Double checking for Action instance already there  
[03/Dec/2002:13:50:23] info ( 2956):  action: Creating new Action instance 

and my app just displays a blank screen (no errors, no errors in log file)
in my browser with my new '.do' url. It doesnt seem as if im able to return
the correct action mapping object. I have now resorted to throwing an
exception in the first line of my Action.execute method, which as you can
see, isnt being thrown. Is this just a setup problem?


Has anyone else had this problem and/or know how I can fix this?

thanks 
Sean


pretty simple struts config as well:



  


   

  



  
  


  





  



==
"MLB Mail Domain" made the following
 annotations on 12/03/02 14:11:22

[INFO] -- Virus Manager:
No Viruses were detected in this message.

==


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Request "parameter" with actionMapping

2002-11-06 Thread Aladar The Dinosaur
Hello,

I'm trying to send request parameter (i.e. /uri.do?parameter=value) to the
redirected page actionMapping returns, but couldn't find an easy way to do
this. Can someone help?

I suppose I can forward the control back to the intended page by creating a
new instance of ActionForward, but
that seems to defeat the purpose of using action mapping.

Also, is there a way to send the attribute/value pairs as a "post" method
back to the action mapped jsp page?

Thanks,
Scott



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Extending ActionMapping in Struts 1.1 - classcast exception.

2002-11-05 Thread Alex_Kotchnev
I am working on an app with Tomcat 4.1 and Struts 1.1. I would like  to 
extend an ActionMapping, in order to verify that the user is logged in. I 
extend an ActionMapping, create the getter and setter methods for the 
property that I have added. 

Finally, I change my web.xml and my struts-config.xml files as indicated 
below. However, in my execute ( ...) method, when I cast the ActionMapping 
parameter to a UsersActionMapping, I get a ClassCastException. It seems 
that for some reason it is disregarding the fact that I want it to pass an 
UserActionMapping object , and instead passes me a regular ActionMapping 
object. If comment out the cast to UsersActionMapping, the execute method 
executes successfully.. 

So, my question is.. what am I missing.. what else do I have to do in 
order to get an instance of an UserActionMapping object in my execute 
method, instead of getting the normal ActionMapping object... ? 

Thanks in advance... 

  web.xml excerpt ---
.

action
org.apache.struts.action.ActionServlet

  debug
  5


  config
  /WEB-INF/struts-config.xml


  application
  ApplicationResources


  mapping
  printrejects.UsersActionMapping


application
printrejects.ApplicationResources


1
  
...

 struts-config.xml excerpt - - - - 








--- ClaimListAction.java excerpt ... 

public ActionForward execute(ActionMapping mapping, 
ActionForm form, 
HttpServletRequest request, 
HttpServletResponse response)
throws IOException, ServletException {

String target = "success";
 UsersActionMapping uam = (UsersActionMapping)mapping; 

. 

Thanks,

Alex Kotchnev
Diversified Information Technologies




please help - difficult to understand how ActionMapping works

2002-10-18 Thread Jitendra Kharche

Hi All,

I am experiencing a problem with action mapping.
The error statement seen in browser is -

Not Found
The requested URL /struts-ex1/logon.do was not found on this server.

Apache/1.3.14 Server at struts.test.com Port 80

The details are pasted below.
I have not modified any contents of the web.xml file except indenting it 
properly as per my editor. I think this should not make any differnce.

I am using Linux, JDK1.2.2 with Tomcat 3.2.3 under Apache 1.3.14.

Also I have created a simple JSP page named index.jsp with a login form. The 
action of this form is set to "/index" and not "index.do". Hence, I also 
have not defined the  tag in web.xml.
Is it necessary to add ".do" to every action.
On submitting this form, I get the same error as stated above.

Also please suggest a method to debug a struts application.

Please help.

Thanks in advance.

Jitendra






_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: ActionMapping question

2002-10-02 Thread Eddie Bush

Ok - you missed a subtle distiction :-)

It's never going to be different form what is stated in the config file. 
 You could, however, choose to instantiate/populate a form yourself and 
put it under some key that you wanted instead of the key Struts would 
normally expect to find the form under.  The attribute property would 
then specify the name under which you "poked" the form.

MOST of the time, Struts is going to handle your form creation - and the 
population will be handled by Struts on form submits.  Now, for the 
times Struts creates the form, it's going to use the "name" attribute of 
the form-bean -- but if you put a form out there which Struts does not 
create (and has no knowledge of!) you could use the attribute property 
to specify the name it can be looked up by.  The form would have to be a 
descendant of ActionForm in order to get passed to the action, but you 
may have some case in which it were handy to do this.  Maybe ... well, I 
can't dream up a good example.

The point I've been trying to make is that this is something Struts has 
done "above and beyond the call of duty" (IMHO) - and that it's not 
going to get used (as you've observed) by most folks.  That being the 
case - there's really no need to get hung-up over it :-)

I really wish one of the commiters would give a more "fleshy" response. 
 Don't feel other folks' silence is a cue to keep posting the same 
question though - please :-)  Struts is open source, and, while Craig 
does a phenomenal job of answering many questions (both courteously and 
well beyond "fully") - and while other folks, committers and 
non-committers, try to follow in his footsteps, there are times 
questions go unanswered.  It doesn't mean nobody saw the question or 
that they didn't notice nobody answered it - it's entirely possible 
nobody had a good answer and so didn't want to eat up bandwidth speculating.

I'm sorry if I haven't explained this to your satisfaction - I do hope 
someone with a better explaination will step forward - but I really 
don't see why understanding this one property is so important :-) 
 Struts won't use it unless you tell it to - there's no reason to care 
about it's existence that I see ...

Howard Miller wrote:

>Yes sorry, I read it.
>
>I even resorted to downloading/reading the source code.
>
>I'm just curious as to what this property is for? When would "attribute" be different 
>from that specified in the configuration file? I can't see why/how?
>
>HM
>
>On 2 Oct 2002 at 17:17, Eddie Bush wrote:
>
>>Did you miss my previous post regarding this?  I think it finally hit 
>>the list - you should have it.  My mail has been acting odd the last 
>>week or so though, so ...
>>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ActionMapping question

2002-10-02 Thread Howard Miller

Yes sorry, I read it.

I even resorted to downloading/reading the source code.

I'm just curious as to what this property is for? When would "attribute" be different 
from that specified in the configuration file? I can't see why/how?

HM

On 2 Oct 2002 at 17:17, Eddie Bush wrote:

> Did you miss my previous post regarding this?  I think it finally hit 
> the list - you should have it.  My mail has been acting odd the last 
> week or so though, so ...
> 
> Howard Miller wrote:
> 
> >Hi,
> >
> >Can somebody explain what the "attribute" property of ActionMapping actually 
> >means. I don't understand it.
> >
> >Surely the request/session scope is that given in struts-config.xml, under what 
> >circumstances will it differ?
> >
> >Howard Miller
> >
> 
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



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




Re: ActionMapping question

2002-10-02 Thread Craig R. McClanahan

On Wed, 2 Oct 2002, Howard Miller wrote:

> Date: Wed, 2 Oct 2002 22:46:35 +0100
> From: Howard Miller <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: ActionMapping question
>
> Hi,
>
> Can somebody explain what the "attribute" property of ActionMapping actually
> means. I don't understand it.
>

Under normal circumstances, the "name" attribute of an  element is
used for two purposes:

* To look up the definition of a  with the matching name.

* To specify the request or session attribute under which the form bean
  instance will be stored.

The "attribute" attribute lets you change the second of these uses if you
want to (for example, you might use the same form bean definition in
multiple actions, and you want to be able to keep the beans in session
scope without stepping on each other).  Most people will just use the
"name" attribute and be done with it.

> Surely the request/session scope is that given in struts-config.xml,
> under what circumstances will it differ?
>
> Howard Miller
>

Craig


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




Re: ActionMapping question

2002-10-02 Thread Eddie Bush

Did you miss my previous post regarding this?  I think it finally hit 
the list - you should have it.  My mail has been acting odd the last 
week or so though, so ...

Howard Miller wrote:

>Hi,
>
>Can somebody explain what the "attribute" property of ActionMapping actually 
>means. I don't understand it.
>
>Surely the request/session scope is that given in struts-config.xml, under what 
>circumstances will it differ?
>
>Howard Miller
>

-- 
Eddie Bush




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




ActionMapping question

2002-10-02 Thread Howard Miller

Hi,

Can somebody explain what the "attribute" property of ActionMapping actually 
means. I don't understand it.

Surely the request/session scope is that given in struts-config.xml, under what 
circumstances will it differ?

Howard Miller

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




RE: Struts ActionMapping / OC4J problem

2002-09-30 Thread Miguel Angel Mulero Martinez

Execute is the new versión (1.1b2). Perform is the old metod (1.0.2).

Regads.

-Mensaje original-
De: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 30 de septiembre de 2002 12:33
Para: [EMAIL PROTECTED]
Asunto: Struts ActionMapping / OC4J problem

Hi.

Several days ago, I posted a message relating to configuring Struts to run
properly on OC4J.

The actual problem was that JDeveloper's wizard for creating Action classes,
does not create a perform(), but an execute() method, which I beleive is the
old version (?).

The Action class that worked properly was hand-coded by me.

Kind regards.

Thomas Delnoij



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


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




Struts ActionMapping / OC4J problem

2002-09-30 Thread Thomas Delnoij

Hi.

Several days ago, I posted a message relating to configuring Struts to run
properly on OC4J.

The actual problem was that JDeveloper's wizard for creating Action classes,
does not create a perform(), but an execute() method, which I beleive is the
old version (?).

The Action class that worked properly was hand-coded by me.

Kind regards.

Thomas Delnoij



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts ActionMapping / OC4J problem

2002-09-27 Thread Karr, David

> -Original Message-
> From: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 5:43 AM
> To: [EMAIL PROTECTED]
> Subject: Struts ActionMapping / OC4J problem
> 
> 
> Dear colleagues,
> 
> I have a problem configuring Struts to run properly with the 
> embedded OC4J
> app server in Oracle 9i JDeveloper.
> 
> It can only find the first Action Object of these two ActionMappings I
> configured.
> 
> 
>  name="TrekkerFormBean" scope="request"
> input="/trekker/keuringsformulier.jsp" validate="true">
>   
>   
> 
> 
>   
>path="/veldspuit/keuringsformulier.jsp"/>
>path="/boomgaardspuit/keuringsformulier.jsp"/>
> 
>   

So you request "http://localhost://ProcessForm.do" and it
hits the breakpoint in your action.

Then, you request "http://localhost://GetKeuringsForm.do" and
you just get a 404 error, without hitting the breakpoint in your action, and
no errors in your server logs?

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




RE: Struts ActionMapping / OC4J problem

2002-09-27 Thread Miller, Jason

Maybe a stupid question, but I guess it never hurts to check.  Is the
servlet properly mapped, and are you using the correct pattern to call the
URL?

For kicks, mark the second action as your unknown action and then send some
random request ( e.g. "blah.do" ) and see what happens there.

> -Original Message-
> From: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 8:43 AM
> To: [EMAIL PROTECTED]
> Subject: Struts ActionMapping / OC4J problem
> 
> 
> Dear colleagues,
> 
> I have a problem configuring Struts to run properly with the 
> embedded OC4J
> app server in Oracle 9i JDeveloper.
> 
> It can only find the first Action Object of these two ActionMappings I
> configured.
> 
> 
>  name="TrekkerFormBean" scope="request"
> input="/trekker/keuringsformulier.jsp" validate="true">
>   
>   
> 
> 
>   
>    path="/veldspuit/keuringsformulier.jsp"/>
>path="/boomgaardspuit/keuringsformulier.jsp"/>
> 
>   
> 
> The first ActionMapping accepts input from a form. The second 
> is mapped to a
> "normal" link:
> 
> The Action Objects are in the same directory.
> 
> I worked with Struts before in the Resin container. I think I 
> am missing out
> on some JDeveloper specific config options.
> 
> I look forward to your suggestions.
> 
> Kind regards.
> 
> Thomas Delnoij
> Internet Engineer
> IMN - SSE Baarn
> 
> Mobile: +31 6 144 300 14
> EMail: [EMAIL PROTECTED]
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 



Re: Struts ActionMapping / OC4J problem

2002-09-27 Thread Eddie Bush

Weird.  I always get a stack trace when I have a misconfiguration.  Let 
me look over your problem again ...

>
>name="TrekkerFormBean" scope="request"
>input="/trekker/keuringsformulier.jsp" validate="true">
>  
>  
>
>
>  
>  
>  path="/boomgaardspuit/keuringsformulier.jsp"/>
>
>  
>
Why do you have type="o.a.s.a.ActionServlet" in your action-mappings 
element?  I never specify a type there any my stuff always works.  I 
suppose this is where you can make all of your actions forward/redirect 
by default by specifying a different action class.  ActionServlet is not 
an action though.  I think that's an error - but please correct me if 
I'm wrong.

If you would be so kind please tell us what you have tried next time - 
rather than just stating your problem :-)  I don't know everyone on the 
list, and my rule of thumb is to start with the simplest solution and 
work toward the more complex one.  When I hear "configuration" and 
"doesn't work" I think "stack trace".  In order to cut through the basic 
solutions and hop right to a more detailed examination, you should state 
what you have tried :-)  Sorry you felt like I was brushing you off (I'm 
nearly certain you did).

I don't think anyone posted solutions for the others either.  You need 
to realize that we're not all omniscient though - and I think most 
people problem-solve like I do (very deliberately - start here; work to 
there).  Hopefully this reply is more helpful ;-)  (I really don't just 
post to exercise my fingers - they get plenty of that, and I have other 
things I could well exercise them on)

Thomas Delnoij wrote:

>Eddie.
>
>This doesn't help me in any way.
>
>I did search the archives, and no, nothing special in the logs/console.
>
>You could play a helpfull role by sending me the EMails with the "similar
>questions" you are talking about.
>
>Kind regards
>
>Thomas Delnoij
>Internet Engineer
>IMN - SSE Baarn
>
>Mobile: +31 6 144 300 14
>EMail: [EMAIL PROTECTED]
>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts ActionMapping / OC4J problem

2002-09-27 Thread Thomas Delnoij

David.

The request for the second Action Object returns "404 not found."

Furthermore, the perform() method of the Object is never called (Debugger).

No NullPointerException though.

Kind regards.

Thomas Delnoij
Internet Engineer
IMN - SSE Baarn

Mobile: +31 6 144 300 14
EMail: [EMAIL PROTECTED] 

>-Original Message-
>From: Karr, David [mailto:[EMAIL PROTECTED]]
>Sent: vrijdag 27 september 2002 17:18
>To: 'Struts Users Mailing List'
>Subject: RE: Struts ActionMapping / OC4J problem
>
>
>> -Original Message-
>> From: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, September 27, 2002 5:43 AM
>> To: [EMAIL PROTECTED]
>> Subject: Struts ActionMapping / OC4J problem
>> 
>> 
>> Dear colleagues,
>> 
>> I have a problem configuring Struts to run properly with the 
>> embedded OC4J
>> app server in Oracle 9i JDeveloper.
>> 
>> It can only find the first Action Object of these two ActionMappings I
>> configured.
>
>Tell us exactly what happened.  I don't know what "It can only find the
>first Action" means.
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>

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




RE: Struts ActionMapping / OC4J problem

2002-09-27 Thread Thomas Delnoij

Eddie.

This doesn't help me in any way.

I did search the archives, and no, nothing special in the logs/console.

You could play a helpfull role by sending me the EMails with the "similar
questions" you are talking about.

Kind regards

Thomas Delnoij
Internet Engineer
IMN - SSE Baarn

Mobile: +31 6 144 300 14
EMail: [EMAIL PROTECTED]

>-Original Message-
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: vrijdag 27 september 2002 16:47
>To: Struts Users Mailing List
>Subject: Re: Struts ActionMapping / OC4J problem
>
>
>Have you looked at your console/log file yet?  You're about the fourth
>person in two days to ask a similar question.  If you have a
>misconfiguration you will get a stack trace - find it, read it, and if
>it doesn't make sense to you then ... search the archive (by all means
>:-) and then post here if you still can't figure it out.  You could
>insert STFW between search the archive and post here if you really
>wanted to do your homework :-)
>
>--
>Eddie Bush
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


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




RE: Struts ActionMapping / OC4J problem

2002-09-27 Thread Karr, David

> -Original Message-
> From: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 5:43 AM
> To: [EMAIL PROTECTED]
> Subject: Struts ActionMapping / OC4J problem
> 
> 
> Dear colleagues,
> 
> I have a problem configuring Struts to run properly with the 
> embedded OC4J
> app server in Oracle 9i JDeveloper.
> 
> It can only find the first Action Object of these two ActionMappings I
> configured.

Tell us exactly what happened.  I don't know what "It can only find the
first Action" means.

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




Re: Struts ActionMapping / OC4J problem

2002-09-27 Thread Eddie Bush

Have you looked at your console/log file yet?  You're about the fourth 
person in two days to ask a similar question.  If you have a 
misconfiguration you will get a stack trace - find it, read it, and if 
it doesn't make sense to you then ... search the archive (by all means 
:-) and then post here if you still can't figure it out.  You could 
insert STFW between search the archive and post here if you really 
wanted to do your homework :-)

-- 
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts ActionMapping / OC4J problem

2002-09-27 Thread Thomas Delnoij

Dear colleagues,

I have a problem configuring Struts to run properly with the embedded OC4J
app server in Oracle 9i JDeveloper.

It can only find the first Action Object of these two ActionMappings I
configured.



  
  


  
  
  

  

The first ActionMapping accepts input from a form. The second is mapped to a
"normal" link:

The Action Objects are in the same directory.

I worked with Struts before in the Resin container. I think I am missing out
on some JDeveloper specific config options.

I look forward to your suggestions.

Kind regards.

Thomas Delnoij
Internet Engineer
IMN - SSE Baarn

Mobile: +31 6 144 300 14
EMail: [EMAIL PROTECTED]


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




calling a ActionMapping from a structs template page

2002-07-18 Thread Kevin Scott

here is the template page:
<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>


  
  
  


here the structs-config.xml
   
   


   
 

I would like to be call the SaveRegistrationAction class before displaying the 
="/admin/UserEdit.jsp page.  Can this be done?  Or am I missing somthing?

I can not get any template page to call any action class.  I can only get the 
templates to work with a jsp or html file.

Is there a work around to get this to work if it can not be done?

Kevin Scott


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




the 'attribute' property of ActionMapping

2002-07-15 Thread Tibor Gemes

This is not a question, but rather a suggestion.

I reuse the same FormBean in session scope for three different ActionMapping, 
and most of the FormBean properties are not reseted. So if the user comes 
back to the same form, sees the recently entered values. But for these 3 
forms I want to remember 3 different entires. 

So I added the 'attribute' property for each ActionMappings with 3 different 
values.  I have to handle the name and the type attribute for the  
tag where the name is the same as in the mapping respectively, and the type 
is the same as the name for the FormBean in the struts-config.xml.

I think these attributes could be determined from the ActionMapping, but they 
aren't yet. 

Did I misunderstood something in the documentation, or are these attributes 
used not properly, or has the 'attribute' property for the ActionMapping got 
a different purpose?

Tib

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




RE: Arbitrary parameters in ActionMapping?

2002-06-01 Thread Jivan, Rajiv

Do we declare the variable which holds the value of the property test as an instance 
variable? If so will the class be thread safe?

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 6:03 PM
To: Struts Users Mailing List
Subject: Re: Arbitrary parameters in ActionMapping?


That's just the thing.  You have to define a method in
your action class for each  element you
define.  Basically if you have a property names "test"
then your action class needs a method called
setTest(String str).

HTH,

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- [EMAIL PROTECTED] wrote:
> 
> Once the properties are defined in the config xml,
> how do you access them
> from the action class?
> 
> 
> 
> 
> 
> James Holmes <[EMAIL PROTECTED]> on 05/31/2002
> 01:32:51 PM
> 
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
> 
> To:   Struts Users Mailing List
> <[EMAIL PROTECTED]>
> cc:
> Subject:  Re: Arbitrary parameters in ActionMapping?
> 
> 
> Rick,
> 
> You can already accomplish what you are describing
> with the current Struts architecture via
>  elements.
> 
> 
>   
> 
> 
> This will call the setProp(String value) method of
> your action object with the "val" value.
> 
> The Struts Console makes it easy for setting these
> properties on actions.
> 
> http://www.jamesholmes.com/struts/
> 
> -james
> [EMAIL PROTECTED]
> 
> 
> --- Rick Mann <[EMAIL PROTECTED]> wrote:
> > I've noticed a few people proposing solutions for
> > various framework
> > limitations that use the "param" attribute of the
> >  tag. Obviously,
> > only one parameter can reasonably be passed in
> this
> > attribute.
> >
> > Does it not make sense to add a nested tag for
> > parameters? In the build of
> > Struts that I'm using, I haven't noticed anything
> > like this. I was thinking
> > along the lines of something like this:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > 
> > 
> >
> > Or, if you want to get XML-happy:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > param1
> > value1
> > 
> > 
> >
> > but I don't know if that's strictly necessary
> (I'll
> > let the smarter people
> > on the project decide).
> >
> > In any event, in the code, you could write
> something
> > like:
> >
> > String val1 = mapping.getParameter("param1");
> > String val2 = mapping.getParameter("param2");
> >
> > The method shouldn't even need to be named
> > differently, as the existing
> > getParameter() takes no arguments. There would
> > obviously be corresponding
> > setParameter(String) calls.
> >
> > How does this seem?
> >
> > --
> > Rick
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> 
>
**
> Please Note:
> The information in this E-mail message, and any
> files transmitted
> with it, is confidential and may be legally
> privileged.  It is
> intended only for the use of the individual(s) named
> above.  If you
> are the intended recipient, be aware that your use
> of any confidential
> or personal information may be restricted by state
> and federal
> privacy laws.  If you, the reader of this message,
> are not the
> intended recipient, you are hereby notified that you
> should not
> further disseminate, distribute, or forward this
> E-mail message.
> If you have received this E-mail in error, please
> notify the sender
> and delete the material from any computer.  Thank
> you.
>
**
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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


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




Re: Arbitrary parameters in ActionMapping?

2002-06-01 Thread James Holmes

The data is basically static.  Since it is specified
in the struts-config.xml file it is read and set once
when the "application" starts up.  This way you can
give your action initialization parameters that can be
specified in the config file.

Every user would see the same values.

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Tim Sawyer <[EMAIL PROTECTED]> wrote:
> Doesn't this have multiuser issues?  If there is
> only one action class
> instance given multiple users of the action, how do
> you get data from
> this set() method to read it in the main perform()
> method?
> 
> What am I missing?
> 
> Tim.
> 
> On Fri, 2002-05-31 at 22:03, James Holmes wrote:
> > That's just the thing.  You have to define a
> method in
> > your action class for each  element
> you
> > define.  Basically if you have a property names
> "test"
> > then your action class needs a method called
> > setTest(String str).
> > 
> > HTH,
> > 
> > -james
> > [EMAIL PROTECTED]
> > http://www.jamesholmes.com/struts/
> > 
> > 
> > --- [EMAIL PROTECTED] wrote:
> > > 
> > > Once the properties are defined in the config
> xml,
> > > how do you access them
> > > from the action class?
> > > 
> > > 
> > > 
> > > 
> > > 
> > > James Holmes <[EMAIL PROTECTED]> on
> 05/31/2002
> > > 01:32:51 PM
> > > 
> > > Please respond to "Struts Users Mailing List"
> > >   <[EMAIL PROTECTED]>
> > > 
> > > To:   Struts Users Mailing List
> > > <[EMAIL PROTECTED]>
> > > cc:
> > > Subject:  Re: Arbitrary parameters in
> ActionMapping?
> > > 
> > > 
> > > Rick,
> > > 
> > > You can already accomplish what you are
> describing
> > > with the current Struts architecture via
> > >  elements.
> > > 
> > > 
> > >   
> > > 
> > > 
> > > This will call the setProp(String value) method
> of
> > > your action object with the "val" value.
> > > 
> > > The Struts Console makes it easy for setting
> these
> > > properties on actions.
> > > 
> > > http://www.jamesholmes.com/struts/
> > > 
> > > -james
> > > [EMAIL PROTECTED]
> > > 
> > > 
> > > --- Rick Mann <[EMAIL PROTECTED]> wrote:
> > > > I've noticed a few people proposing solutions
> for
> > > > various framework
> > > > limitations that use the "param" attribute of
> the
> > > >  tag. Obviously,
> > > > only one parameter can reasonably be passed in
> > > this
> > > > attribute.
> > > >
> > > > Does it not make sense to add a nested tag for
> > > > parameters? In the build of
> > > > Struts that I'm using, I haven't noticed
> anything
> > > > like this. I was thinking
> > > > along the lines of something like this:
> > > >
> > > >  > > > type =
> "com.foo.bar.action.Action">
> > > >
> > > > 
> > > > 
> > > > 
> > > >
> > > > Or, if you want to get XML-happy:
> > > >
> > > >  > > > type =
> "com.foo.bar.action.Action">
> > > >
> > > > 
> > > > param1
> > > > value1
> > > > 
> > > > 
> > > >
> > > > but I don't know if that's strictly necessary
> > > (I'll
> > > > let the smarter people
> > > > on the project decide).
> > > >
> > > > In any event, in the code, you could write
> > > something
> > > > like:
> > > >
> > > > String val1 =
> mapping.getParameter("param1");
> > > > String val2 =
> mapping.getParameter("param2");
> > > >
> > > > The method shouldn't even need to be named
> > > > differently, as the existing
> > > > getParameter() takes no arguments. There would
> > > > obviously be corresponding
> > > > setParameter(String) calls.
> > > >
> > > > How does this seem?
> > > >
> > > > --
> > > > Rick
> > > >
> > > >
>

Re: Arbitrary parameters in ActionMapping?

2002-06-01 Thread Tim Sawyer

Doesn't this have multiuser issues?  If there is only one action class
instance given multiple users of the action, how do you get data from
this set() method to read it in the main perform() method?

What am I missing?

Tim.

On Fri, 2002-05-31 at 22:03, James Holmes wrote:
> That's just the thing.  You have to define a method in
> your action class for each  element you
> define.  Basically if you have a property names "test"
> then your action class needs a method called
> setTest(String str).
> 
> HTH,
> 
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
> 
> 
> --- [EMAIL PROTECTED] wrote:
> > 
> > Once the properties are defined in the config xml,
> > how do you access them
> > from the action class?
> > 
> > 
> > 
> > 
> > 
> > James Holmes <[EMAIL PROTECTED]> on 05/31/2002
> > 01:32:51 PM
> > 
> > Please respond to "Struts Users Mailing List"
> >   <[EMAIL PROTECTED]>
> > 
> > To:   Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > cc:
> > Subject:  Re: Arbitrary parameters in ActionMapping?
> > 
> > 
> > Rick,
> > 
> > You can already accomplish what you are describing
> > with the current Struts architecture via
> >  elements.
> > 
> > 
> >   
> > 
> > 
> > This will call the setProp(String value) method of
> > your action object with the "val" value.
> > 
> > The Struts Console makes it easy for setting these
> > properties on actions.
> > 
> > http://www.jamesholmes.com/struts/
> > 
> > -james
> > [EMAIL PROTECTED]
> > 
> > 
> > --- Rick Mann <[EMAIL PROTECTED]> wrote:
> > > I've noticed a few people proposing solutions for
> > > various framework
> > > limitations that use the "param" attribute of the
> > >  tag. Obviously,
> > > only one parameter can reasonably be passed in
> > this
> > > attribute.
> > >
> > > Does it not make sense to add a nested tag for
> > > parameters? In the build of
> > > Struts that I'm using, I haven't noticed anything
> > > like this. I was thinking
> > > along the lines of something like this:
> > >
> > >  > > type = "com.foo.bar.action.Action">
> > >
> > > 
> > > 
> > > 
> > >
> > > Or, if you want to get XML-happy:
> > >
> > >  > > type = "com.foo.bar.action.Action">
> > >
> > > 
> > > param1
> > > value1
> > > 
> > > 
> > >
> > > but I don't know if that's strictly necessary
> > (I'll
> > > let the smarter people
> > > on the project decide).
> > >
> > > In any event, in the code, you could write
> > something
> > > like:
> > >
> > > String val1 = mapping.getParameter("param1");
> > > String val2 = mapping.getParameter("param2");
> > >
> > > The method shouldn't even need to be named
> > > differently, as the existing
> > > getParameter() takes no arguments. There would
> > > obviously be corresponding
> > > setParameter(String) calls.
> > >
> > > How does this seem?
> > >
> > > --
> > > Rick
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> > 
> > 
> > 
> > 
> > 
> > 
> >
> **
> > Please Note:
> > The information in this E-mail message, and any
> > files transmitted
> > with it, is confidential and may be legally
> > privileged.  It is
> > intended only for the use of the individual(s) named
> > above.  If you
> > are the intended recipient, be aware that your use
> > of any confidential
> > or personal information may be restricted by state
> > and federal
> > privacy laws.  If you, the reader of this message,
> > are not the
> > intended recipient, you are hereby notified that you
> > should not
> > further disseminate, distribute, or forward this
> > E-mail message.
> > If you have received this E-mail in error, please
> > notify the sender
> > and delete the material from any computer.  Thank
> > you.
> >
> **
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



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




Re: Arbitrary parameters in ActionMapping?

2002-05-31 Thread Raffy_Lata


thanks




James Holmes <[EMAIL PROTECTED]> on 05/31/2002 03:03:23 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject:  Re: Arbitrary parameters in ActionMapping?


That's just the thing.  You have to define a method in
your action class for each  element you
define.  Basically if you have a property names "test"
then your action class needs a method called
setTest(String str).

HTH,

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- [EMAIL PROTECTED] wrote:
>
> Once the properties are defined in the config xml,
> how do you access them
> from the action class?
>
>
>
>
>
> James Holmes <[EMAIL PROTECTED]> on 05/31/2002
> 01:32:51 PM
>
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
> To:   Struts Users Mailing List
> <[EMAIL PROTECTED]>
> cc:
> Subject:  Re: Arbitrary parameters in ActionMapping?
>
>
> Rick,
>
> You can already accomplish what you are describing
> with the current Struts architecture via
>  elements.
>
> 
>   
> 
>
> This will call the setProp(String value) method of
> your action object with the "val" value.
>
> The Struts Console makes it easy for setting these
> properties on actions.
>
> http://www.jamesholmes.com/struts/
>
> -james
> [EMAIL PROTECTED]
>
>
> --- Rick Mann <[EMAIL PROTECTED]> wrote:
> > I've noticed a few people proposing solutions for
> > various framework
> > limitations that use the "param" attribute of the
> >  tag. Obviously,
> > only one parameter can reasonably be passed in
> this
> > attribute.
> >
> > Does it not make sense to add a nested tag for
> > parameters? In the build of
> > Struts that I'm using, I haven't noticed anything
> > like this. I was thinking
> > along the lines of something like this:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > 
> > 
> >
> > Or, if you want to get XML-happy:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > param1
> > value1
> > 
> > 
> >
> > but I don't know if that's strictly necessary
> (I'll
> > let the smarter people
> > on the project decide).
> >
> > In any event, in the code, you could write
> something
> > like:
> >
> > String val1 = mapping.getParameter("param1");
> > String val2 = mapping.getParameter("param2");
> >
> > The method shouldn't even need to be named
> > differently, as the existing
> > getParameter() takes no arguments. There would
> > obviously be corresponding
> > setParameter(String) calls.
> >
> > How does this seem?
> >
> > --
> > Rick
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
**
> Please Note:
> The information in this E-mail message, and any
> files transmitted
> with it, is confidential and may be legally
> privileged.  It is
> intended only for the use of the individual(s) named
> above.  If you
> are the intended recipient, be aware that your use
> of any confidential
> or personal information may be restricted by state
> and federal
> privacy laws.  If you, the reader of this message,
> are not the
> intended recipient, you are hereby notified that you
> should not
> further disseminate, distribute, or forward this
> E-mail message.
> If you have received this E-mail in error, please
> notify the sender
> and delete the material from any computer.  Thank
> you.
>
**
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


___

Re: Arbitrary parameters in ActionMapping?

2002-05-31 Thread James Holmes

That's just the thing.  You have to define a method in
your action class for each  element you
define.  Basically if you have a property names "test"
then your action class needs a method called
setTest(String str).

HTH,

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- [EMAIL PROTECTED] wrote:
> 
> Once the properties are defined in the config xml,
> how do you access them
> from the action class?
> 
> 
> 
> 
> 
> James Holmes <[EMAIL PROTECTED]> on 05/31/2002
> 01:32:51 PM
> 
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
> 
> To:   Struts Users Mailing List
> <[EMAIL PROTECTED]>
> cc:
> Subject:  Re: Arbitrary parameters in ActionMapping?
> 
> 
> Rick,
> 
> You can already accomplish what you are describing
> with the current Struts architecture via
>  elements.
> 
> 
>   
> 
> 
> This will call the setProp(String value) method of
> your action object with the "val" value.
> 
> The Struts Console makes it easy for setting these
> properties on actions.
> 
> http://www.jamesholmes.com/struts/
> 
> -james
> [EMAIL PROTECTED]
> 
> 
> --- Rick Mann <[EMAIL PROTECTED]> wrote:
> > I've noticed a few people proposing solutions for
> > various framework
> > limitations that use the "param" attribute of the
> >  tag. Obviously,
> > only one parameter can reasonably be passed in
> this
> > attribute.
> >
> > Does it not make sense to add a nested tag for
> > parameters? In the build of
> > Struts that I'm using, I haven't noticed anything
> > like this. I was thinking
> > along the lines of something like this:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > 
> > 
> >
> > Or, if you want to get XML-happy:
> >
> >  > type = "com.foo.bar.action.Action">
> >
> > 
> > param1
> > value1
> > 
> > 
> >
> > but I don't know if that's strictly necessary
> (I'll
> > let the smarter people
> > on the project decide).
> >
> > In any event, in the code, you could write
> something
> > like:
> >
> > String val1 = mapping.getParameter("param1");
> > String val2 = mapping.getParameter("param2");
> >
> > The method shouldn't even need to be named
> > differently, as the existing
> > getParameter() takes no arguments. There would
> > obviously be corresponding
> > setParameter(String) calls.
> >
> > How does this seem?
> >
> > --
> > Rick
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> 
>
**
> Please Note:
> The information in this E-mail message, and any
> files transmitted
> with it, is confidential and may be legally
> privileged.  It is
> intended only for the use of the individual(s) named
> above.  If you
> are the intended recipient, be aware that your use
> of any confidential
> or personal information may be restricted by state
> and federal
> privacy laws.  If you, the reader of this message,
> are not the
> intended recipient, you are hereby notified that you
> should not
> further disseminate, distribute, or forward this
> E-mail message.
> If you have received this E-mail in error, please
> notify the sender
> and delete the material from any computer.  Thank
> you.
>
**
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: Arbitrary parameters in ActionMapping?

2002-05-31 Thread Raffy_Lata


Once the properties are defined in the config xml, how do you access them
from the action class?





James Holmes <[EMAIL PROTECTED]> on 05/31/2002 01:32:51 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject:  Re: Arbitrary parameters in ActionMapping?


Rick,

You can already accomplish what you are describing
with the current Struts architecture via
 elements.


  


This will call the setProp(String value) method of
your action object with the "val" value.

The Struts Console makes it easy for setting these
properties on actions.

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Rick Mann <[EMAIL PROTECTED]> wrote:
> I've noticed a few people proposing solutions for
> various framework
> limitations that use the "param" attribute of the
>  tag. Obviously,
> only one parameter can reasonably be passed in this
> attribute.
>
> Does it not make sense to add a nested tag for
> parameters? In the build of
> Struts that I'm using, I haven't noticed anything
> like this. I was thinking
> along the lines of something like this:
>
>  type = "com.foo.bar.action.Action">
>
> 
> 
> 
>
> Or, if you want to get XML-happy:
>
>  type = "com.foo.bar.action.Action">
>
> 
> param1
> value1
> 
> 
>
> but I don't know if that's strictly necessary (I'll
> let the smarter people
> on the project decide).
>
> In any event, in the code, you could write something
> like:
>
> String val1 = mapping.getParameter("param1");
> String val2 = mapping.getParameter("param2");
>
> The method shouldn't even need to be named
> differently, as the existing
> getParameter() takes no arguments. There would
> obviously be corresponding
> setParameter(String) calls.
>
> How does this seem?
>
> --
> Rick
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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






**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**




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




Re: Arbitrary parameters in ActionMapping?

2002-05-31 Thread James Holmes

Rick,

You can already accomplish what you are describing
with the current Struts architecture via
 elements.


  


This will call the setProp(String value) method of
your action object with the "val" value.

The Struts Console makes it easy for setting these
properties on actions.

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Rick Mann <[EMAIL PROTECTED]> wrote:
> I've noticed a few people proposing solutions for
> various framework
> limitations that use the "param" attribute of the
>  tag. Obviously,
> only one parameter can reasonably be passed in this
> attribute.
> 
> Does it not make sense to add a nested tag for
> parameters? In the build of
> Struts that I'm using, I haven't noticed anything
> like this. I was thinking
> along the lines of something like this:
> 
>  type = "com.foo.bar.action.Action">
> 
> 
> 
> 
> 
> Or, if you want to get XML-happy:
> 
>  type = "com.foo.bar.action.Action">
> 
> 
> param1
> value1
> 
> 
> 
> but I don't know if that's strictly necessary (I'll
> let the smarter people
> on the project decide).
> 
> In any event, in the code, you could write something
> like:
> 
> String val1 = mapping.getParameter("param1");
> String val2 = mapping.getParameter("param2");
> 
> The method shouldn't even need to be named
> differently, as the existing
> getParameter() takes no arguments. There would
> obviously be corresponding
> setParameter(String) calls.
> 
> How does this seem?
> 
> -- 
> Rick
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Arbitrary parameters in ActionMapping?

2002-05-31 Thread Rick Mann

I've noticed a few people proposing solutions for various framework
limitations that use the "param" attribute of the  tag. Obviously,
only one parameter can reasonably be passed in this attribute.

Does it not make sense to add a nested tag for parameters? In the build of
Struts that I'm using, I haven't noticed anything like this. I was thinking
along the lines of something like this:







Or, if you want to get XML-happy:




param1
value1



but I don't know if that's strictly necessary (I'll let the smarter people
on the project decide).

In any event, in the code, you could write something like:

String val1 = mapping.getParameter("param1");
String val2 = mapping.getParameter("param2");

The method shouldn't even need to be named differently, as the existing
getParameter() takes no arguments. There would obviously be corresponding
setParameter(String) calls.

How does this seem?

-- 
Rick



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ActionMapping, Forward Error

2002-05-20 Thread DHS Struts

>From: Chris Cairns <[EMAIL PROTECTED]>
>
>
>
>
>

I think this should be:
 ...

This is what the following message is telling you, that you used the wrong 
paramater name:


>
>Parse Error at line 23 column 52: Attribute "path" is required and must be
>specified for element type "forward
>org.xml.sax.SAXParseException: Attribute "path" is required and must be
>specified for element type "forward".


mark n

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ActionMapping, Forward Error

2002-05-18 Thread Chris Cairns

Hi folks,

I just got started with J2EE, Struts, etc. a few days ago and am not sure 
of a few things.  I also have an error question.

First of all, I read that in the earlier Struts version of 0.5 that the 
action.xml file was used and is not.  Unfortunately, the examples I'm 
following uses this files when configuration should actually be done in the 
struts-config.xml.  What's going on here?  Does this mean that the *.do is 
no longer relevant?


   
 action
 *.do
   

Also, I'm having some problems with global forwarding, action mapping, and 
tags.  I'm simple trying to link to another jsp page from my index.  I'm 
not sure whether I should use the page or forward attribute, although I 
would assume page.  Anyway, here's my code.









   




   



Here are the errors I've gotten from trying to use page and forward in my 
index.jsp.

Parse Error at line 23 column 52: Attribute "path" is required and must be 
specified for element type "forward
org.xml.sax.SAXParseException: Attribute "path" is required and must be 
specified for element type "forward".

Parse Fatal Error at line 49 column 17: Element type "forward-name" must be 
followed by either attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "forward-name" must be followed 
by either attribute specifications, ">" or "/>".

org.apache.jasper.compiler.ParseException: /editorsLogin.jsp(17,0) 
Attribute > has no value


Thanks.  Sorry for the long-winded e-mail, I'll get a hang of this stuff 
eventually (or at least linking, I hope ;) ).



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Re(2): Warning when extending ActionMapping.

2002-04-18 Thread Galbreath, Mark

What a way to segue a thread!  This should answer all your questions:

http://www.tuxedo.org/~esr/faqs/smart-questions.html

Mark

-Original Message-
From: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 5:35 AM

how do you make a project with a comboBox?

Greetz
Wald

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re(2): Warning when extending ActionMapping.

2002-04-18 Thread waldemar . cleenewerck

Hi,

I have made a combo-box, with a list that I call in the bean. The list is made
of strings, that i call form a database. How do i proceed of making a good
solid project,

thx, for any reaplies


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >