tiles definition overload for difficult modules

2005-03-03 Thread Hauschel Fred
Hey all,
is it possible to deine a definition in Base Module and extend it in
another "sub" struts-module?

thanks



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



Re: OT: Tool for detecting unclosed resources

2005-03-03 Thread Yves Sy
http://findbugs.sourceforge.net in case anyone's interested...


On Thu, 3 Mar 2005 15:44:11 +0800, Yves Sy <[EMAIL PROTECTED]> wrote:
> Anybody know a tool for scanning unclosed JDBC resources? I've done a
> simple logging facility in my app to keep track of connections in the
> pool at runtime but I'm just wondering if there's a less eye-straining
> way to do it.. something like a code analyzer of some sort...
> 
> Br,
> -Yves-
> 
> --
> A bus station is where a bus stops. A train station is where a train
> stops. On my desk I have a work station...
> 


-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

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



direction of effort request please?

2005-03-03 Thread Adam Jenkins

Hi Guys, I'm having some issues with  (I've attached my previous 
mail below) that I'm going to write a custom tag to get around.  I was 
thinking that if it's a bug, my effort is probably more productively used 
fixing the bug than rewriting the functionality, but first I need to know if 
it is a bug or not.  Can anyone help me out (feel free to email me directly 
for more information)?

Cheers
Adam


previous email


Hi Guys,

I'm trying to come to terms with ...it's working ok, I'm using 
the following for prefixes etc:

#error formatting information
errors.header=Some errors occured validating the 
form.  Please correct the following errors and try again.
errors.footer=
errors.prefix=
errors.suffix=

Which is working great when there are form validation errors, however, to get 
to the page that has the form, I use a global exception redirect as such:

        

And a tostring on org.apache.struts.action.ERROR = 
{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[The 
site is not configured correctly: Required database configuration data was 
missing.]]}

Now this is all well and good, except my  tag now prints out the 
header, and footer with one prefix and suffix in between (and no error 
message) when the page first loads (from the error redirect).  When there is 
form validation errors everything works fine, however it's just that initial 
redirect where everything goes haywire. 

Does anyone know what's going on and/or how to fix?

Cheers
adam

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



Reg. FormBean...

2005-03-03 Thread Iyanu, Rajasekaran

 Hi ,

 To avoid validation, we need to use simple Java bean instead of
subclassing ActionForm. 
 The question is, is it possible to keep an Action mapping without using
any Form bean mapping in struts-config xml..?

 Can anyone pls help..?

Thanks and Regards
Rajasekaran Iyanu.



Accessing properties in MessageResourcesConfig from PropertyMessageResources

2005-03-03 Thread Per Lovdinger
Info:
  




MyOwnFactory extends PropertyMessageResourcesFactory
MyOwnFactory instansiates MyOwnMessageResources
MyOwnMessageResources extends PropertyMessageResources

MyOwnConfig  extends MessageResourcesConfig
MyOwnConfig has a property called xProp


Problem:
How can my class MyOwnMessageResources access property
in MyOwnConfig ?

Is there a static method somewhere in Struts api ?


thanks in advance
Per




__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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



Re: direction of effort request please?

2005-03-03 Thread Joe Germuska
At 4:13 AM -0600 3/3/05, Eddie Bush wrote:
The redirect is your exact problem.  Do something to stop the redirect
and you'll stop your problem.
Still, if there are no errors to display, then the headers shouldn't 
display either.  I have to run, so I may have scanned this too 
superficially, but before Eddie's message came in, I had written the 
below:

At 6:39 PM +1100 3/3/05, Adam Jenkins wrote:
Hi Guys, I'm having some issues with  (I've attached my previous
mail below) that I'm going to write a custom tag to get around.  I was
thinking that if it's a bug, my effort is probably more productively used
fixing the bug than rewriting the functionality, but first I need to know if
it is a bug or not.  Can anyone help me out (feel free to email me directly
for more information)?
This sounds like a bug to me.  Since  is still 
supported, a Bugzilla post would be appropriate and patches would be 
quite welcome!  For expediency, you might also look at using 
 and  together as an 
alternative route to achieve the same results.

Below is a logical equivalent to   Normally when one 
uses , you wouldn't put the header/footer/etc in the 
message resources but would just put them directly into the page, but 
this should be a drop in replacement since you already have that 
content in the message resources.










It might be instructive just to see if this behaves differently.
Joe

Cheers
Adam
previous email
Hi Guys,
I'm trying to come to terms with ...it's working ok, I'm using
the following for prefixes etc:
#error formatting information
errors.header=Some errors occured validating the
form.  Please correct the following errors and try again.
errors.footer=
errors.prefix=
errors.suffix=
Which is working great when there are form validation errors, however, to get
to the page that has the form, I use a global exception redirect as such:

And a tostring on org.apache.struts.action.ERROR =
{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[The
site is not configured correctly: Required database configuration data was
missing.]]}
Now this is all well and good, except my  tag now prints out the
header, and footer with one prefix and suffix in between (and no error
message) when the page first loads (from the error redirect).  When there is
form validation errors everything works fine, however it's just that initial
redirect where everything goes haywire.
Does anyone know what's going on and/or how to fix?
Cheers
adam
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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


Re: direction of effort request please?

2005-03-03 Thread Adam Jenkins
Hi Eddie,

Thanks for your response.  I understand what you're saying about the redirect, 
however my primary confusion comes from the fact that  is 
printing out the error.header error.prefix error.suffix error.footer sequence 
without any error messages (in the case of the exception redirect).  My 
problem is not with the error based redirect, it's with the fact that 
 tag doesn't seem to know how it want's to handle it.  I have 
interrogated the org.apache.struts.action.ERROR object and can see that the 
redirect error is included (with the appropriate messages).  And the fact 
that the error header, prefix, suffix and footer gets printed would indicate 
that the  tag is identifying an error exists also.  But the 
actual error message (which has been validated as existing on the 
org.apache.struts.action.Error object) _only_ gets printed out for validation 
errors (not the global redirect one).  So it seems there is a conflict of 
functional requirements.  Either a global error message is printed through 
the html:errors tag, or it's not (in which case the header information also 
shouldn't be).  Does that make sense or am I completely off base?

So my main drive was to pick one or the other of these two paradigms...to 
either modify  so that it doesn't recognise the global errors, 
or to modify it so that when it does, it actually prints the message...unless 
I'm missing something and there's a third strategy?

On Thu, 3 Mar 2005 09:13 pm, Eddie Bush wrote:
> Errors get saved in the request.  Redirecting gives you a new request
> - thus you have no errors.  Personally, I think it might be nice if
> these were saved in the session, but there has been (as I recall)
> quite some effort not to have to sessions as some folks don't
> like using them.  They're the only thing you have server-side to
> provide continuity across requests though.
>
> I tend to catch exceptions in my action and let them clue me in on
> what errors I need to add.
>
> The redirect is your exact problem.  Do something to stop the redirect
> and you'll stop your problem.
>
> HTH,
>
> Eddie
>
> On Thu, 3 Mar 2005 18:39:39 +1100, Adam Jenkins <[EMAIL PROTECTED]> 
wrote:
> > previous email
>
> 
>
> > form validation errors everything works fine, however it's just that
> > initial redirect where everything goes haywire.
> >
> > Does anyone know what's going on and/or how to fix?
> >
> > Cheers
> > adam
>
> -
> 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: direction of effort request please?

2005-03-03 Thread Adam Jenkins

Thanks Joe,  I thought it might be a bug, however I wanted more confirmation 
before logging it.  I'll log it in bugzilla.

Cheers
Adam

On Thu, 3 Mar 2005 09:18 pm, Joe Germuska wrote:
> At 4:13 AM -0600 3/3/05, Eddie Bush wrote:
> >The redirect is your exact problem.  Do something to stop the redirect
> >and you'll stop your problem.
>
> Still, if there are no errors to display, then the headers shouldn't
> display either.  I have to run, so I may have scanned this too
> superficially, but before Eddie's message came in, I had written the
> below:
>
> At 6:39 PM +1100 3/3/05, Adam Jenkins wrote:
> >Hi Guys, I'm having some issues with  (I've attached my
> > previous mail below) that I'm going to write a custom tag to get around. 
> > I was thinking that if it's a bug, my effort is probably more
> > productively used fixing the bug than rewriting the functionality, but
> > first I need to know if it is a bug or not.  Can anyone help me out (feel
> > free to email me directly for more information)?
>
> This sounds like a bug to me.  Since  is still
> supported, a Bugzilla post would be appropriate and patches would be
> quite welcome!  For expediency, you might also look at using
>  and  together as an
> alternative route to achieve the same results.
>
> Below is a logical equivalent to   Normally when one
> uses , you wouldn't put the header/footer/etc in the
> message resources but would just put them directly into the page, but
> this should be a drop in replacement since you already have that
> content in the message resources.
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> It might be instructive just to see if this behaves differently.
>
> Joe
>
> >Cheers
> >Adam
> >
> >
> >previous email
> >
> >
> >Hi Guys,
> >
> >I'm trying to come to terms with ...it's working ok, I'm
> > using the following for prefixes etc:
> >
> >#error formatting information
> >errors.header=Some errors occured validating
> > the form.  Please correct the following errors and try
> > again. errors.footer=
> >errors.prefix=
> >errors.suffix=
> >
> >Which is working great when there are form validation errors, however, to
> > get to the page that has the form, I use a global exception redirect as
> > such:
> >
> >  > key="mysite.globalerrors.database_config"
> > path="/private/install/ConfigDB.jsp"
> > scope="request"
> > type="com.mysite.utils.DBMissingConfigDataException"/>
> >
> >And a tostring on org.apache.struts.action.ERROR =
> >{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[
> >The site is not configured correctly: Required database configuration data
> > was missing.]]}
> >
> >Now this is all well and good, except my  tag now prints out
> > the header, and footer with one prefix and suffix in between (and no
> > error message) when the page first loads (from the error redirect).  When
> > there is form validation errors everything works fine, however it's just
> > that initial redirect where everything goes haywire.
> >
> >Does anyone know what's going on and/or how to fix?
> >
> >Cheers
> >adam
> >
> >-
> >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: Reg. FormBean...

2005-03-03 Thread Amjad I. Shahrour
You are not required to implement the validate method in actionForm,
also you can turn off validation by configuring validate=false for any
action.

Regards,
Amjad



-Original Message-
From: Iyanu, Rajasekaran [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 12:11 PM
To: Struts Users Mailing List
Subject: Reg. FormBean...


 Hi ,

 To avoid validation, we need to use simple Java bean instead of
subclassing ActionForm. 
 The question is, is it possible to keep an Action mapping without using
any Form bean mapping in struts-config xml..?

 Can anyone pls help..?

Thanks and Regards
Rajasekaran Iyanu.


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



RE: Is there a way to auto-trim String properties in DynaForms?

2005-03-03 Thread CRANFORD, CHRIS
I did this recently.  I simply wrote a base action class which extends
the struts Action class.  Here's the code snippet:

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception {
  if(form!=null) {
trimFormFields(form);
  return(executeAction(mapping,form,request,response));
}

abstract ActionForward executeAction(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception;

protected void trimFormFields(ActionForm form)
throws Exception {
  Map properties = PropertyUtils.describe(form);
  Iterator it = properties.keySet().iterator();
  String property; Object value;
  while(it.hasNext()) {
property = ((String)it.next());
value = PropertyUtils.getSimpleProperty(form,property);
if(value!=null && value instanceof java.lang.String) { 

PropertyUtils.setSimpleProperty(form,property,((String)value).trim());
}
  }
}

So whatever common action logic I want all my actions to perform, I
placed inside of BaseAction's execute() method.  Then I extend the
BaseAction by creating an executeAction body in all subclasses.  Then
when the action is invoked, BaseAction takes care of trimming all form
properties which were defined as string types.  This has been working
quite well for us for sometime now.

Hope this helps,
Chris

 
-Original Message-
From: K.C. Baltz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 12:53 PM
To: Struts Users Mailing List
Subject: Is there a way to auto-trim String properties in DynaForms?


I'm reposting this in the hopes that there is an answer out there.

> It would be really nice if I could programmatically indicate that
> certain fields in a DynaForm should be automatically trimmed of 
> whitespace.  Is there a way to do this?
> Alternatively, is there a way to get the behavior of the "required" 
> validation when using validwhen?  "required" doesn't accept values 
> that are nothing but whitespace whereas there's no way to test for 
> this when using validwhen.

K.C. Baltz

-
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 there a way to auto-trim String properties in DynaForms?

2005-03-03 Thread CRANFORD, CHRIS
I have to say this is a much better approach than my implementation.
Good post.
Chris

-Original Message-
From: Antony Joseph [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 1:30 PM
To: Struts Users Mailing List
Subject: Re: Is there a way to auto-trim String properties in DynaForms?


Struts uses ConverterUtils to populate action forms.

1)Register the string converter which trims leading and trailing spaces
with ConvertUtils. You want to do this during application initialization
in a ServletContextListener or a Struts plugin


TrimStringConverter trimString = new TrimStringConverter();
ConvertUtils.register(trimString, String.class);



2) The class which strips the leading and trailing spaces.

public class TrimStringConverter implements Converter {
/**
 * Trims leading and trailing white spaces.
 * @param type   the type of the class
 * @param value  the value
 * @return   the trimmed string
 */
public Object convert(Class type, Object value) {
if (value == null)
return null;
else
return value.toString().trim();
}
}


- Original Message -
From: "K.C. Baltz" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Subject: Is there a way to auto-trim String properties in DynaForms?
Date: Tue, 01 Mar 2005 09:53:20 -0800

> 
> I'm reposting this in the hopes that there is an answer out there.
> 
> > It would be really nice if I could programmatically indicate that
> > certain fields in a DynaForm should be automatically trimmed of 
> > whitespace.  Is there a way to do this?
> > Alternatively, is there a way to get the behavior of the 
> > "required" validation when using validwhen?  "required" doesn't 
> > accept values that are nothing but whitespace whereas there's no 
> > way to test for this when using validwhen.
> 
> K.C. Baltz
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



Antony Joseph
Available for consulting
http://www.logicden.com

-- 
___
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default
.asp?SRC=lycos10


-
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: Accessing properties in MessageResourcesConfig from PropertyMessageResources

2005-03-03 Thread Niall Pemberton
I don't believe you can do this for a couple of reasons:

1) Although the DTD has a "className" attribute for the 
element, nothing is actually done with it and so you can't actually
configure Struts to use your own custom MessageResourcesConfig
implementation. Take a look at o.a.s.c.ConfigRuleSet - in order for a custom
MessageResourcesConfig it would have to do something with the "className"
attribute to instantiate your custom config - but it doesn't, it always
creates MessageResourcesConfig.

2) If the above issue was resovled, then the second problem  from what I can
see is that the MessageResourcesConfig isn't actually passed to the factory.
ActionServlet initializes the MessagesResources by acessing the
MessageResourcesConfig properties directly. IMO the MessageResourcesConfig
should be available to the MessageResourcesFactory.

You could create a bugzilla ticket for this but a workaround would be to
initialize your property in your custom MessageResources through a Struts
PlugIn.

Niall

- Original Message - 
From: "Per Lovdinger" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 9:45 AM
Subject: Accessing properties in MessageResourcesConfig from
PropertyMessageResources


> Info:
>
>  factory="MyOwnFactory"
> class=MyOwnConfig"
> >
> 
> 
>
> MyOwnFactory extends PropertyMessageResourcesFactory
> MyOwnFactory instansiates MyOwnMessageResources
> MyOwnMessageResources extends PropertyMessageResources
>
> MyOwnConfig  extends MessageResourcesConfig
> MyOwnConfig has a property called xProp
>
>
> Problem:
> How can my class MyOwnMessageResources access property
> in MyOwnConfig ?
>
> Is there a static method somewhere in Struts api ?
>
>
> thanks in advance
> Per



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



Action without ActionForm

2005-03-03 Thread Alistair Young
Is there any way in struts-config.xml to specify an Action that doesn't 
require an ActionForm?
I have:

index.jsp -> link to controller Action -> decides which jsp to display 
-> start.jsp or stop.jsp

start.jsp and stop.jsp just have a form with a button that starts/stops 
a service. So I don't need an ActionForm

I tried:



  

but after the "generic" form bean is used by a previous Action I get:
Cannot retrieve definition for form bean generic on action /Start
do I need a DynaActionForm for every Action that doesn't need an 
ActionForm?

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


Re: Action without ActionForm

2005-03-03 Thread Niall Pemberton
Just don't specify a form (i.e. no name="..." attribute) in your action
mapping

 

 

Niall
- Original Message - 
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm


> Is there any way in struts-config.xml to specify an Action that doesn't
> require an ActionForm?
> I have:
>
> index.jsp -> link to controller Action -> decides which jsp to display
> -> start.jsp or stop.jsp
>
> start.jsp and stop.jsp just have a form with a button that starts/stops
> a service. So I don't need an ActionForm
>
> I tried:
>  type="org.apache.struts.action.DynaActionForm"/>
>
> 
>
> 
>
> but after the "generic" form bean is used by a previous Action I get:
> Cannot retrieve definition for form bean generic on action /Start
>
> do I need a DynaActionForm for every Action that doesn't need an
> ActionForm?



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



Re: direction of effort request please?

2005-03-03 Thread Niall Pemberton
Does the "mysite.globalerrors.database_config" key exist in your application
resources?

Niall

- Original Message - 
From: "Adam Jenkins" <[EMAIL PROTECTED]>
To: ; 
Sent: Thursday, March 03, 2005 7:39 AM
Subject: direction of effort request please?



Hi Guys, I'm having some issues with  (I've attached my
previous
mail below) that I'm going to write a custom tag to get around.  I was
thinking that if it's a bug, my effort is probably more productively used
fixing the bug than rewriting the functionality, but first I need to know if
it is a bug or not.  Can anyone help me out (feel free to email me directly
for more information)?

Cheers
Adam


previous email


Hi Guys,

I'm trying to come to terms with ...it's working ok, I'm using
the following for prefixes etc:

#error formatting information
errors.header=Some errors occured validating
the
form. Please correct the following errors and try again.
errors.footer=
errors.prefix=
errors.suffix=

Which is working great when there are form validation errors, however, to
get
to the page that has the form, I use a global exception redirect as such:



And a tostring on org.apache.struts.action.ERROR =
{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[Th
e
site is not configured correctly: Required database configuration data was
missing.]]}

Now this is all well and good, except my  tag now prints out
the
header, and footer with one prefix and suffix in between (and no error
message) when the page first loads (from the error redirect). When there is
form validation errors everything works fine, however it's just that initial
redirect where everything goes haywire.

Does anyone know what's going on and/or how to fix?

Cheers
adam

-
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]



Posting XML to a Struts app ?

2005-03-03 Thread Markku . Luotamo
Hi,

In order to post xml content to Struts, such as an .../> string from
an IE data island JavaScript component, what kind of custom extensions to
Struts  do I need, if any? The request content would consist of the mere
 tag and the stuff within. The download e.g. GET part would seem easy,
comparable to your usual file download from an Action, but how about upload
(POST) ?

For browser-independent operation, I do have an existing "standard"
implementation using html:file .

//markku





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



Re: Action without ActionForm

2005-03-03 Thread Alistair Young
I tried that but I get:
Cannot retrieve definition for form bean null on action /Start
Alistair
On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
Just don't specify a form (i.e. no name="..." attribute) in your action
mapping
 

 
Niall
- Original Message -
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm

Is there any way in struts-config.xml to specify an Action that 
doesn't
require an ActionForm?
I have:

index.jsp -> link to controller Action -> decides which jsp to display
-> start.jsp or stop.jsp
start.jsp and stop.jsp just have a form with a button that 
starts/stops
a service. So I don't need an ActionForm

I tried:


   

but after the "generic" form bean is used by a previous Action I get:
Cannot retrieve definition for form bean generic on action /Start
do I need a DynaActionForm for every Action that doesn't need an
ActionForm?

-
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: direction of effort request please?

2005-03-03 Thread David Suarez
I don't know how global exceptions work in struts-config, do they add a
key value to the "Message".  If so, what would it be?  Sounds like an
exception/message is there but there is no matching description in the
resource files.  If you can figure out the key that is added in that
case (put in a debug scriptlet to see what it is set as), you should be
able to try to add a message in your resources file and have html:errors
work.

Regards...djsuarez

-Original Message-
From: Adam Jenkins [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 3:14 AM
To: dev@struts.apache.org
Cc: Joe Germuska; user@struts.apache.org
Subject: Re: direction of effort request please?


Thanks Joe,  I thought it might be a bug, however I wanted more
confirmation 
before logging it.  I'll log it in bugzilla.

Cheers
Adam

On Thu, 3 Mar 2005 09:18 pm, Joe Germuska wrote:
> At 4:13 AM -0600 3/3/05, Eddie Bush wrote:
> >The redirect is your exact problem.  Do something to stop the
redirect
> >and you'll stop your problem.
>
> Still, if there are no errors to display, then the headers shouldn't
> display either.  I have to run, so I may have scanned this too
> superficially, but before Eddie's message came in, I had written the
> below:
>
> At 6:39 PM +1100 3/3/05, Adam Jenkins wrote:
> >Hi Guys, I'm having some issues with  (I've attached my
> > previous mail below) that I'm going to write a custom tag to get
around. 
> > I was thinking that if it's a bug, my effort is probably more
> > productively used fixing the bug than rewriting the functionality,
but
> > first I need to know if it is a bug or not.  Can anyone help me out
(feel
> > free to email me directly for more information)?
>
> This sounds like a bug to me.  Since  is still
> supported, a Bugzilla post would be appropriate and patches would be
> quite welcome!  For expediency, you might also look at using
>  and  together as an
> alternative route to achieve the same results.
>
> Below is a logical equivalent to   Normally when one
> uses , you wouldn't put the header/footer/etc in the
> message resources but would just put them directly into the page, but
> this should be a drop in replacement since you already have that
> content in the message resources.
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> It might be instructive just to see if this behaves differently.
>
> Joe
>
> >Cheers
> >Adam
> >
> >
> >previous email
> >
> >
> >Hi Guys,
> >
> >I'm trying to come to terms with ...it's working ok,
I'm
> > using the following for prefixes etc:
> >
> >#error formatting information
> >errors.header=Some errors occured
validating
> > the form.  Please correct the following errors and try
> > again. errors.footer=
> >errors.prefix=
> >errors.suffix=
> >
> >Which is working great when there are form validation errors,
however, to
> > get to the page that has the form, I use a global exception redirect
as
> > such:
> >
> >  > key="mysite.globalerrors.database_config"
> > path="/private/install/ConfigDB.jsp"
> > scope="request"
> > type="com.mysite.utils.DBMissingConfigDataException"/>
> >
> >And a tostring on org.apache.struts.action.ERROR =
>
>{mysite.globalerrors.database_config=[mysite.globalerrors.database_conf
ig[
> >The site is not configured correctly: Required database configuration
data
> > was missing.]]}
> >
> >Now this is all well and good, except my  tag now
prints out
> > the header, and footer with one prefix and suffix in between (and no
> > error message) when the page first loads (from the error redirect).
When
> > there is form validation errors everything works fine, however it's
just
> > that initial redirect where everything goes haywire.
> >
> >Does anyone know what's going on and/or how to fix?
> >
> >Cheers
> >adam
> >
> >-
> >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: Action without ActionForm

2005-03-03 Thread Fogleson, Allen
In the page with the button are you using  ??? if so you MUST
have a form, you can get around this of course by not using .

Al


-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm

I tried that but I get:
Cannot retrieve definition for form bean null on action /Start

Alistair

On 3 Mar 2005, at 12:54, Niall Pemberton wrote:

> Just don't specify a form (i.e. no name="..." attribute) in your
action
> mapping
>
>  
> 
>  
>
> Niall
> - Original Message -
> From: "Alistair Young" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, March 03, 2005 12:45 PM
> Subject: Action without ActionForm
>
>
>> Is there any way in struts-config.xml to specify an Action that 
>> doesn't
>> require an ActionForm?
>> I have:
>>
>> index.jsp -> link to controller Action -> decides which jsp to
display
>> -> start.jsp or stop.jsp
>>
>> start.jsp and stop.jsp just have a form with a button that 
>> starts/stops
>> a service. So I don't need an ActionForm
>>
>> I tried:
>> > type="org.apache.struts.action.DynaActionForm"/>
>>
>> 
>>
>> 
>>
>> but after the "generic" form bean is used by a previous Action I get:
>> Cannot retrieve definition for form bean generic on action /Start
>>
>> do I need a DynaActionForm for every Action that doesn't need an
>> ActionForm?
>
>
>
> -
> 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: Action without ActionForm

2005-03-03 Thread Alistair Young
ah, ok. Yes, I'm using  as I want a button rather than a 
link. Is there any way I can get a button's onClick to load an Action 
without an ActionForm?

thanks,
Alistair
On 3 Mar 2005, at 14:01, Fogleson, Allen wrote:
In the page with the button are you using  ??? if so you 
MUST
have a form, you can get around this of course by not using 
.

Al
-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
I tried that but I get:
Cannot retrieve definition for form bean null on action /Start
Alistair
On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
Just don't specify a form (i.e. no name="..." attribute) in your
action
mapping
 
/>
 
Niall
- Original Message -
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm

Is there any way in struts-config.xml to specify an Action that
doesn't
require an ActionForm?
I have:
index.jsp -> link to controller Action -> decides which jsp to
display
-> start.jsp or stop.jsp
start.jsp and stop.jsp just have a form with a button that
starts/stops
a service. So I don't need an ActionForm
I tried:


   />

but after the "generic" form bean is used by a previous Action I get:
Cannot retrieve definition for form bean generic on action /Start
do I need a DynaActionForm for every Action that doesn't need an
ActionForm?

-
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]

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


RE: How to get web.xml to ActionForm via struts?

2005-03-03 Thread Scott Purcell
Thanks David for the email.

A context-param is a top-level param (application scope) that allows one to 
define application, not servlet scope params. Anyway, I will look at the 
"commons digester" and see if that is an option.

Currently just FYI, context params are gotten via the 
ServletContext.getParameter which one can get from the GenericServlet or I 
believe Request... I do not have the javadoc open at this time.

Thanks,
Scott





-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 8:09 PM
To: Scott Purcell; Struts Users Mailing List
Subject: RE: How to get web.xml to ActionForm via struts?


Scott,

You should be able to open the web.xml with the commons digester.  Do you
have an example of your "context-param" from your web.xml and whatever "xml"
objects you nested it inside?  Is it at top-level (directly under "" or inside another component?  I've never used a context-param in
web.xml before so I would need an example to help further.

Regards,
David

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 9:13 AM
To: user@struts.apache.org
Subject: How to get web.xml to ActionForm via struts?


Hello,

I have ran into a snag and I hope someone has an answer, or clue on this. I
am using a set of DatabasePooling classes to handle all my database needs. I
store the dbID in the web.xml file as a context-param.  Prior to using
Struts, I would create a bean using 

Re: Hibernate and Struts Usage Pattern question/survey

2005-03-03 Thread N G
On Tue, 1 Mar 2005 17:48:40 -0500, Joe Hertz <[EMAIL PROTECTED]> wrote:
> That is, usually you want the request to begin a transaction early
> and either commit or rollback at the end.

Hmm... I was under the impression that you **always** want to begin
your transaction as late as possible, not early. Sticking something
within a transactional context slows things down as some resources are
locked and can't be shared.

> But SOMETHING has to know when to begin a database transaction and decide to
> roll it back or not. The business objects won't necessarily. 

Well, if you implement something like a Session Facade, that's where
you will know to group several actions into a transaction.

> Since Struts knows when that request begins and ends, I use it to handle it.
> I have it talk to my persistence layer (not necessarily Hibernate. I didn't
> couple myself to it here, there's an encapsulation going on) to do
> initialization and cleanup in a request processor.

I really don't know much about Hibernate yet, but as Chris already
said: "Hibernate is for persistence and should stay in your
persistence layer. Seems wrong that ANY part of Struts should know
about Hibernate at all.

NG

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



Reloading Configuration File

2005-03-03 Thread Scott Purcell
Hello,
 
I was reading from my O'Reilly struts book last night, and it has a section on 
"Reloading The Configuration Files" pp 102. Because I am in development, I am 
constantly updating the config file and I have to keep stopping and starting my 
tomcat, I found the section interesting, but it gives no explanation on how to 
do this. It says one approach is to create a struts action that will 
reinitialize the ActionServlet? 
 
Does this mean I just need to recompile the ActionServlet that came with stuts, 
or do I need to subclass the ActionServlet and compile that. It looks like once 
you compile the ActionServlet, that it will reread the config?
 
Does anyone have any knowledge in this area?
 
Thanks,
 

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


RE: Action without ActionForm

2005-03-03 Thread Scott Purcell
Did you get that in your JSP file? I found that if I use the html:form tag in 
the jsp page in which I use that technique that it errors.

If that is the case, in the JSP page, just use the normal  
and see if the error goes away. 

Scott



-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm


I tried that but I get:
Cannot retrieve definition for form bean null on action /Start

Alistair

On 3 Mar 2005, at 12:54, Niall Pemberton wrote:

> Just don't specify a form (i.e. no name="..." attribute) in your action
> mapping
>
>  
> 
>  
>
> Niall
> - Original Message -
> From: "Alistair Young" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, March 03, 2005 12:45 PM
> Subject: Action without ActionForm
>
>
>> Is there any way in struts-config.xml to specify an Action that 
>> doesn't
>> require an ActionForm?
>> I have:
>>
>> index.jsp -> link to controller Action -> decides which jsp to display
>> -> start.jsp or stop.jsp
>>
>> start.jsp and stop.jsp just have a form with a button that 
>> starts/stops
>> a service. So I don't need an ActionForm
>>
>> I tried:
>> > type="org.apache.struts.action.DynaActionForm"/>
>>
>> 
>>
>> 
>>
>> but after the "generic" form bean is used by a previous Action I get:
>> Cannot retrieve definition for form bean generic on action /Start
>>
>> do I need a DynaActionForm for every Action that doesn't need an
>> ActionForm?
>
>
>
> -
> 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]



chain article

2005-03-03 Thread NetSQL
http://www.onjava.com/lpt/a/5671
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Action without ActionForm

2005-03-03 Thread Alistair Young
thanks Scott, that works but it sort of breaks the insulation of the 
jsp from the site structure:

if Start.do ever moves then all the jsp will have to change.
This would be nice:
" />
but you can't do that :(
cheers,
Alistair

On 3 Mar 2005, at 14:32, Scott Purcell wrote:
Did you get that in your JSP file? I found that if I use the html:form 
tag in the jsp page in which I use that technique that it errors.

If that is the case, in the JSP page, just use the normal  and see if the error goes away.

Scott

-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
I tried that but I get:
Cannot retrieve definition for form bean null on action /Start
Alistair
On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
Just don't specify a form (i.e. no name="..." attribute) in your 
action
mapping

 

 

Niall
- Original Message -
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm

Is there any way in struts-config.xml to specify an Action that
doesn't
require an ActionForm?
I have:
index.jsp -> link to controller Action -> decides which jsp to 
display
-> start.jsp or stop.jsp

start.jsp and stop.jsp just have a form with a button that
starts/stops
a service. So I don't need an ActionForm
I tried:


   


but after the "generic" form bean is used by a previous Action I get:
Cannot retrieve definition for form bean generic on action /Start
do I need a DynaActionForm for every Action that doesn't need an
ActionForm?

-
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]

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


RE: Action without ActionForm

2005-03-03 Thread Fogleson, Allen
Yeap, 

The same way you would with a form, just don't use  use


Al


-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 8:06 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm

ah, ok. Yes, I'm using  as I want a button rather than a 
link. Is there any way I can get a button's onClick to load an Action 
without an ActionForm?

thanks,
Alistair



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



Re: Action without ActionForm

2005-03-03 Thread Niall Pemberton
You can use  - you can specify either a forward, action or
href.

Niall

- Original Message - 
From: "Alistair Young" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, March 03, 2005 2:39 PM
Subject: Re: Action without ActionForm


> thanks Scott, that works but it sort of breaks the insulation of the
> jsp from the site structure:
> 
> if Start.do ever moves then all the jsp will have to change.
> This would be nice:
> " />
> but you can't do that :(
> cheers,
> Alistair



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



Re: Posting XML to a Struts app ?

2005-03-03 Thread Frank W. Zammetti
IIRC, doing something like...



  function sendXML() {
obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("POST", "http://www.nothing.com/page.do";, false);
obj.send(myXML);
  }



My
BookFrank



...will result in the XML being sent as the request's body content, which
means that you should be able to get at it through the request object. 
Just submit to an Action that doesn't use an ActionForm (to avoid
auto-population), and access the XML through request manually.  I don't
think you need any special Struts extensions or anything.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, March 3, 2005 8:21 am, [EMAIL PROTECTED] said:
> Hi,
>
> In order to post xml content to Struts, such as an .../> string from
> an IE data island JavaScript component, what kind of custom extensions to
> Struts  do I need, if any? The request content would consist of the mere
>  tag and the stuff within. The download e.g. GET part would seem
> easy,
> comparable to your usual file download from an Action, but how about
> upload
> (POST) ?
>
> For browser-independent operation, I do have an existing "standard"
> implementation using html:file .
>
> //markku
>
>
>
>
>
> -
> 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: Action without ActionForm

2005-03-03 Thread Niall Pemberton
Forgot the link...

You can use  - you can specify either a forward, action or
href.

http://struts.apache.org/userGuide/struts-html.html#rewrite

 Niall

- Original Message - 
From: "Alistair Young" <[EMAIL PROTECTED]>
Sent: Thursday, March 03, 2005 2:39 PM


> thanks Scott, that works but it sort of breaks the insulation of the
> jsp from the site structure:
> 
> if Start.do ever moves then all the jsp will have to change.
> This would be nice:
> " />
> but you can't do that :(
> cheers,
> Alistair



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



RE: Action without ActionForm

2005-03-03 Thread Scott Purcell
Maybe .. how about using a bean of type DynaActionForm?. Therefore you can kind 
of pretend you have a bean, but not really use the bean, and not really have a 
class that you have to manage?

eg:



So in your action, you can call



I don't know if I am accurate, but from what I read abiout the DynaActionForm 
it looks like this may fly.

Scott


-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 8:40 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm


thanks Scott, that works but it sort of breaks the insulation of the 
jsp from the site structure:

if Start.do ever moves then all the jsp will have to change.
This would be nice:
" />
but you can't do that :(
cheers,
Alistair

On 3 Mar 2005, at 14:32, Scott Purcell wrote:

> Did you get that in your JSP file? I found that if I use the html:form 
> tag in the jsp page in which I use that technique that it errors.
>
> If that is the case, in the JSP page, just use the normal  blah> and see if the error goes away.
>
> Scott
>
>
>
> -Original Message-
> From: Alistair Young [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 03, 2005 7:49 AM
> To: Struts Users Mailing List
> Subject: Re: Action without ActionForm
>
>
> I tried that but I get:
> Cannot retrieve definition for form bean null on action /Start
>
> Alistair
>
> On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
>
>> Just don't specify a form (i.e. no name="..." attribute) in your 
>> action
>> mapping
>>
>>  
>> > />
>>  
>>
>> Niall
>> - Original Message -
>> From: "Alistair Young" <[EMAIL PROTECTED]>
>> To: 
>> Sent: Thursday, March 03, 2005 12:45 PM
>> Subject: Action without ActionForm
>>
>>
>>> Is there any way in struts-config.xml to specify an Action that
>>> doesn't
>>> require an ActionForm?
>>> I have:
>>>
>>> index.jsp -> link to controller Action -> decides which jsp to 
>>> display
>>> -> start.jsp or stop.jsp
>>>
>>> start.jsp and stop.jsp just have a form with a button that
>>> starts/stops
>>> a service. So I don't need an ActionForm
>>>
>>> I tried:
>>> >> type="org.apache.struts.action.DynaActionForm"/>
>>>
>>> 
>>>>> />
>>> 
>>>
>>> but after the "generic" form bean is used by a previous Action I get:
>>> Cannot retrieve definition for form bean generic on action /Start
>>>
>>> do I need a DynaActionForm for every Action that doesn't need an
>>> ActionForm?
>>
>>
>>
>> -
>> 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]
>


-
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: Action without ActionForm

2005-03-03 Thread Alistair Young
I tried that but kept getting form not found error. Would you know, 
must have been a typo coz it works now!
thanks,
Alistair

On 3 Mar 2005, at 14:49, Scott Purcell wrote:
Maybe .. how about using a bean of type DynaActionForm?. Therefore you 
can kind of pretend you have a bean, but not really use the bean, and 
not really have a class that you have to manage?

eg:


So in your action, you can call


I don't know if I am accurate, but from what I read abiout the 
DynaActionForm it looks like this may fly.

Scott
-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 8:40 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
thanks Scott, that works but it sort of breaks the insulation of the
jsp from the site structure:

if Start.do ever moves then all the jsp will have to change.
This would be nice:
" />
but you can't do that :(
cheers,
Alistair
On 3 Mar 2005, at 14:32, Scott Purcell wrote:
Did you get that in your JSP file? I found that if I use the html:form
tag in the jsp page in which I use that technique that it errors.
If that is the case, in the JSP page, just use the normal  and see if the error goes away.
Scott

-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
I tried that but I get:
Cannot retrieve definition for form bean null on action /Start
Alistair
On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
Just don't specify a form (i.e. no name="..." attribute) in your
action
mapping
 

 
Niall
- Original Message -
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm

Is there any way in struts-config.xml to specify an Action that
doesn't
require an ActionForm?
I have:
index.jsp -> link to controller Action -> decides which jsp to
display
-> start.jsp or stop.jsp
start.jsp and stop.jsp just have a form with a button that
starts/stops
a service. So I don't need an ActionForm
I tried:


   

but after the "generic" form bean is used by a previous Action I 
get:
Cannot retrieve definition for form bean generic on action /Start

do I need a DynaActionForm for every Action that doesn't need an
ActionForm?

-
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]

-
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: Tool for detecting unclosed resources

2005-03-03 Thread Jesse Alexander (KBSA 21)
Introscope from wily can keep an eye on such resources... (in fact lots of 
resources)
but
it costs a few dollars ;-(

 

regards
Alexander

-Original Message-
From: Yves Sy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 8:44 AM
To: Struts Users Mailing List; Tapestry users
Subject: OT: Tool for detecting unclosed resources

Anybody know a tool for scanning unclosed JDBC resources? I've done a
simple logging facility in my app to keep track of connections in the
pool at runtime but I'm just wondering if there's a less eye-straining
way to do it.. something like a code analyzer of some sort...

Br,
-Yves-

-- 
A bus station is where a bus stops. A train station is where a train
stops. On my desk I have a work station...

-
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: Action without ActionForm

2005-03-03 Thread Alistair Young
arrrgh! I'd actually forgotten the  container! Yes, I can  
now use a DynaActionForm dummy ActionForm!
many thanks for the suggestions, especially the html:rewrite - can use  
that somewhere else.
Alistair

On 3 Mar 2005, at 14:55, Alistair Young wrote:
I tried that but kept getting form not found error. Would you know,  
must have been a typo coz it works now!
thanks,
Alistair

On 3 Mar 2005, at 14:49, Scott Purcell wrote:
Maybe .. how about using a bean of type DynaActionForm?. Therefore  
you can kind of pretend you have a bean, but not really use the bean,  
and not really have a class that you have to manage?

eg:


So in your action, you can call


I don't know if I am accurate, but from what I read abiout the  
DynaActionForm it looks like this may fly.

Scott
-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 8:40 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
thanks Scott, that works but it sort of breaks the insulation of the
jsp from the site structure:

if Start.do ever moves then all the jsp will have to change.
This would be nice:
" />
but you can't do that :(
cheers,
Alistair
On 3 Mar 2005, at 14:32, Scott Purcell wrote:
Did you get that in your JSP file? I found that if I use the  
html:form
tag in the jsp page in which I use that technique that it errors.

If that is the case, in the JSP page, just use the normal  and see if the error goes away.
Scott

-Original Message-
From: Alistair Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 7:49 AM
To: Struts Users Mailing List
Subject: Re: Action without ActionForm
I tried that but I get:
Cannot retrieve definition for form bean null on action /Start
Alistair
On 3 Mar 2005, at 12:54, Niall Pemberton wrote:
Just don't specify a form (i.e. no name="..." attribute) in your
action
mapping
 

 
Niall
- Original Message -
From: "Alistair Young" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 03, 2005 12:45 PM
Subject: Action without ActionForm

Is there any way in struts-config.xml to specify an Action that
doesn't
require an ActionForm?
I have:
index.jsp -> link to controller Action -> decides which jsp to
display
-> start.jsp or stop.jsp
start.jsp and stop.jsp just have a form with a button that
starts/stops
a service. So I don't need an ActionForm
I tried:


   

but after the "generic" form bean is used by a previous Action I  
get:
Cannot retrieve definition for form bean generic on action /Start

do I need a DynaActionForm for every Action that doesn't need an
ActionForm?

 
-
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]

-
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]

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


bean:write and property editor

2005-03-03 Thread delbd
Hello
On an error jsp page, i get from a bean a collection of messages send by the 
process which lead to the error. One of the informations is the Throwable 
which produced the error.

I want the jsp to show the stack trace. I tried to use



(which call error.getThrowable())
But all i get is the throwable message, not the stacktrace.
I saw bean:write uses the propertyeditor of the property to render it's 
output.

My question is, how can i register a propertyeditor for all Throwables so i 
can implement the getAsText() method?

Thanks for help.

-- 
David Delbecq
Royal Meteorological Institute of Belgium 

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



Re: Any traffic simulator/profiler tool available???

2005-03-03 Thread James Neville
Konstantinos Provatas wrote:
I wanna ask if there exists some kind of tool/application that simulates user 
traffic to a web site..
http://opensourcetesting.org/performance.php
We use Seige quite a lot, simple & effective:-
http://www.joedog.org/
James.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: chain article

2005-03-03 Thread Dakota Jack
http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains.html


On Thu, 03 Mar 2005 08:31:37 -0600, NetSQL <[EMAIL PROTECTED]> wrote:
> http://www.onjava.com/lpt/a/5671
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Here's a question for yous...

2005-03-03 Thread Duncan Mills
David - I was going to give a run through on Shale at the Struts London 
Meetup  on the 15th I appreciate you may 
not be able to make it but I'll post the sides up somewhere after the 
event and push that into the Wiki.

Duncan Mills
http://www.groundside.com/blog
David G. Friedman wrote:
Craig,
Is there a tutorial or walk-through explaining Shale?  I didn't see that in
the nightly download.  I have no clue about JSF and skimming through the
Shale code made little sense to me (at this time).  I.E. Conceptually, I'm
interested but programmatically, it's still over my head for some reason (I
could just be in the wrong place whenever I go look at it).
Regards,
David
-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 1:31 AM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: Here's a question for yous...
On Tue, 01 Mar 2005 00:52:07 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
 

I sometimes wonder if we (the generic we I mean) don't sometimes think
at too high a level... We try to build so much flexibility into our
designs, but every time I hear "a new API" or "a new interface" or
"another abstraction layer" or any of those somewhat similar terms (you
know, the ones spewed forth by enterprise architects ad nauseum!), I
wonder if the cost of the added flexibility isn't too high in terms of
overall complexity.
   

I can appreciate that feeling.  That's why Shale is focused on
(compared to something like classic Struts) *reducing* the number of
abstractions you have to care about:
* No more configuration beans (so developers can configure properties
 on the equivalent of an  and have it do what they really
expected).
* No more form beans (JSF takes care of the reason form beans exist in the
 first place, but lets go further and combine the "form bean" and "action"
 concepts in a thread safe request-scope object, like WebWork does it,
 as well as take advantage of JSF's support for a basic IoC framework
 using the setter injection pattern).
* No more RequestProcessor or corresponding Chain implementation (the
 application developer should think solely about responding to view tier
 events, not how their code fits in to the "big picture".
Of course, there are still use cases where you need traditional "every
request flows through this pipe" sorts of control.  But the current
servlet API provides that for us (javax.servlet.Filter) -- there is no
longer any reason for an application framework to reinvent that sort
of thing.
Craig
-
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: Any traffic simulator/profiler tool available???

2005-03-03 Thread Smith, Thad
Check out JMeter: http://jakarta.apache.org/jmeter/

Great interface and extremely flexible.

Regards,

Thad Smith

-Original Message-
From: Konstantinos Provatas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 3:17 PM
To: user@struts.apache.org
Subject: Any traffic simulator/profiler tool available???

Dear all,

I wanna ask if there exists some kind of tool/application that simulates
user traffic to a web site.
For example a tool that lets you set up 50 users that make certain
requests, post certain form data etc
and of course profile these actions (maybe show charts, too).

Anyway, if no such tool exists, do you think it would be useful to have
one or you have other
approaches in profiling and optimizing your web sites?

--
Thnx in advance,
 Kostas  mailto:[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]



Is it possible to harvest the form values and populate an actionform without submitting the form?

2005-03-03 Thread Adam Lipscombe
Folks,


I have a tricky little problem with Struts 1.1:

I have a form, on which there is a button that starts a wizard in a popup
modal dialog box.
The wizard behaviour depends on some of the values that have already been
entered in the parent form, and when it finishes the parent form is further
populated.


Rather than pass the form values as HTTP params to the wizard, I elected to
perform the backend processing prior to starting the wizard. This ensures
that all the necessary values are computed correctly and would normally be
done by submitting the parent page form. 

But, the backend processing is invoked by the wizard calling a URL as part
of its initialisation. The parent form is not submitted, hence the values
from the parent form are not transferred to the actionform prior to the
backend processing being invoked.


Is there anyway round this? Is it possible to harvest the parent form values
explicitly to ensure that the actionform is populated?


TIA - Adam Lipscombe







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



struts and intelli j

2005-03-03 Thread Suzy Fynes
 
 
Hey,
 
I'm having trouble getting Intelli j to find my struts jar. I've the jar
to the project class path but 
http://struts.apache.org/dtds/struts-config_1_1.dtd";>
 
its not finding the http://struts.ap  ... resource
 
I'm getting the URI is not registered
 
Any ideas why this is?
 
Thanks
Suzy


Re: struts and intelli j

2005-03-03 Thread Hubert Rabago
You have to associate the DTD's URL to a local copy of the file (or at
least that's how I do it).  You can do this through the IDE Settings
(I think the location differs depending on which version you're
using).  In this case, you'd map
"http://struts.apache.org/dtds/struts-config_1_1.dtd"; to the struts
config DTD file.  A copy of this file is in the "lib" directory of
your Struts 1.1 download.

hth,
Hubert

On Thu, 3 Mar 2005 16:18:50 -, Suzy Fynes
<[EMAIL PROTECTED]> wrote:
> 
> 
> Hey,
> 
> I'm having trouble getting Intelli j to find my struts jar. I've the jar
> to the project class path but
>  "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> "http://struts.apache.org/dtds/struts-config_1_1.dtd";>
> 
> its not finding the http://struts.ap  ... resource
> 
> I'm getting the URI is not registered
> 
> Any ideas why this is?
> 
> Thanks
> Suzy
> 
>

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



Re: struts and intelli j

2005-03-03 Thread Alistair Young
yes, I get this all the time, it's an IntelliJ thing. Do this:
this is for a Mac, not sure about Windows:
Preferences -> IDE Settings -> Resources
add http://struts.apache.org/dtds/struts-config_1_1.dtd to the list of 
Ignored Resources

Alistair
On 3 Mar 2005, at 16:18, Suzy Fynes wrote:

Hey,
I'm having trouble getting Intelli j to find my struts jar. I've the 
jar
to the project class path but

"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://struts.apache.org/dtds/struts-config_1_1.dtd";>

its not finding the http://struts.ap  ... resource
I'm getting the URI is not registered
Any ideas why this is?
Thanks
Suzy

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


Re: struts and intelli j

2005-03-03 Thread Hubert Rabago
Why do you choose to have it ignored?  You can point it to an actual
copy of the DTD (which is provided in the Struts download) and you'd
get better XML support from IntelliJ, such as code completion and
checking for required values.


On Thu, 3 Mar 2005 16:25:06 +, Alistair Young
<[EMAIL PROTECTED]> wrote:
> yes, I get this all the time, it's an IntelliJ thing. Do this:
> 
> this is for a Mac, not sure about Windows:
> Preferences -> IDE Settings -> Resources
> add http://struts.apache.org/dtds/struts-config_1_1.dtd to the list of
> Ignored Resources
> 
> Alistair
> 
> 
> On 3 Mar 2005, at 16:18, Suzy Fynes wrote:
> 
> >
> >
> > Hey,
> >
> > I'm having trouble getting Intelli j to find my struts jar. I've the
> > jar
> > to the project class path but
> >  > "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> > "http://struts.apache.org/dtds/struts-config_1_1.dtd";>
> >
> > its not finding the http://struts.ap  ... resource
> >
> > I'm getting the URI is not registered
> >
> > Any ideas why this is?
> >
> > Thanks
> > Suzy
> 
> -
> 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: struts and intelli j

2005-03-03 Thread Alistair Young
I saw your reply too late Hubert - I'll do that instead! I usually 
ignore as I don't have a copy of the resources.
Alistair

On 3 Mar 2005, at 16:30, Hubert Rabago wrote:
Why do you choose to have it ignored?  You can point it to an actual
copy of the DTD (which is provided in the Struts download) and you'd
get better XML support from IntelliJ, such as code completion and
checking for required values.
On Thu, 3 Mar 2005 16:25:06 +, Alistair Young
<[EMAIL PROTECTED]> wrote:
yes, I get this all the time, it's an IntelliJ thing. Do this:
this is for a Mac, not sure about Windows:
Preferences -> IDE Settings -> Resources
add http://struts.apache.org/dtds/struts-config_1_1.dtd to the list of
Ignored Resources
Alistair
On 3 Mar 2005, at 16:18, Suzy Fynes wrote:

Hey,
I'm having trouble getting Intelli j to find my struts jar. I've the
jar
to the project class path but
http://struts.apache.org/dtds/struts-config_1_1.dtd";>
its not finding the http://struts.ap  ... resource
I'm getting the URI is not registered
Any ideas why this is?
Thanks
Suzy
-
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: struts and intelli j

2005-03-03 Thread Suzy Fynes
How do I map it?

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: 03 March 2005 16:23
To: Struts Users Mailing List
Subject: Re: struts and intelli j

You have to associate the DTD's URL to a local copy of the file (or at
least that's how I do it).  You can do this through the IDE Settings
(I think the location differs depending on which version you're
using).  In this case, you'd map
"http://struts.apache.org/dtds/struts-config_1_1.dtd"; to the struts
config DTD file.  A copy of this file is in the "lib" directory of
your Struts 1.1 download.

hth,
Hubert

On Thu, 3 Mar 2005 16:18:50 -, Suzy Fynes
<[EMAIL PROTECTED]> wrote:
> 
> 
> Hey,
> 
> I'm having trouble getting Intelli j to find my struts jar. I've the
jar
> to the project class path but
>  "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> "http://struts.apache.org/dtds/struts-config_1_1.dtd";>
> 
> its not finding the http://struts.ap  ... resource
> 
> I'm getting the URI is not registered
> 
> Any ideas why this is?
> 
> Thanks
> Suzy
> 
>

-
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]



Remove Tiles Component

2005-03-03 Thread Ben Taylor
I know there have been a few Tiles related question recently, but
having read them I still can't figure out how to solve my problem.

At current I'm using:
 
... within a few of my JSPs.  The position of this component within
the document changes for each JSP file so I can not create a new
layout file for it.

This is my current tiles-def file:
 
   
   
 

I'd like to be able to add an extra line to the above base definition
(.pub.welcome) along the lines of:
 
... and then be able to insert that page within a number of my
(content) JSP files.

I've tried using  but it doesn't work. :-(

Can anyone suggest a method that might work?

Thank you.

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



Re: Is it possible to harvest the form values and populate an actionform without submitting the form?

2005-03-03 Thread Frank W. Zammetti
I think some scripting would be in order...

If I understand correctly... when the button on your parent form is
clicked, a modal dialog is opened and the URL you tell that dialog to
display is actually an Action that does some initialization.  Is that
correct?

Assuming it is... what I would do is instead of putting your
initialization URL in there, instead put a, shall we say,
"pre-initialization" URL.  This would return a page with nothing but a
Javascript function and a form with all hidden fields.  The function would
be called in response to the onLoad even.  The function would grab the
form elements you need from the parent form (via window.opener syntax),
populate the form on that page, and then submit the form to your real
initialization Actino.  You would then have the elements from the parent
you need to do your initialization, and THEN display the first page of the
wizard to the user.

Another option (maybe) to save the first trip to the server... I don't
remember off the top of my head if you can write the document in a modal
dialog like you can a typical popup window (I'm thinking not, but I'm not
sure).  If you CAN do that, than instead of calling on the server to do
the pre-initialization, you can dynamically write out the document via
Javascript.  If that isn't possible though, then the first approach would
still work.

Does that sound like something that might work in your scenario?

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, March 3, 2005 11:09 am, Adam Lipscombe said:
> Folks,
>
>
> I have a tricky little problem with Struts 1.1:
>
> I have a form, on which there is a button that starts a wizard in a popup
> modal dialog box.
> The wizard behaviour depends on some of the values that have already been
> entered in the parent form, and when it finishes the parent form is
> further
> populated.
>
>
> Rather than pass the form values as HTTP params to the wizard, I elected
> to
> perform the backend processing prior to starting the wizard. This ensures
> that all the necessary values are computed correctly and would normally be
> done by submitting the parent page form.
>
> But, the backend processing is invoked by the wizard calling a URL as part
> of its initialisation. The parent form is not submitted, hence the values
> from the parent form are not transferred to the actionform prior to the
> backend processing being invoked.
>
>
> Is there anyway round this? Is it possible to harvest the parent form
> values
> explicitly to ensure that the actionform is populated?
>
>
> TIA - Adam Lipscombe
>
>
>
>
>
>
>
> -
> 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: struts and intelli j

2005-03-03 Thread Suzy Fynes

Great worked grand!

Thanks
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: 03 March 2005 16:23
To: Struts Users Mailing List
Subject: Re: struts and intelli j

You have to associate the DTD's URL to a local copy of the file (or at
least that's how I do it).  You can do this through the IDE Settings
(I think the location differs depending on which version you're
using).  In this case, you'd map
"http://struts.apache.org/dtds/struts-config_1_1.dtd"; to the struts
config DTD file.  A copy of this file is in the "lib" directory of
your Struts 1.1 download.

hth,
Hubert

On Thu, 3 Mar 2005 16:18:50 -, Suzy Fynes
<[EMAIL PROTECTED]> wrote:
> 
> 
> Hey,
> 
> I'm having trouble getting Intelli j to find my struts jar. I've the
jar
> to the project class path but
>  "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> "http://struts.apache.org/dtds/struts-config_1_1.dtd";>
> 
> its not finding the http://struts.ap  ... resource
> 
> I'm getting the URI is not registered
> 
> Any ideas why this is?
> 
> Thanks
> Suzy
> 
>

-
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 harvest the form values and populate an act ionform without submitting the form?

2005-03-03 Thread Paul McCulloch
Could the button on your parent submit the form to the backend with a new
popup windows defined as the "target" attribute (of the html form)? That way
your main form values are sent to the backend, but the results (i.e. your
wizard) is shown in the popup window.

Paul

> -Original Message-
> From: Adam Lipscombe [mailto:[EMAIL PROTECTED]
> Sent: 03 March 2005 16:10
> To: 'Struts Users Mailing List'
> Subject: Is it possible to harvest the form values and populate an
> actionform without submitting the form?
> 
> 
> Folks,
> 
> 
> I have a tricky little problem with Struts 1.1:
> 
> I have a form, on which there is a button that starts a 
> wizard in a popup
> modal dialog box.
> The wizard behaviour depends on some of the values that have 
> already been
> entered in the parent form, and when it finishes the parent 
> form is further
> populated.
> 
> 
> Rather than pass the form values as HTTP params to the 
> wizard, I elected to
> perform the backend processing prior to starting the wizard. 
> This ensures
> that all the necessary values are computed correctly and 
> would normally be
> done by submitting the parent page form. 
> 
> But, the backend processing is invoked by the wizard calling 
> a URL as part
> of its initialisation. The parent form is not submitted, 
> hence the values
> from the parent form are not transferred to the actionform 
> prior to the
> backend processing being invoked.
> 
> 
> Is there anyway round this? Is it possible to harvest the 
> parent form values
> explicitly to ensure that the actionform is populated?
> 
> 
> TIA - Adam Lipscombe
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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



Re: Struts and EJB integration question?

2005-03-03 Thread Erik Weber
leonnewsgroup wrote:
Thanks for your reply.
It is better to use a delegate or a manage layer than use a Struts
Action class. And I want to make sure that when I implement the delegate or
manage layer, I shouldn't use J2EE instead of POJO, it is correct?
Tim
 

Well, a facade is supposed to be a black box, so you shouldn't have to, 
for example, do an EJB lookup, to use the facade. It's supposed to be 
easily accessible from any implementations of the next higher layer (in 
other words, it makes stuff pluggable).

By the way, I would also like to say that adding layers and decoupling, 
a widely used and useful technique, doesn't always work or make sense. 
Rick Reumann was arguing not that long ago on another thread that 
sometimes trying to get HTTP knowledge out of web app components is more 
trouble than it's worth. Well, in similar vein, I have had success 
building a (graphical) interface basically right on top of a network 
protocol (I'm not speaking of HTTP in this case though). Sometimes an 
event-driven interface (dialogs that react to packet arrivals) is just 
the easiest and fastest way to go. I still think you should exercise 
your brain (what happens when I do/don't want EJB here anymore, what 
happens when I introduce a different type of interface, what happens 
when I change persistence techniques, what happens when I change from a 
stateless to a stateful protocol, what happens when I switch from Struts 
to Webwork  >:o , etc.), but I avoid adding abstractions until 
prototyping/whiteboarding fleshes out the need for them. Always Be 
Prototyping! You'll always have a working version of your app that way, 
and your best design will actually come from having tried all the 
runners-up, rather than just your imagination.

Erik

- Original Message - 
From: "Erik Weber" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 01, 2005 5:03 PM
Subject: Re: Struts and EJB integration question?

 

I think it depends on your service locator design and API. The goals are
ease of maintenance, reusability/decoupling and performance. Is the
extra layer going to facilitate reuse of your service locator/EJBs? If
so then it's probably worth it because it probably won't cost much in
terms of maintenance and performance (depends on your infrastructure of
course). Might you have other services that don't require the service
locator API or a different service locator API? If that's the case,
again, you'd probably want to have Struts talk to a "manager layer"
component (or as Robert Taylor suggests -- an app-specific delegate
right in front of the manager layer component), and let this component
find and use services directly, etc. This shields Struts from disparate
APIs.
Erik
leonnewsgroup wrote:
   

Hi there,
I am building a Struts based application with EJB model. I want to know
 

the
 

strategy of find and call the EJBs in model layer. My model layer is
implemented by a stateless or stateful session bean that accesses to
 

entity
 

beans. and there is a service locator object to find the session beans.
 

My
 

questions are where to put the code to use the service loactor to find
 

the
 

session beans? is it in the Struts Action classes or another delegate
 

class?
 

Thanks.
Tim
-
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]
 

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


RE: Is it possible to harvest the form values and populate an

2005-03-03 Thread Adam Lipscombe
Frank, 

Your understanding of my problem is spot on.
The first approach you suggest sounds good and appropriate -  I will give it
a go. 

Many thanks...


Adam


-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: 03 March 2005 16:56
To: Struts Users Mailing List
Subject: Re: Is it possible to harvest the form values and populate an


I think some scripting would be in order...

If I understand correctly... when the button on your parent form is clicked,
a modal dialog is opened and the URL you tell that dialog to display is
actually an Action that does some initialization.  Is that correct?

Assuming it is... what I would do is instead of putting your initialization
URL in there, instead put a, shall we say, "pre-initialization" URL.  This
would return a page with nothing but a Javascript function and a form with
all hidden fields.  The function would be called in response to the onLoad
even.  The function would grab the form elements you need from the parent
form (via window.opener syntax), populate the form on that page, and then
submit the form to your real initialization Actino.  You would then have the
elements from the parent you need to do your initialization, and THEN
display the first page of the wizard to the user.

Another option (maybe) to save the first trip to the server... I don't
remember off the top of my head if you can write the document in a modal
dialog like you can a typical popup window (I'm thinking not, but I'm not
sure).  If you CAN do that, than instead of calling on the server to do the
pre-initialization, you can dynamically write out the document via
Javascript.  If that isn't possible though, then the first approach would
still work.

Does that sound like something that might work in your scenario?

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, March 3, 2005 11:09 am, Adam Lipscombe said:
> Folks,
>
>
> I have a tricky little problem with Struts 1.1:
>
> I have a form, on which there is a button that starts a wizard in a 
> popup modal dialog box. The wizard behaviour depends on some of the 
> values that have already been entered in the parent form, and when it 
> finishes the parent form is further
> populated.
>
>
> Rather than pass the form values as HTTP params to the wizard, I 
> elected to perform the backend processing prior to starting the 
> wizard. This ensures that all the necessary values are computed 
> correctly and would normally be done by submitting the parent page 
> form.
>
> But, the backend processing is invoked by the wizard calling a URL as 
> part of its initialisation. The parent form is not submitted, hence 
> the values from the parent form are not transferred to the actionform 
> prior to the backend processing being invoked.
>
>
> Is there anyway round this? Is it possible to harvest the parent form 
> values explicitly to ensure that the actionform is populated?
>
>
> TIA - Adam Lipscombe
>
>
>
>
>
>
>
> -
> 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]



How can I forward from an Action to a URL outside application

2005-03-03 Thread Jim Theodoridis
Hi
I want to forward from an action to a url outside the application
I am having the followin entry at struts-config.xml
  
   
   type="gr.tera.teramobile.actions.FarmacyAction">
   http://www.tera.gr"/>
   

by i am getting the error
java.lang.IllegalArgumentException: Path www.tera.gr does not start with a "/" 
character

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)

Is there any way to do this?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How can I forward from an Action to a URL outside application

2005-03-03 Thread Jim Theodoridis
Sorry.
It is so simply i found it.
Jim Theodoridis wrote:
Hi
I want to forward from an action to a url outside the application
I am having the followin entry at struts-config.xml
 
   http://www.tera.gr"/>
   
by i am getting the error
java.lang.IllegalArgumentException: Path www.tera.gr does not start 
with a "/" character
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) 


Is there any way to do this?
-
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: How can I forward from an Action to a URL outside application

2005-03-03 Thread Günther Wieser
tell us more! 

how did you do it?

-Original Message-
From: Jim Theodoridis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 6:41 PM
To: Struts Users Mailing List
Subject: Re: How can I forward from an Action to a URL outside application

Sorry.

It is so simply i found it.

Jim Theodoridis wrote:

> Hi
>
> I want to forward from an action to a url outside the application I am 
> having the followin entry at struts-config.xml
>
>  type="gr.tera.teramobile.actions.FarmacyAction">
>http://www.tera.gr"/>
>
>
> by i am getting the error
>
> java.lang.IllegalArgumentException: Path www.tera.gr does not start 
> with a "/" character
> 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j
> ava:1062)
>
>
> 
>
> Is there any way to do this?
>
>
> -
> 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]



Validator date problem

2005-03-03 Thread Michael Oliver
I have read the Validator User Guide as well as chapter 12 in Struts In
Action.

I am trying to get a validator to validate a date field with no success.
When I post the form with "02/30/2005" or "02/33/2005" or "02/30/xyz"
it goes through without catching the bad date.

If however I do not put a 'name' field entry or a date entry at all, I
do get the javascript alert "required field" as expected.

Server side debugging, during the SaveAssignmentForm action the
AssignmentForm.validate() is called and the ActionErrors errs value is
not null which tells me it tried to validate, but there are no messages.


I have used SimpleDateFormat.parse("02/30/2005") in a separate test
script and it throws an exception as expected.

Using Struts 1.1

Snippets from my sources...

---
AssignmentForm.java

public class AssignmentForm extends ValidatorActionForm {

private String assignedDate;
.

   public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest request) {
ActionErrors errs = super.validate(actionMapping,
request);

return errs;
}
.
standard getter and setter for assignedDate.

---
AssignmentForm.jsp



...






struts-config.xml


   

...

  
 

---
validator-rules.xml - unchanged from distribution
---
validation.xml











datePattern
MM/dd/







What did I miss or where should I look now.


Michael Oliver
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(520)844-1036
*Note new email changed from [EMAIL PROTECTED]



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



Re: Reloading Configuration File

2005-03-03 Thread Jerry Tan

Scott,

I haven't looked at that section lately, but I would imagine you can handle
this by creating a separate action (e.g., ReloadAction) which just calls
the init method of the ActionServlet.

Whenever you'd like to reload the config file, then just go to the jsp that
you've mapped for ReloadAction, and then that ought to do the trick.

hth




   
  "Scott Purcell"   
   
  <[EMAIL PROTECTED]To:   
  
  nc.com>  cc:   (bcc: Jerry Tan/DTCC)  
   
   Subject:  Reloading 
Configuration File  
  03/03/2005 09:30  
   
  AM
   
  Please respond to 
   
  "Struts Users 
   
  Mailing List" 
   

   




Hello,

I was reading from my O'Reilly struts book last night, and it has a section
on "Reloading The Configuration Files" pp 102. Because I am in development,
I am constantly updating the config file and I have to keep stopping and
starting my tomcat, I found the section interesting, but it gives no
explanation on how to do this. It says one approach is to create a struts
action that will reinitialize the ActionServlet?

Does this mean I just need to recompile the ActionServlet that came with
stuts, or do I need to subclass the ActionServlet and compile that. It
looks like once you compile the ActionServlet, that it will reread the
config?

Does anyone have any knowledge in this area?

Thanks,


Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com <
http://www.vertisinc.com/>

Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.








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



Re: passing attributes to tiles

2005-03-03 Thread Jonathan M Z
Sorry I meant attributes .  How do I pass and get them
from struts?

--- [EMAIL PROTECTED] wrote:
> If you mean HTTP request parameters, then they are
> accessible from all JSP
> pages included in a Tiles definition, since they
> share the same HTTP
> request.
> But remember that it is not a good practice. It is
> better to use an Action
> that, eventually, puts some beans in the request
> scope and then you access
> those beans in the JSP pages.
> Ciao
> Antonio Petrelli
> 
> Jonathan M Z wrote:
> 
> >I am using tiles as the following:
> >
> >  >value="/calc/AssessmentCalcMain.jsp"/>
> > 
> >
> >
> >However I wish to pass parameters to nav.jsp.  how
> do
> >I do this?
> >thanks
> >
> >
> >
> >
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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



Re-initialize ActionServlet Help

2005-03-03 Thread Scott Purcell
Hello,
I posted this earlier today and could really use some help here. As I am 
developing I have to keep stopping and re-starting my tomcat, and it is killing 
me. I am on Tomcat 4.0xxx and don't have time to go to 5, where I think 
individual web-apps can be restarted.

Anyway, if anyone knows of any way to reinitialize the ActionServlet to re-read 
the struts-config.xml file, please, please let me know.

Thanks,
Scott







-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 8:30 AM
To: user@struts.apache.org
Subject: Reloading Configuration File


Hello,
 
I was reading from my O'Reilly struts book last night, and it has a section on 
"Reloading The Configuration Files" pp 102. Because I am in development, I am 
constantly updating the config file and I have to keep stopping and starting my 
tomcat, I found the section interesting, but it gives no explanation on how to 
do this. It says one approach is to create a struts action that will 
reinitialize the ActionServlet? 
 
Does this mean I just need to recompile the ActionServlet that came with stuts, 
or do I need to subclass the ActionServlet and compile that. It looks like once 
you compile the ActionServlet, that it will reread the config?
 
Does anyone have any knowledge in this area?
 
Thanks,
 

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 

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



Re: direction of effort request please?

2005-03-03 Thread Adam Jenkins
Yep, and it's loaded ok as you can see it in the toString on the errors 
object:

> And a tostring on org.apache.struts.action.ERROR =
> {mysite.globalerrors.database_config=[mysite.globalerrors.database_config[T
>h e
> site is not configured correctly: Required database configuration data was
> missing.]]}






On Fri, 4 Mar 2005 12:16 am, Niall Pemberton wrote:
> Does the "mysite.globalerrors.database_config" key exist in your
> application resources?
>
> Niall
>
> - Original Message -
> From: "Adam Jenkins" <[EMAIL PROTECTED]>
> To: ; 
> Sent: Thursday, March 03, 2005 7:39 AM
> Subject: direction of effort request please?
>
>
>
> Hi Guys, I'm having some issues with  (I've attached my
> previous
> mail below) that I'm going to write a custom tag to get around.  I was
> thinking that if it's a bug, my effort is probably more productively used
> fixing the bug than rewriting the functionality, but first I need to know
> if it is a bug or not.  Can anyone help me out (feel free to email me
> directly for more information)?
>
> Cheers
> Adam
>
>
> previous email
>
>
> Hi Guys,
>
> I'm trying to come to terms with ...it's working ok, I'm
> using the following for prefixes etc:
>
> #error formatting information
> errors.header=Some errors occured validating
> the
> form. Please correct the following errors and try again.
> errors.footer=
> errors.prefix=
> errors.suffix=
>
> Which is working great when there are form validation errors, however, to
> get
> to the page that has the form, I use a global exception redirect as such:
>
>  key="mysite.globalerrors.database_config"
> path="/private/install/ConfigDB.jsp"
> scope="request"
> type="com.mysite.utils.DBMissingConfigDataException"/>
>
> And a tostring on org.apache.struts.action.ERROR =
> {mysite.globalerrors.database_config=[mysite.globalerrors.database_config[T
>h e
> site is not configured correctly: Required database configuration data was
> missing.]]}
>
> Now this is all well and good, except my  tag now prints out
> the
> header, and footer with one prefix and suffix in between (and no error
> message) when the page first loads (from the error redirect). When there is
> form validation errors everything works fine, however it's just that
> initial redirect where everything goes haywire.
>
> Does anyone know what's going on and/or how to fix?
>
> Cheers
> adam
>
> -
> 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: Validator date problem

2005-03-03 Thread Joe Hertz
If you want the validator to pick it up based on the Form name (as opposed
to the Action Path name) you should use a ValidatorForm instead of a
ValidatorActionForm.

You might need to use datePatternStrict too. There's some (or used to be
anyway) some weirdness with the javascript not catching it unless you used
it.


> -Original Message-
> From: Michael Oliver [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 03, 2005 12:58 PM
> To: struts-user@jakarta.apache.org
> Subject: Validator date problem
> 
> I have read the Validator User Guide as well as chapter 12 in Struts In
> Action.
> 
> I am trying to get a validator to validate a date field with no success.
> When I post the form with "02/30/2005" or "02/33/2005" or "02/30/xyz"
> it goes through without catching the bad date.
> 
> If however I do not put a 'name' field entry or a date entry at all, I
> do get the javascript alert "required field" as expected.
> 
> Server side debugging, during the SaveAssignmentForm action the
> AssignmentForm.validate() is called and the ActionErrors errs value is
> not null which tells me it tried to validate, but there are no messages.
> 
> 
> I have used SimpleDateFormat.parse("02/30/2005") in a separate test
> script and it throws an exception as expected.
> 
> Using Struts 1.1
> 
> Snippets from my sources...
> 
> ---
> AssignmentForm.java
> 
> public class AssignmentForm extends ValidatorActionForm {
> 
>   private String assignedDate;
> .
> 
>public ActionErrors validate(ActionMapping actionMapping,
> HttpServletRequest request) {
>   ActionErrors errs = super.validate(actionMapping,
> request);
> 
>   return errs;
>   }
> .
> standard getter and setter for assignedDate.
> 
> ---
> AssignmentForm.jsp
> 
> 
> 
> ...
>  onsubmit="validateAssignmentForm(this)">
> 
> 
> 
> 
> 
> struts-config.xml
> 
> scope="request"
>type="com.alarius.assignments.actions.SaveAssignmentForm"
> validate="true">
>
> 
> ...
> 
>value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>
>  
> 
> ---
> validator-rules.xml - unchanged from distribution
> ---
> validation.xml
> 
> 
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   datePattern
>   MM/dd/
>   
>   
>   
>   
> 
> 
> 
> What did I miss or where should I look now.
> 
> 
> Michael Oliver
> Alarius Systems LLC
> 3325 N. Nellis Blvd, #1
> Las Vegas, NV 89115
> Phone:(702)643-7425
> Fax:(520)844-1036
> *Note new email changed from [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: Validator date problem

2005-03-03 Thread Joe Hertz
If you want the validator to pick it up based on the Form name (as opposed
to the Action Path name) you should use a ValidatorForm instead of a
ValidatorActionForm.

You might need to use datePatternStrict too. There's some (or used to be
anyway) some weirdness with the javascript not catching it unless you used
it.


> -Original Message-
> From: Michael Oliver [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 03, 2005 12:58 PM
> To: struts-user@jakarta.apache.org
> Subject: Validator date problem
> 
> I have read the Validator User Guide as well as chapter 12 in Struts In
> Action.
> 
> I am trying to get a validator to validate a date field with no success.
> When I post the form with "02/30/2005" or "02/33/2005" or "02/30/xyz"
> it goes through without catching the bad date.
> 
> If however I do not put a 'name' field entry or a date entry at all, I
> do get the javascript alert "required field" as expected.
> 
> Server side debugging, during the SaveAssignmentForm action the
> AssignmentForm.validate() is called and the ActionErrors errs value is
> not null which tells me it tried to validate, but there are no messages.
> 
> 
> I have used SimpleDateFormat.parse("02/30/2005") in a separate test
> script and it throws an exception as expected.
> 
> Using Struts 1.1
> 
> Snippets from my sources...
> 
> ---
> AssignmentForm.java
> 
> public class AssignmentForm extends ValidatorActionForm {
> 
>   private String assignedDate;
> .
> 
>public ActionErrors validate(ActionMapping actionMapping,
> HttpServletRequest request) {
>   ActionErrors errs = super.validate(actionMapping,
> request);
> 
>   return errs;
>   }
> .
> standard getter and setter for assignedDate.
> 
> ---
> AssignmentForm.jsp
> 
> 
> 
> ...
>  onsubmit="validateAssignmentForm(this)">
> 
> 
> 
> 
> 
> struts-config.xml
> 
> scope="request"
>type="com.alarius.assignments.actions.SaveAssignmentForm"
> validate="true">
>
> 
> ...
> 
>value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>
>  
> 
> ---
> validator-rules.xml - unchanged from distribution
> ---
> validation.xml
> 
> 
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   datePattern
>   MM/dd/
>   
>   
>   
>   
> 
> 
> 
> What did I miss or where should I look now.
> 
> 
> Michael Oliver
> Alarius Systems LLC
> 3325 N. Nellis Blvd, #1
> Las Vegas, NV 89115
> Phone:(702)643-7425
> Fax:(520)844-1036
> *Note new email changed from [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]



Which version of Struts is better for an old WebSphere?

2005-03-03 Thread Alejandro Escalante Medina
Thanks in advance for your help.

I need to build a web application for an old release of WebSphere
Application Server (3.5) which only covers servlet 2.2 and JSP 1.1
specification.

I read on the docs that Struts only needs servlet 2.2 specification,
but I wanted to ask anyway if there's any particular advice for this
environment.

I wonder what version of Struts is best suited for this environment.

Alex

-- 
Alejandro Escalante Medina
http://alexdinamo.homeip.net/weblog

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



RE: Reloading Configuration File

2005-03-03 Thread Scott Purcell
Thanks for the info Jerry,

I get it ... but I am having trouble actually accomplishing this task. Since 
the ActionServlet is a "javax.http.servlet" I am not sure how to call its its 
init?

The class is "org.apache.struts.action.ActionServlet" but I am uncertain how to 
init this thing?

Anyone have any ideas?

Thanks,
Scott



-Original Message-
From: Jerry Tan [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 12:02 PM
To: Struts Users Mailing List
Subject: Re: Reloading Configuration File



Scott,

I haven't looked at that section lately, but I would imagine you can handle
this by creating a separate action (e.g., ReloadAction) which just calls
the init method of the ActionServlet.

Whenever you'd like to reload the config file, then just go to the jsp that
you've mapped for ReloadAction, and then that ought to do the trick.

hth




   
  "Scott Purcell"   
   
  <[EMAIL PROTECTED]To:   
  
  nc.com>  cc:   (bcc: Jerry Tan/DTCC)  
   
   Subject:  Reloading 
Configuration File  
  03/03/2005 09:30  
   
  AM
   
  Please respond to 
   
  "Struts Users 
   
  Mailing List" 
   

   




Hello,

I was reading from my O'Reilly struts book last night, and it has a section
on "Reloading The Configuration Files" pp 102. Because I am in development,
I am constantly updating the config file and I have to keep stopping and
starting my tomcat, I found the section interesting, but it gives no
explanation on how to do this. It says one approach is to create a struts
action that will reinitialize the ActionServlet?

Does this mean I just need to recompile the ActionServlet that came with
stuts, or do I need to subclass the ActionServlet and compile that. It
looks like once you compile the ActionServlet, that it will reread the
config?

Does anyone have any knowledge in this area?

Thanks,


Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com <
http://www.vertisinc.com/>

Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.








-
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: Reloading Configuration File

2005-03-03 Thread Frank W. Zammetti
I've never tried this, but... is it as simple as calling
getServlet().init() in your Action?  getServlet() returns an instance of
the ActionServlet that is associated with the Action, and init() is
public, so...

Something though tells me this either (a) won't work at all or (b) is a
Very Bad Thing(tm) for one reason or another.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, March 3, 2005 1:30 pm, Scott Purcell said:
> Thanks for the info Jerry,
>
> I get it ... but I am having trouble actually accomplishing this task.
> Since the ActionServlet is a "javax.http.servlet" I am not sure how to
> call its its init?
>
> The class is "org.apache.struts.action.ActionServlet" but I am uncertain
> how to init this thing?
>
> Anyone have any ideas?
>
> Thanks,
> Scott
>
>
>
> -Original Message-
> From: Jerry Tan [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 03, 2005 12:02 PM
> To: Struts Users Mailing List
> Subject: Re: Reloading Configuration File
>
>
>
> Scott,
>
> I haven't looked at that section lately, but I would imagine you can
> handle
> this by creating a separate action (e.g., ReloadAction) which just calls
> the init method of the ActionServlet.
>
> Whenever you'd like to reload the config file, then just go to the jsp
> that
> you've mapped for ReloadAction, and then that ought to do the trick.
>
> hth
>
>
>
>
>   "Scott Purcell"
>   <[EMAIL PROTECTED]To:
> 
>   nc.com>  cc:   (bcc: Jerry
> Tan/DTCC)
>Subject:  Reloading
> Configuration File
>   03/03/2005 09:30
>   AM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
> Hello,
>
> I was reading from my O'Reilly struts book last night, and it has a
> section
> on "Reloading The Configuration Files" pp 102. Because I am in
> development,
> I am constantly updating the config file and I have to keep stopping and
> starting my tomcat, I found the section interesting, but it gives no
> explanation on how to do this. It says one approach is to create a struts
> action that will reinitialize the ActionServlet?
>
> Does this mean I just need to recompile the ActionServlet that came with
> stuts, or do I need to subclass the ActionServlet and compile that. It
> looks like once you compile the ActionServlet, that it will reread the
> config?
>
> Does anyone have any knowledge in this area?
>
> Thanks,
>
>
> Scott K Purcell | Developer | VERTIS |
> 555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
> 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com
> <
> http://www.vertisinc.com/>
>
> Vertis is the premier provider of targeted advertising, media, and
> marketing services that drive consumers to marketers more effectively.
>
>
>
>
>
>
>
>
> -
> 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: Reloading Configuration File

2005-03-03 Thread Jerry Tan

Scott,

This is a very interesting question:

I would start off with a new action, e.g., ReloadAction:

# # #

package com.what.ever.reload;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionServlet;

public final class ReloadAction extends Action implements ReloadK {

  /* reload struts configuration files */
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response) throws
Exception {


// get handle to ActionServlet
ActionServlet servlet = getServlet();

// call init to force re-initialization
servlet.init();

// continue (constant is defined in the ReloadK interface)
return mapping.findForward(CONTINUE);

}

}


# # #

Then map a jsp that calls this action, and just go to that page whenever
you'd like to reload the config files.

But there's one small caveat here: within the init method for ActionServlet
, there are two calls that freeze the ModuleConfig.

So if the type of changes you actually want to make on the fly would depend
on the configuration having not being frozen, however, then you're probably
better off subclassing ActionServlet, and then commenting out these two
lines that call the freeze method of ModuleConfig.

The snippet where this first occurs is as follows (see the call to freeze
at the end):

# # #

  // Initialize modules as needed
   ModuleConfig moduleConfig = initModuleConfig("", config);
   initModuleMessageResources(moduleConfig);
   initModuleDataSources(moduleConfig);
   initModulePlugIns(moduleConfig);
   moduleConfig.freeze();

# # #

Be sure to change your web.xml to load this new ActionServlet subclass
instead (rather than the default).


hth -





   
  "Scott Purcell"   
   
  <[EMAIL PROTECTED]To:   "Struts Users Mailing 
List"   
  nc.com>  cc:   (bcc: Jerry Tan/DTCC)  
   
   Subject:  RE: Reloading 
Configuration File  
  03/03/2005 01:30  
   
  PM
   
  Please respond to 
   
  "Struts Users 
   
  Mailing List" 
   

   




Thanks for the info Jerry,

I get it ... but I am having trouble actually accomplishing this task.
Since the ActionServlet is a "javax.http.servlet" I am not sure how to call
its its init?

The class is "org.apache.struts.action.ActionServlet" but I am uncertain
how to init this thing?

Anyone have any ideas?

Thanks,
Scott



-Original Message-
From: Jerry Tan [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 12:02 PM
To: Struts Users Mailing List
Subject: Re: Reloading Configuration File



Scott,

I haven't looked at that section lately, but I would imagine you can handle
this by creating a separate action (e.g., ReloadAction) which just calls
the init method of the ActionServlet.

Whenever you'd like to reload the config file, then just go to the jsp that
you've mapped for ReloadAction, and then that ought to do the trick.

hth




  "Scott Purcell"
  <[EMAIL PROTECTED]To:
  
  nc.com>  cc:   (bcc: Jerry
  Tan/DTCC)
   Subject:  Reloading
  Configuration File
  03/03/2005 09:30
  AM
  Please respond to
  "Struts Users
  Mailing List"


Re: Struts and EJB integration question?

2005-03-03 Thread Erik Weber
Well that's a good point. I was using a looser definition of "facade".
Erik
N G wrote:
On Thu, 03 Mar 2005 12:03:27 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
 

Well, a facade is supposed to be a black box, so you shouldn't have to,
for example, do an EJB lookup, to use the facade. It's supposed to be
easily accessible from any implementations of the next higher layer (in
other words, it makes stuff pluggable).
   

Actually, I think you are thinking about a Business Delegate pattern,
not Facade. Usually, a Stateless Session Bean serves as you Facade and
you would definitely have to do an EJB lookup on that.
Bisiness Delegate, on the other hand, can hide what type of business
objects you are using, so *it* would be the place to do the lookup or
call your ServiceLocator class to do the lookup for you.
NG
-
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]


how to use tag value for another tag's value

2005-03-03 Thread Burns, Scott



I would like the value of the button to be the 
value of the tag.  Can this be done?  It reads it as text using the 
single quotes.  Thanks
Scott
 
 







newbie question on client-side validation

2005-03-03 Thread Jennifer Ball
Hello,
I am having trouble creating the client-side JavaScript for a custom 
validator.  Basically, the validator checks if the user input matches 
one of a set of 3 strings.  I've written the server-side code but need 
help with the JavaScript.

I have looked at the standard validator-rules.xml file for examples, but 
I still have questions.  For example, the validateMask function creates 
a new Mask object, but I don't see where this constructor is located and 
what exactly it does.

I've searched for documentation on this topic, but all materials I've 
found have glossed over the topic.  Could someone give me a brief 
explanation or point me to one?

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


Re: Struts and EJB integration question?

2005-03-03 Thread N G
On Thu, 03 Mar 2005 12:03:27 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> Well, a facade is supposed to be a black box, so you shouldn't have to,
> for example, do an EJB lookup, to use the facade. It's supposed to be
> easily accessible from any implementations of the next higher layer (in
> other words, it makes stuff pluggable).

Actually, I think you are thinking about a Business Delegate pattern,
not Facade. Usually, a Stateless Session Bean serves as you Facade and
you would definitely have to do an EJB lookup on that.

Bisiness Delegate, on the other hand, can hide what type of business
objects you are using, so *it* would be the place to do the lookup or
call your ServiceLocator class to do the lookup for you.

NG

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



problem in custom validation method

2005-03-03 Thread Sivakumar Santharam
I am using struts 1.2.4 I created a new custom validation method in a 
validator class. I added a new validation rule to the validator-rules.xml file 
and new validation definitions to the validation.xml file. I get the following 
error when the custome validation method is called. When I tried to debug by 
setting a debug point in the validation method, it didn't stop. I don't have a 
clue what is happening. Thanks in advance. 
Siva

Error trace:
---
[3/3/05 14:21:48:926 EST] 7de0aacf ValidatorForm E 
org.apache.struts.validator.ValidatorForm  TRAS0014I: The following exception 
was logged org.apache.commons.validator.ValidatorException: 
gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, 
javax.servlet.http.HttpServletRequest)
at org.apache.commons.validator.ValidatorAction.loadValidationMethod
(ValidatorAction.java:627)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:557)
at org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.ValidatorForm.validate
(ValidatorForm.java:112)
at org.apache.struts.action.RequestProcessor.processValidate
(RequestProcessor.java:921)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:206)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService
(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service
(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service
(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service
(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch
(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch
(ServletInstanceReference.java:40)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch
(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch
(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward
(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
(WebAppInvoker.java:276)
at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation
(CachedInvocation.java:71)
at 
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke
(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI
(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service
(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest
(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest
(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
.
 
org.apache.commons.validator.ValidatorException: 
gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, 
javax.servlet.http.HttpServletRequest)
at org.apache.commons.validator.ValidatorAction.loadValidationMethod
(ValidatorAction.java:627)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:557)
at org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.ValidatorForm.validate
(ValidatorForm.java:112)
at org.apache.struts.action.RequestProcessor.processVali

RE: how to use tag value for another tag's value

2005-03-03 Thread Günther Wieser
do this instead:





  _  

From: Burns, Scott [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 8:11 PM
To: Struts Users Mailing List
Subject: how to use tag value for another tag's value



I would like the value of the button to be the value of the tag.  Can this
be done?  It reads it as text using the single quotes.  Thanks

Scott

 

 













Popup Windows Problems?

2005-03-03 Thread Scott Purcell
Hello,
 
All has been going well in my Struts app, then I ran into an issue dealing with 
a popup window. 
 
I am popping up a little window 500 x 300 and showing a upload File box. But 
when I submit the form, I get all kinds of BEAN errors in the log file?
 
I do not see what is different between popup window and a normal main window?
 
Is there a problem when working in popup windows? Anyone ever experience this?
 
Thanks,

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


Re: Popup Windows Problems?

2005-03-03 Thread Wendy Smoak
From: "Scott Purcell" <[EMAIL PROTECTED]>
> I am popping up a little window 500 x 300 and showing a upload File box.
> But when I submit the form, I get all kinds of BEAN errors in the log
file?

> I do not see what is different between popup window and a normal main
window?

It's a separate request.  Without knowing anything else, I would guess that
you're putting things in request scope, then when you open a new window, the
things you expect to be there, aren't.

Try putting the "missing" bean into session scope, and see if the problem
goes away.

If not, then you'll need to post some of your code and log messages.

-- 
Wendy Smoak


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



Re: direction of effort request please?

2005-03-03 Thread Niall Pemberton
Showing whats stored under the errors key proves nothing - its actually the
 tag that loads the message from the message resources. What
you see under the errors key is an ActionMessages object which contains an
ActionMessage. ActionMessage contains the key to the message in the message
resources (mysite.globalerrors.database_config in your case) plus any
replacement arguments. Now it just so happens that the exception handler
passes the "message" from the exception as an argument, but you still need
to have a message for that key in your application resources. Probably
something that looks like this...

mysite.globalerrors.database_config={0}

.. so that it basically just displays the exception's message which was
passed as the argument.

Niall

P.S. Please don't cross-post messages to more than one list. It gets
confusing when people are replying to the same message on different lists -
especially for people not subscribed to both. There are guidelines here for
the mailing lists:

http://struts.apache.org/mail.html


- Original Message - 
From: "Adam Jenkins" <[EMAIL PROTECTED]>
Sent: Thursday, March 03, 2005 4:47 PM


> Yep, and it's loaded ok as you can see it in the toString on the errors
> object:
>
> > And a tostring on org.apache.struts.action.ERROR =
> >
{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[T
> >h e
> > site is not configured correctly: Required database configuration data
was
> > missing.]]}
>
>
> On Fri, 4 Mar 2005 12:16 am, Niall Pemberton wrote:
> > Does the "mysite.globalerrors.database_config" key exist in your
> > application resources?
> >
> > Niall
> >
> > - Original Message -
> > From: "Adam Jenkins" <[EMAIL PROTECTED]>
> > To: ; 
> > Sent: Thursday, March 03, 2005 7:39 AM
> > Subject: direction of effort request please?
> >
> >
> >
> > Hi Guys, I'm having some issues with  (I've attached my
> > previous
> > mail below) that I'm going to write a custom tag to get around.  I was
> > thinking that if it's a bug, my effort is probably more productively
used
> > fixing the bug than rewriting the functionality, but first I need to
know
> > if it is a bug or not.  Can anyone help me out (feel free to email me
> > directly for more information)?
> >
> > Cheers
> > Adam
> >
> >
> > previous email
> >
> >
> > Hi Guys,
> >
> > I'm trying to come to terms with ...it's working ok, I'm
> > using the following for prefixes etc:
> >
> > #error formatting information
> > errors.header=Some errors occured
validating
> > the
> > form. Please correct the following errors and try
again.
> > errors.footer=
> > errors.prefix=
> > errors.suffix=
> >
> > Which is working great when there are form validation errors, however,
to
> > get
> > to the page that has the form, I use a global exception redirect as
such:
> >
> >  > key="mysite.globalerrors.database_config"
> > path="/private/install/ConfigDB.jsp"
> > scope="request"
> > type="com.mysite.utils.DBMissingConfigDataException"/>
> >
> > And a tostring on org.apache.struts.action.ERROR =
> >
{mysite.globalerrors.database_config=[mysite.globalerrors.database_config[T
> >h e
> > site is not configured correctly: Required database configuration data
was
> > missing.]]}
> >
> > Now this is all well and good, except my  tag now prints
out
> > the
> > header, and footer with one prefix and suffix in between (and no error
> > message) when the page first loads (from the error redirect). When there
is
> > form validation errors everything works fine, however it's just that
> > initial redirect where everything goes haywire.
> >
> > Does anyone know what's going on and/or how to fix?
> >
> > Cheers
> > adam



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



Re: problem in custom validation method

2005-03-03 Thread Bill Siggelkow
It looks like to me that the Validator is not finding your method 
definition. Recheck the declaration in the validator-rules.xml file. 
The signature and class name there must match your actual class and 
method exactly.

On 2005-03-03 14:28:52 -0500, Sivakumar Santharam <[EMAIL PROTECTED]> said:
I am using struts 1.2.4 I created a new custom validation method in a 
validator class. I added a new validation rule to the 
validator-rules.xml file and new validation definitions to the 
validation.xml file. I get the following error when the custome 
validation method is called. When I tried to debug by setting a debug 
point in the validation method, it didn't stop. I don't have a clue 
what is happening. Thanks in advance. Siva

Error trace:
---
[3/3/05 14:21:48:926 EST] 7de0aacf ValidatorForm E 
org.apache.struts.validator.ValidatorForm  TRAS0014I: The following 
exception was logged org.apache.commons.validator.ValidatorException: 
gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionMessages, 
javax.servlet.http.HttpServletRequest)
	at org.apache.commons.validator.ValidatorAction.loadValidationMethod
(ValidatorAction.java:627)
	at org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:557)
	at org.apache.commons.validator.Field.validateForRule(Field.java:811)
	at org.apache.commons.validator.Field.validate(Field.java:890)
	at org.apache.commons.validator.Form.validate(Form.java:174)
	at org.apache.commons.validator.Validator.validate(Validator.java:367)
	at org.apache.struts.validator.ValidatorForm.validate
(ValidatorForm.java:112)
	at org.apache.struts.action.RequestProcessor.processValidate
(RequestProcessor.java:921)
	at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:206)
	at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1164)
	at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:415)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService
(StrictServletInstance.java:110)
	at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service
(StrictLifecycleServlet.java:174)
	at com.ibm.ws.webcontainer.servlet.IdleServletState.service
(StrictLifecycleServlet.java:313)
	at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
(StrictLifecycleServlet.java:116)
	at com.ibm.ws.webcontainer.servlet.ServletInstance.service
(ServletInstance.java:283)
	at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch
(ValidServletReferenceState.java:42)
	at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch
(ServletInstanceReference.java:40)
	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch
(WebAppRequestDispatcher.java:983)
	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch
(WebAppRequestDispatcher.java:564)
	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
(WebAppRequestDispatcher.java:200)
	at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward
(WebAppInvoker.java:119)
	at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
(WebAppInvoker.java:276)
	at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation
(CachedInvocation.java:71)
	at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke
(CacheableInvocationContext.java:116)
	at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI
(ServletRequestProcessor.java:186)
	at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service
(OSEListener.java:334)
	at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest
(HttpConnection.java:56)
	at com.ibm.ws.http.HttpConnection.readAndHandleRequest
(HttpConnection.java:618)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
.
 
org.apache.commons.validator.ValidatorException: 
gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionMessages, 
javax.servlet.http.HttpServletRequest)
	at org.apache.commons.validator.ValidatorAction.loadValidationMethod
(ValidatorAction.java:627)
	at org.apache.commons.validator.ValidatorAction.executeValidationMethod
(ValidatorAction.java:557)
	at org.apache.commons.validator.Field.validateForRule(Field.java:811)
	at org.apache.commons.validator.Field.validate(Field.java:890)
	at org.apache.commons.validator.Form.validate(Form.java:174)
	at org.apache.commons.validator.Validator.validate(Validator.java:367)
	at org.apache.struts.validator.ValidatorForm.validate
(ValidatorForm.java:112)
	at org.apache.struts.action.RequestProcessor.

RE: Reloading Configuration File

2005-03-03 Thread Mark Benussi
This action "went" in Struts 1.2 and I never found a replacement. Any ideas
anyone?

-Original Message-
From: Jerry Tan [mailto:[EMAIL PROTECTED] 
Sent: 03 March 2005 18:02
To: Struts Users Mailing List
Subject: Re: Reloading Configuration File


Scott,

I haven't looked at that section lately, but I would imagine you can handle
this by creating a separate action (e.g., ReloadAction) which just calls
the init method of the ActionServlet.

Whenever you'd like to reload the config file, then just go to the jsp that
you've mapped for ReloadAction, and then that ought to do the trick.

hth



 

  "Scott Purcell"

  <[EMAIL PROTECTED]To:


  nc.com>  cc:   (bcc: Jerry
Tan/DTCC) 
   Subject:  Reloading
Configuration File  
  03/03/2005 09:30

  AM

  Please respond to

  "Struts Users

  Mailing List"

 





Hello,

I was reading from my O'Reilly struts book last night, and it has a section
on "Reloading The Configuration Files" pp 102. Because I am in development,
I am constantly updating the config file and I have to keep stopping and
starting my tomcat, I found the section interesting, but it gives no
explanation on how to do this. It says one approach is to create a struts
action that will reinitialize the ActionServlet?

Does this mean I just need to recompile the ActionServlet that came with
stuts, or do I need to subclass the ActionServlet and compile that. It
looks like once you compile the ActionServlet, that it will reread the
config?

Does anyone have any knowledge in this area?

Thanks,


Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com <
http://www.vertisinc.com/>

Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.








-
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: Remove Tiles Component

2005-03-03 Thread Tim Christopher
I think the variable (msgs) needs to be passed through by the layout
page.  I think this allows the other JSP inserted the same layout page
to access the variable.

I could easily be wrong about that but hopefully someone with more
Tiles knowledge than me can prove me right / wrong

Tim Christopher

On Thu, 3 Mar 2005 16:52:24 +, Ben Taylor <[EMAIL PROTECTED]> wrote:
> I know there have been a few Tiles related question recently, but
> having read them I still can't figure out how to solve my problem.
> 
> At current I'm using:
> 
> ... within a few of my JSPs.  The position of this component within
> the document changes for each JSP file so I can not create a new
> layout file for it.
> 
> This is my current tiles-def file:
> 
>   
>   
> 
> 
> I'd like to be able to add an extra line to the above base definition
> (.pub.welcome) along the lines of:
> 
> ... and then be able to insert that page within a number of my
> (content) JSP files.
> 
> I've tried using  but it doesn't work. :-(
> 
> Can anyone suggest a method that might work?
> 
> Thank you.
> 
> -
> 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: problem in custom validation method

2005-03-03 Thread Sivakumar Santharam
Bill Siggelkow  bellsouth.net> writes:

> 
> It looks like to me that the Validator is not finding your method 
> definition. Recheck the declaration in the validator-rules.xml file. 
> The signature and class name there must match your actual class and 
> method exactly.
> 
> On 2005-03-03 14:28:52 -0500, Sivakumar Santharam  gmail.com> 
said:
> 
> > I am using struts 1.2.4 I created a new custom validation method in a 
> > validator class. I added a new validation rule to the 
> > validator-rules.xml file and new validation definitions to the 
> > validation.xml file. I get the following error when the custome 
> > validation method is called. When I tried to debug by setting a debug 
> > point in the validation method, it didn't stop. I don't have a clue 
> > what is happening. Thanks in advance. Siva
> > 
> > Error trace:
> > ---
> > [3/3/05 14:21:48:926 EST] 7de0aacf ValidatorForm E 
> > org.apache.struts.validator.ValidatorForm  TRAS0014I: The following 
> > exception was logged org.apache.commons.validator.ValidatorException: 
> > gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
> > org.apache.commons.validator.ValidatorAction, 
> > org.apache.commons.validator.Field, 
> > org.apache.struts.action.ActionMessages, 
> > javax.servlet.http.HttpServletRequest)
> > at org.apache.commons.validator.ValidatorAction.loadValidationMethod
> > (ValidatorAction.java:627)
> > at org.apache.commons.validator.ValidatorAction.executeValidationMethod
> > (ValidatorAction.java:557)
> > at org.apache.commons.validator.Field.validateForRule(Field.java:811)
> > at org.apache.commons.validator.Field.validate(Field.java:890)
> > at org.apache.commons.validator.Form.validate(Form.java:174)
> > at org.apache.commons.validator.Validator.validate(Validator.java:367)
> > at org.apache.struts.validator.ValidatorForm.validate
> > (ValidatorForm.java:112)
> > at org.apache.struts.action.RequestProcessor.processValidate
> > (RequestProcessor.java:921)
> > at org.apache.struts.action.RequestProcessor.process
> > (RequestProcessor.java:206)
> > at org.apache.struts.action.ActionServlet.process
> > (ActionServlet.java:1164)
> > at org.apache.struts.action.ActionServlet.doPost
> > (ActionServlet.java:415)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService
> > (StrictServletInstance.java:110)
> > at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service
> > (StrictLifecycleServlet.java:174)
> > at com.ibm.ws.webcontainer.servlet.IdleServletState.service
> > (StrictLifecycleServlet.java:313)
> > at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
> > (StrictLifecycleServlet.java:116)
> > at com.ibm.ws.webcontainer.servlet.ServletInstance.service
> > (ServletInstance.java:283)
> > at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch
> > (ValidServletReferenceState.java:42)
> > at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch
> > (ServletInstanceReference.java:40)
> > at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch
> > (WebAppRequestDispatcher.java:983)
> > at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch
> > (WebAppRequestDispatcher.java:564)
> > at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
> > (WebAppRequestDispatcher.java:200)
> > at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward
> > (WebAppInvoker.java:119)
> > at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
> > (WebAppInvoker.java:276)
> > at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation
> > (CachedInvocation.java:71)
> > at 
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke
> > (CacheableInvocationContext.java:116)
> > at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI
> > (ServletRequestProcessor.java:186)
> > at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service
> > (OSEListener.java:334)
> > at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest
> > (HttpConnection.java:56)
> > at com.ibm.ws.http.HttpConnection.readAndHandleRequest
> > (HttpConnection.java:618)
> > at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
> > .
> >  
> > org.apache.commons.validator.ValidatorException: 
> > gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object, 
> > org.apache.commons.validator.ValidatorAction, 
> > org.apache.commons.validator.Field, 
> > org.apache.struts.action.ActionMessages, 
> > javax.servlet.http.HttpServletRequest)
> > at org.apache.commons.validator.ValidatorAction.loadValidationMethod
> > (ValidatorAction.java:

Re: Reloading Configuration File

2005-03-03 Thread Wendy Smoak
From: "Mark Benussi" <[EMAIL PROTECTED]>

> This action "went" in Struts 1.2 and I never found a replacement.
> Any ideas anyone?

I'm not entirely sure what you're asking.  The discussion you quoted seems
to start from a false premise:  that you have to stop and start Tomcat to
get config changes to take effect.

All you have to do is reload the individual webapp that had changes.  I do
it with 'ant reload'.  (Tomcat ships with Ant tasks that interact with its
manager app.)  You can also use the HTML version of the manager app-- click
reload, and you're done.

-- 
Wendy Smoak


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



Re: problem in custom validation method

2005-03-03 Thread Niall Pemberton
The validation method signatures in Struts 1.2 changed from ActionErrors to
ActionMessages, but it looks like you're trying to use a Struts 1.1 format
method with Struts 1.2.

Try changing your method signature to use ActionMessages.

Niall

- Original Message - 
From: "Sivakumar Santharam" <[EMAIL PROTECTED]>
Sent: Thursday, March 03, 2005 10:45 PM


> > > Error trace:
> > > ---
> > > [3/3/05 14:21:48:926 EST] 7de0aacf ValidatorForm E
> > > org.apache.struts.validator.ValidatorForm  TRAS0014I: The following
> > > exception was logged org.apache.commons.validator.ValidatorException:
> > > gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object,
> > > org.apache.commons.validator.ValidatorAction,
> > > org.apache.commons.validator.Field,
> > > org.apache.struts.action.ActionMessages,
> > > javax.servlet.http.HttpServletRequest)
> > > at org.apache.commons.validator.ValidatorAction.loadValidationMethod
> > > (ValidatorAction.java:627)

> Bill,
> Thanks for your reply. I was trying to write a custome validation method
to
> see whether it is working or not. I checked the method definition
> (validateInt) and the declaration (int) in the validator-rules.xml and it
> looks same.
> Here is the sample code. I removed the generic validation methods to make
it
> simple. Thanks Siva
>
> -- validator class --
> public static boolean validateInt(Object bean,ValidatorAction action,
> Field field,ActionErrors errors,HttpServletRequest request) {
> String value = ValidatorUtils.getValueAsString(bean,
> field.getProperty());
> boolean isFieldValid = false;
> try {
>Integer.parseInt(value);
>   isFieldValid = true;
> } catch (Exception e) {
> errors.add(field.getKey(), Resources.getActionError
> (request, action, field));
> isFieldValid = false;
> }
> return isFieldValid;
> }



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



Re: problem in custom validation method

2005-03-03 Thread Erik Weber
Geez, thanks Niall. I've been posting custom validation examples that 
wouldn't work with 1.2 and didn't realize it. Please let me know if 
there are any other significant validator plugin changes from 1.1 to 1.2.

Erik
Niall Pemberton wrote:
The validation method signatures in Struts 1.2 changed from ActionErrors to
ActionMessages, but it looks like you're trying to use a Struts 1.1 format
method with Struts 1.2.
Try changing your method signature to use ActionMessages.
Niall
- Original Message - 
From: "Sivakumar Santharam" <[EMAIL PROTECTED]>
Sent: Thursday, March 03, 2005 10:45 PM

 

Error trace:
---
[3/3/05 14:21:48:926 EST] 7de0aacf ValidatorForm E
org.apache.struts.validator.ValidatorForm  TRAS0014I: The following
exception was logged org.apache.commons.validator.ValidatorException:
gov.tva.wrkrcomp.util.Validator.validateInt(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)
at org.apache.commons.validator.ValidatorAction.loadValidationMethod
(ValidatorAction.java:627)
   

 

Bill,
Thanks for your reply. I was trying to write a custome validation method
   

to
 

see whether it is working or not. I checked the method definition
(validateInt) and the declaration (int) in the validator-rules.xml and it
looks same.
Here is the sample code. I removed the generic validation methods to make
   

it
 

simple. Thanks Siva
-- validator class --
public static boolean validateInt(Object bean,ValidatorAction action,
Field field,ActionErrors errors,HttpServletRequest request) {
String value = ValidatorUtils.getValueAsString(bean,
field.getProperty());
boolean isFieldValid = false;
try {
  Integer.parseInt(value);
 isFieldValid = true;
} catch (Exception e) {
errors.add(field.getKey(), Resources.getActionError
(request, action, field));
isFieldValid = false;
}
return isFieldValid;
}
   


-
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: problem in custom validation method

2005-03-03 Thread Niall Pemberton
Probably the best place to look is the "upgrade notes" page in the wiki.
Unfortunately this issue wasn't on it, so I've just added a note about it.

http://wiki.apache.org/struts/StrutsUpgradeNotes11to124

Niall

- Original Message - 
From: "Erik Weber" <[EMAIL PROTECTED]>
Sent: Thursday, March 03, 2005 11:23 PM


> Geez, thanks Niall. I've been posting custom validation examples that
> wouldn't work with 1.2 and didn't realize it. Please let me know if
> there are any other significant validator plugin changes from 1.1 to 1.2.
>
> Erik



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



Struts Or Spring

2005-03-03 Thread M Murali

We are kind of middle of deciding go to with which framework.Can some one help. 
On high level, we have an application where data gets from webservices and is 
displayed to user thru JSP.  the webservices access is done thru Axis and the 
proxy class generated are used on JSP side. Each proxy class holds data 
specific to businesslogic. In order to access these data , it looks like we 
need to create a form bean exactly to match with proxy class for accessing at 
JSP.  Is there any way around creating a formbean for each dataclass?? 

for example: in JSP we have

<%

 LineInfo[]  infos = LineBean.GetAllLines();

%>



<% for (int = 0;  i < infos.length; i++) %{>





 <% }%>>



 

how can this be done using struts. Do we need to create a  LineInfoFormBean ?? 
THe LineInfo is a proxy generated data class, if we have to create a FormBean 
for each dataclass, then it would be very in efficient and this would be 
duplicate of get/set from data class. Is is possible??   I heard the same can 
be easily using Spring.  Any ideas, which one is best suits here.

Thanks in advance.





-
Celebrate Yahoo!'s 10th Birthday! 
 Yahoo! Netrospective: 100 Moments of the Web 

RE: Remove Tiles Component

2005-03-03 Thread David G. Friedman
Ben,

Why not put "msgs" in your main template but leave it equal to the value "".
That way, nothing will show up in the main template but when you extend it
and change the "msgs" component depending on what you need to display in
that location of your output. You would end up with something like this:

In tiles-def.xml:






Then, extend it for various output pages and either define msgs to show
something or leave it blank.  For example, your error page might be this
template:




Your login page definition might change the "content" page to login.jsp like
so:




And so forth for each respective "page" you wish to show.  Essentially, you
will be including components into templates instead of fixing this into each
JSP directly.  The result gives you an easier time changing things (just
update tiles-defs.xml) when you need to modify your site's look and feel.

Regards,
David

-Original Message-
From: Ben Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 11:52 AM
To: Struts Users Mailing List
Subject: Remove Tiles Component


I know there have been a few Tiles related question recently, but
having read them I still can't figure out how to solve my problem.

At current I'm using:
 
... within a few of my JSPs.  The position of this component within
the document changes for each JSP file so I can not create a new
layout file for it.

This is my current tiles-def file:
 
   
   
 

I'd like to be able to add an extra line to the above base definition
(.pub.welcome) along the lines of:
 ... and then be able to
insert that page within a number of my
(content) JSP files.

I've tried using  but it doesn't work. :-(

Can anyone suggest a method that might work?

Thank you.


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



validatorForms and deprecated actionerrors

2005-03-03 Thread Paul Tomsic
  What is the preferred way to obtain errors on a
  ValidatorForm now that ActionErrors is mostly
  deprecated?
  
  Is there a better way to do this:
  ActionErrors errors = myForm.validate(mapping,
  request);
  if(!errors.isEmpty()) {
  saveErrors(request, errors);
  return mapping.findForward("failure");
  }
  
  I've got like 1000's of deprecation warnings now.
  
  Thoughts?
  
  Thanks
  
  
 


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



Re: Reloading Configuration File

2005-03-03 Thread Bill Siggelkow
On 2005-03-03 17:51:36 -0500, Wendy Smoak <[EMAIL PROTECTED]> said:
From: "Mark Benussi" <[EMAIL PROTECTED]>
This action "went" in Struts 1.2 and I never found a replacement.
Any ideas anyone?
I'm not entirely sure what you're asking.  The discussion you quoted seems
to start from a false premise:  that you have to stop and start Tomcat to
get config changes to take effect.
All you have to do is reload the individual webapp that had changes.  I do
it with 'ant reload'.  (Tomcat ships with Ant tasks that interact with its
manager app.)  You can also use the HTML version of the manager app-- click
reload, and you're done.
I agree with Wendy -- you can do this in any number of ways -- an Ant 
task, or you can go to http://localhost:8080/manager/html  and do it 
that way. My understanding is that the reload action was dropped 
because it sometimes left things in an unpredictable state.

-Bill Siggelkow

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


Re: validatorForms and deprecated actionerrors

2005-03-03 Thread Bill Siggelkow
On 2005-03-03 21:31:43 -0500, Paul Tomsic <[EMAIL PROTECTED]> said:
  What is the preferred way to obtain errors on a
  ValidatorForm now that ActionErrors is mostly
  deprecated?
Is there a better way to do this:
  ActionErrors errors = myForm.validate(mapping,
  request);
  if(!errors.isEmpty()) {
  saveErrors(request, errors);
  return mapping.findForward("failure");
  }
I've got like 1000's of deprecation warnings now.
Thoughts?
Thanks
I think the only call in your code that is deprecated is:
saveErrors(request, errors);
The replacement method that takes ActionMessages (now the parent class 
of ActionErrors) is in the Action but your code doesn't pick it up 
because it uses the more specific deprecated saveErrors. When the 
deprecated method is removed (and I have no idea when that will be) 
from Action, the warnings will go away and your code will continue to 
function w/o modification (at least respect to this call). There are 
probably some other ways to avoid the error, (for example you could do 
the same thing that saveErrors is doing) but that would be a worse 
solution IMO.

-Bill Siggelkow

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


Re: validatorForms and deprecated actionerrors

2005-03-03 Thread Paul Tomsic
hmmm, are you saying that I should just "wait" until a
solution comes along?
Not sure I'm understanding.
How would you fix the deprecation problem in my
situation?

--- Bill Siggelkow <[EMAIL PROTECTED]> wrote:

> On 2005-03-03 21:31:43 -0500, Paul Tomsic
> <[EMAIL PROTECTED]> said:
> 
> >   What is the preferred way to obtain errors on a
> >   ValidatorForm now that ActionErrors is mostly
> >   deprecated?
> > Is there a better way to do this:
> >   ActionErrors errors = myForm.validate(mapping,
> >   request);
> >   if(!errors.isEmpty()) {
> >   saveErrors(request, errors);
> >   return
> mapping.findForward("failure");
> >   }
> > I've got like 1000's of deprecation warnings
> now.
> > Thoughts?
> > Thanks
> 
> I think the only call in your code that is
> deprecated is:
> 
> saveErrors(request, errors);
> 
> The replacement method that takes ActionMessages
> (now the parent class 
> of ActionErrors) is in the Action but your code
> doesn't pick it up 
> because it uses the more specific deprecated
> saveErrors. When the 
> deprecated method is removed (and I have no idea
> when that will be) 
> from Action, the warnings will go away and your code
> will continue to 
> function w/o modification (at least respect to this
> call). There are 
> probably some other ways to avoid the error, (for
> example you could do 
> the same thing that saveErrors is doing) but that
> would be a worse 
> solution IMO.
> 
> -Bill Siggelkow
> 
> 
> 
>
-
> 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]