ActionExceptionHandler; avoid try catch in actions

2003-12-30 Thread kchris1

Hi,

I am trying to figure how ActionExceptionHandler may help in removing try{}catch
{} exception handling in action, while specifying the appropriate message for 
the corresponding exception. 

I did not a find a clear example of how to manage this.

Please, tell me where I can find an available example, or explain me how to do 
it.

Thanks 

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



Re: [OT] eclipse and jsp editing

2003-12-30 Thread Nadeem Bitar
Netbeans' JSP support is quite good. 

On 火, 2003-12-30 at 21:40, Ashish Kulkarni wrote:
> Hi
> 
> is there any good plugin for editing jsp and setting
> up a web project, i have tried lomboz but find it very
> complicated to use
> I find setting web prject in jsp much easy
> any comments
> (or any free jsp editor will also work)
> Ashish
> 
> __
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



[OT] eclipse and jsp editing

2003-12-30 Thread Ashish Kulkarni
Hi

is there any good plugin for editing jsp and setting
up a web project, i have tried lomboz but find it very
complicated to use
I find setting web prject in jsp much easy
any comments
(or any free jsp editor will also work)
Ashish

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: Problem with action chaining

2003-12-30 Thread Mohan Radhakrishnan
We use base forms too but we use sub-forms in both action mappings. It works
for us if we use sub-forms with action chaining like this.

  Our action chains are very minimal though because it is not recommended
design practice.
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 10:26 AM
To: [EMAIL PROTECTED]
Subject: Problem with action chaining


Hi, 

 

I have a problem with action chaining. My action tag 











 

 

forwards control to the following:

 







 

Now AgencyCreateForm extends AgencyForm and AgencyCreateAction extends
AgencyAction. 

 

When the derived class AgencyCreateAction tries to type cast the
AgencyCreateForm in the execute() method, it throws a type cast
exception. This is because no instance of AgencyCreateForm is created
and it still persists the instance of AgencyForm. 

 

Can anyone guide me as to how I can resolve this problem. 

 

Regards,

Kavita C. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 31, 2003 10:19 AM
To: Kavita Cardoz
Subject: WELCOME to [EMAIL PROTECTED]

 

Hi! This is the ezmlm program. I'm managing the

[EMAIL PROTECTED] mailing list.

 

I'm working for my owner, who can be reached

at [EMAIL PROTECTED]

 

Acknowledgment: I have added the address

 

   [EMAIL PROTECTED]

 

to the struts-user mailing list.

 

Welcome to [EMAIL PROTECTED]

 

Please save this message so that you know the address you are

subscribed under, in case you later want to unsubscribe or change your

subscription address.

 

 

--- Administrative commands for the struts-user list ---

 

I can handle administrative requests automatically. Please

do not send them to the list address! Instead, send

your message to the correct command address:

 

To subscribe to the list, send a message to:

   <[EMAIL PROTECTED]>

 

To remove your address from the list, send a message to:

   <[EMAIL PROTECTED]>

 

Send mail to the following for info and FAQ for this list:

   <[EMAIL PROTECTED]>

   <[EMAIL PROTECTED]>

 

Similar addresses exist for the digest list:

   <[EMAIL PROTECTED]>

   <[EMAIL PROTECTED]>

 

To get messages 123 through 145 (a maximum of 100 per request), mail:

   <[EMAIL PROTECTED]>

 

To get an index with subject and author for messages 123-456 , mail:

   <[EMAIL PROTECTED]>

 

They are always returned as sets of 100, max 2000 per request,

so you'll actually get 100-499.

 

To receive all messages with the same subject as message 12345,

send an empty message to:

   <[EMAIL PROTECTED]>

 

The messages do not really need to be empty, but I will ignore

their content. Only the ADDRESS you send to is important.

 

You can start a subscription for an alternate address,

for example "[EMAIL PROTECTED]", just add a hyphen and your

address (with '=' instead of '@') after the command word:

<[EMAIL PROTECTED]>

 

To stop subscription for this address, mail:

<[EMAIL PROTECTED]>

 

In both cases, I'll send a confirmation message to that address. When

you receive it, simply reply to it to complete your subscription.

 

If despite following these instructions, you do not get the

desired results, please contact my owner at

[EMAIL PROTECTED] Please be patient, my owner is a

lot slower than I am ;-)

 

--- Enclosed is a copy of the request I received.

 

Return-Path: <[EMAIL PROTECTED]>

Received: (qmail 38403 invoked from network); 31 Dec 2003 04:49:08 -

Received: from unknown (HELO mumbai2.ezbroadnet.com) (203.124.136.26)

  by daedalus.apache.org with SMTP; 31 Dec 2003 04:49:08 -

Received: from ind-spz7gwy003.mastek.com (meghdoot.mastek.com
[203.124.144.12])

by mumbai2.ezbroadnet.com (8.11.7p1+Sun/8.11.7) with SMTP id
hBV4k7A06598

for
<[EMAIL PROTECTED]
ta.apache.org>; Wed, 31 Dec 2003 10:16:07 +0530 (IST)

Received: FROM ind-spz7gwy002.mastek.com BY ind-spz7gwy003.mastek.com ;
Wed Dec 31 10:16:36 2003 +0500

Received: from IND-SPZ7ECL001.mastek.com (unverified) by 

ind-spz7gwy002.mastek.com (Content Technologies SMTPRS 4.3.12) with
ESMTP 

id <[EMAIL PROTECTED]> for 

 
<[EMAIL PROTECTED]
ta.apache.org>

   ; Wed, 31 Dec 2003 10:16:36 +0530

X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0

content-class: urn:content-classes:message

MIME-Version: 1.0

Content-Type: multipart/alternative; 

boundary="_=_NextPart_001_01C3CF59.10A528F8"

Disposition-Notification-To: <[EMAIL PROTECTED]>

Subject: RE: confirm subscribe to [EMAIL PROTECTED]

Date: Wed, 31 Dec 2003 10:16:33 +0530

Message-ID:
<[EMAIL PROTECTED]>

X-MS-Has-Attach: 

X-MS-TNEF-Correlator: 

Thread-Topic: confirm subscribe to [EMAIL PROTECTED]

Thread-Index: AcPPWOjsISsYE5GDRbixny8C3KbkqAAACKhA

From: <[EMAIL PROTECTED]>

To:
<[EMAIL PROTECTED]
ta.apache.org>

X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

 

This is a multi-part message in MIME format.

 

--_=_NextPart_001_01C

Problem with action chaining

2003-12-30 Thread kavitac
Hi, 

 

I have a problem with action chaining. My action tag 











 

 

forwards control to the following:

 







 

Now AgencyCreateForm extends AgencyForm and AgencyCreateAction extends
AgencyAction. 

 

When the derived class AgencyCreateAction tries to type cast the
AgencyCreateForm in the execute() method, it throws a type cast
exception. This is because no instance of AgencyCreateForm is created
and it still persists the instance of AgencyForm. 

 

Can anyone guide me as to how I can resolve this problem. 

 

Regards,

Kavita C. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 31, 2003 10:19 AM
To: Kavita Cardoz
Subject: WELCOME to [EMAIL PROTECTED]

 

Hi! This is the ezmlm program. I'm managing the

[EMAIL PROTECTED] mailing list.

 

I'm working for my owner, who can be reached

at [EMAIL PROTECTED]

 

Acknowledgment: I have added the address

 

   [EMAIL PROTECTED]

 

to the struts-user mailing list.

 

Welcome to [EMAIL PROTECTED]

 

Please save this message so that you know the address you are

subscribed under, in case you later want to unsubscribe or change your

subscription address.

 

 

--- Administrative commands for the struts-user list ---

 

I can handle administrative requests automatically. Please

do not send them to the list address! Instead, send

your message to the correct command address:

 

To subscribe to the list, send a message to:

   <[EMAIL PROTECTED]>

 

To remove your address from the list, send a message to:

   <[EMAIL PROTECTED]>

 

Send mail to the following for info and FAQ for this list:

   <[EMAIL PROTECTED]>

   <[EMAIL PROTECTED]>

 

Similar addresses exist for the digest list:

   <[EMAIL PROTECTED]>

   <[EMAIL PROTECTED]>

 

To get messages 123 through 145 (a maximum of 100 per request), mail:

   <[EMAIL PROTECTED]>

 

To get an index with subject and author for messages 123-456 , mail:

   <[EMAIL PROTECTED]>

 

They are always returned as sets of 100, max 2000 per request,

so you'll actually get 100-499.

 

To receive all messages with the same subject as message 12345,

send an empty message to:

   <[EMAIL PROTECTED]>

 

The messages do not really need to be empty, but I will ignore

their content. Only the ADDRESS you send to is important.

 

You can start a subscription for an alternate address,

for example "[EMAIL PROTECTED]", just add a hyphen and your

address (with '=' instead of '@') after the command word:

<[EMAIL PROTECTED]>

 

To stop subscription for this address, mail:

<[EMAIL PROTECTED]>

 

In both cases, I'll send a confirmation message to that address. When

you receive it, simply reply to it to complete your subscription.

 

If despite following these instructions, you do not get the

desired results, please contact my owner at

[EMAIL PROTECTED] Please be patient, my owner is a

lot slower than I am ;-)

 

--- Enclosed is a copy of the request I received.

 

Return-Path: <[EMAIL PROTECTED]>

Received: (qmail 38403 invoked from network); 31 Dec 2003 04:49:08 -

Received: from unknown (HELO mumbai2.ezbroadnet.com) (203.124.136.26)

  by daedalus.apache.org with SMTP; 31 Dec 2003 04:49:08 -

Received: from ind-spz7gwy003.mastek.com (meghdoot.mastek.com
[203.124.144.12])

by mumbai2.ezbroadnet.com (8.11.7p1+Sun/8.11.7) with SMTP id
hBV4k7A06598

for
<[EMAIL PROTECTED]
ta.apache.org>; Wed, 31 Dec 2003 10:16:07 +0530 (IST)

Received: FROM ind-spz7gwy002.mastek.com BY ind-spz7gwy003.mastek.com ;
Wed Dec 31 10:16:36 2003 +0500

Received: from IND-SPZ7ECL001.mastek.com (unverified) by 

ind-spz7gwy002.mastek.com (Content Technologies SMTPRS 4.3.12) with
ESMTP 

id <[EMAIL PROTECTED]> for 

 
<[EMAIL PROTECTED]
ta.apache.org>

   ; Wed, 31 Dec 2003 10:16:36 +0530

X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0

content-class: urn:content-classes:message

MIME-Version: 1.0

Content-Type: multipart/alternative; 

boundary="_=_NextPart_001_01C3CF59.10A528F8"

Disposition-Notification-To: <[EMAIL PROTECTED]>

Subject: RE: confirm subscribe to [EMAIL PROTECTED]

Date: Wed, 31 Dec 2003 10:16:33 +0530

Message-ID:
<[EMAIL PROTECTED]>

X-MS-Has-Attach: 

X-MS-TNEF-Correlator: 

Thread-Topic: confirm subscribe to [EMAIL PROTECTED]

Thread-Index: AcPPWOjsISsYE5GDRbixny8C3KbkqAAACKhA

From: <[EMAIL PROTECTED]>

To:
<[EMAIL PROTECTED]
ta.apache.org>

X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

 

This is a multi-part message in MIME format.

 

--_=_NextPart_001_01C3CF59.10A528F8

Content-Type: text/plain; charset="us-ascii"

Content-Transfer-Encoding: quoted-printable

 

=20

 

 

 

MASTEK

"Making a valuable difference"

Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.

In the US, we're called MAJESCO

 


~~~=

~~~

Opinions expressed in this e-mail

Primitive type bean property

2003-12-30 Thread Patrick Cheng
Hi All,

A quick question.
Has anyone tried to write the form with property of a 'char' primitive
type?
That is:

public char getC(){...}
public void setC(char c){...}

Is it supposed to work normally? I was doing it and the value was never
set. 
I just need to know that if anyone had done it this way and get it to
work.

The reason I'm not using Wrapper class Character... Is because the code
is generated by  ejbgen.

Rgds,
Patrick.

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



Re: JAAS and roles attribute of logic:present

2003-12-30 Thread Marino A. Jonsson
I had the same problem ... using BASIC auth I could only gain access to the
principal in secured areas - so I just secured all areas where I needed
access to the principal :) ... very annoying though.

cheers,
Marinó

"Daniel Massie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If I firstly go to a secured area, I am redirected to the login page. I
> log in, get sent to my original request (secure area). If I then go
> immediately  to an unsecure area, there is no principal or subject (both
> null).
>
> If I go to the unsecured area without an existing session, there is also
> no principal or subject (both null) as expected.
>
> Daniel
>
> Karr, David wrote:
>
> >I'm not sure what problem you're having.  Are you saying that after you
> >specify your login when accessing a secured area, you then immediately
> >(before session timeout) access an unsecured area that checks
> >"role=admin" and thinks you don't have that role (I would be surprised
> >if it did that)?  Or is your first access (without an existing session)
> >to the unsecured area?  If that's the case, then there definitely won't
> >be an existing principal.  Did you think there would be?
> >
> >
> >




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



Re: JAAS and roles attribute of logic:present

2003-12-30 Thread Daniel Massie
If I firstly go to a secured area, I am redirected to the login page. I 
log in, get sent to my original request (secure area). If I then go 
immediately  to an unsecure area, there is no principal or subject (both 
null).

If I go to the unsecured area without an existing session, there is also 
no principal or subject (both null) as expected.

Daniel

Karr, David wrote:

I'm not sure what problem you're having.  Are you saying that after you
specify your login when accessing a secured area, you then immediately
(before session timeout) access an unsecured area that checks
"role=admin" and thinks you don't have that role (I would be surprised
if it did that)?  Or is your first access (without an existing session)
to the unsecured area?  If that's the case, then there definitely won't
be an existing principal.  Did you think there would be?
 



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


RE: JAAS and roles attribute of logic:present

2003-12-30 Thread Karr, David
I'm not sure what problem you're having.  Are you saying that after you
specify your login when accessing a secured area, you then immediately
(before session timeout) access an unsecured area that checks
"role=admin" and thinks you don't have that role (I would be surprised
if it did that)?  Or is your first access (without an existing session)
to the unsecured area?  If that's the case, then there definitely won't
be an existing principal.  Did you think there would be?

-Original Message-
From: Daniel Massie [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 4:27 PM
To: [EMAIL PROTECTED]
Subject: JAAS and roles attribute of logic:present


I am using JAAS to login to the secure areas of my application, 
localhost:8080/app/admin with the role admin being required for access. 
Using  within pages with 
localhost:8080/app/admin as the base url works perfectly, but when I try

to use it in any other url localhost:8080/app the principle is null. Is 
it possible to manually add the JAAS subject to the HttpSession so that 
it can be used with the logic tags?If so by which key must it be added 
to the session?

thanks
Daniel
-- 
Daniel Massie
http://www.dmassie.org.uk
http://jbay.dmassie.org.uk


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



JAAS and roles attribute of logic:present

2003-12-30 Thread Daniel Massie
I am using JAAS to login to the secure areas of my application, 
localhost:8080/app/admin with the role admin being required for access. 
Using  within pages with 
localhost:8080/app/admin as the base url works perfectly, but when I try 
to use it in any other url localhost:8080/app the principle is null. Is 
it possible to manually add the JAAS subject to the HttpSession so that 
it can be used with the logic tags?If so by which key must it be added 
to the session?

thanks
Daniel
--
Daniel Massie
http://www.dmassie.org.uk
http://jbay.dmassie.org.uk
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: .NET: We are just like Struts... only better.

2003-12-30 Thread Craig R. McClanahan
Quoting "Hookom, Jacob" <[EMAIL PROTECTED]>:

> As a follow up to your "by hand" comment, isn't Sun developing a new GUI
> development tool to wizard-ize JSF?
> 

Yes:  http://wwws.sun.com/software/products/jscreator/index.html

Even if it weren't a product coming from the company I work for :-), this one
would have me tempted ...

Many other companies are promising support for JavaServer Faces in the near term
as well.

> Speaking of wizards, can JSF enforce flow in a wizard manner without
> additional modifications like Struts?

Depends on what you mean by "enforce" -- Struts doesn't really do anything to
enforce flows.  However, both Struts and JavaServer Faces share the concept of
decoupling the actual name of the page to be displayed next from the business
logic that returns an outcome which the navigation decision is based on.  In
Struts you do this by using  declarations at the global or per-Action
level.  In JavaServer Faces, you do this by defining navigation rules based on
the page you're currently on, the action method that was called (i.e. which
submit button was pushed), and what the logical outcome value was returned by
the action method.

> 
> Thanks much!
> 

Craig


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



Re: need some sample Tiles definitions usage

2003-12-30 Thread Brice Ruth
once you have an entry in tiles-defs.xml, in place of a path to a JSP 
for your Action (in struts-config.xml), put the name you've assigned to 
your tile definition.

You'll need to make sure that the Tiles plug-in is also activated in 
your struts-config.xml.

Jim Anderson wrote:

I've taken the Login example from "Struts in Action" and converted it, 
step by step, to use Tiles. I'm at the point where I've created a 
definition entry in tiles-defs.xml but haven't been able to figure out 
how to "invoke" it. Although the book is generally pretty good with 
examples, it unfortunately doesn't give one here.

Any examples appreciated!

Thanks,

jim

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


need some sample Tiles definitions usage

2003-12-30 Thread Jim Anderson
I've taken the Login example from "Struts in Action" and converted it, 
step by step, to use Tiles. I'm at the point where I've created a 
definition entry in tiles-defs.xml but haven't been able to figure out 
how to "invoke" it. Although the book is generally pretty good with 
examples, it unfortunately doesn't give one here.

Any examples appreciated!

Thanks,

jim

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


is there an eta for struts 1.2 beta?

2003-12-30 Thread John McGrath
we've been using a nightly build of 1.2, in order to be be able to more
easily put ActionMessages into the session object. we're a little leery
of putting it into production, though, until there's at least an
official beta... any idea when that might be?
 
this is our first struts project, and we're excited about it. many
thanks to the developers.
 
john


RE: .NET: We are just like Struts... only better.

2003-12-30 Thread Hookom, Jacob
As a follow up to your "by hand" comment, isn't Sun developing a new GUI
development tool to wizard-ize JSF?

Speaking of wizards, can JSF enforce flow in a wizard manner without
additional modifications like Struts?

Thanks much!

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 12:57 PM
To: Struts Users Mailing List
Subject: Re: .NET: We are just like Struts... only better.

Quoting Paul Thomas <[EMAIL PROTECTED]>:

> 
> On 29/12/2003 03:40 Curtis Taylor wrote:
> > This brings up an interesting point (for me, at least): Is anyone on
> > this list developing under Linux w/XEmacs or Emacs? I'm curious as to
> > whether I'm living in the past or not...;-)
> 
> You're in good company . I'm using Linux and Emacs/JDE. That's the nice

> thing about Java development - you can usually choose the tools which suit

> you :)
> 

For what it's worth, nearly all of my personal development work on Struts
has
been, and continues to be, done with XEmacs and Linux ... as does my
development work on JavaServer Faces.  It's important to me personally that
iconoclasts can still use this stuff to develop applications "by hand".  :-)

> -- 
> Paul Thomas

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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Craig R. McClanahan
Quoting Patrick Scheuerer <[EMAIL PROTECTED]>:

> Matthias Wessendorf wrote:
> 
> > Hi Patrick,
> > 
> > you want to get the path of /myapp 
> > like C:\Tomcat\webapps\myapp
> > or?
> 
> That's exactly what i was trying to do!
> 
> > in an actionClass
> > you now want to store
> > in placeString\uploaddir
> > isn´t it?
> 
> Right again :-)
> 
> > i wrote an Util-Class which managed the
> > storage in my action.
> > one parameter is the formfile the other the placeToStore.
> > you can get it, if you want...
> 
> That would be wonderful! Thank you very much for your help!
> 

I would also offer a couple of cautions about this approach:

* You are not guaranteed that a particular servlet container
  even *has* a concept of a directory in which the web app
  is deployed -- for example, even Tomcat can execute a webapp
  directly from the WAR file.  When you do that, getRealPath()
  returns null instead of a pathname, and your calculations above
  will trigger a NullPointerException.

* Even when you know that your apps are being deployed in unpacked
  directories, uploading things directly into that directory means
  you have to be careful about redeployment when you update the app
  -- the normal behavior of "delete the old directory and replace it
  with the new app" wipes out any uploaded files.

I would recommend defining a directory somewhere in your server to hold the
uploaded files for a webapp, and then pass the pathname of this directory to
your app as a context init parameter or something like that.  This approach
deals with both of the problems identified above.

> Patrick
> 

Craig


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



Re: .NET: We are just like Struts... only better.

2003-12-30 Thread Craig R. McClanahan
Quoting Paul Thomas <[EMAIL PROTECTED]>:

> 
> On 29/12/2003 03:40 Curtis Taylor wrote:
> > This brings up an interesting point (for me, at least): Is anyone on
> > this list developing under Linux w/XEmacs or Emacs? I'm curious as to
> > whether I'm living in the past or not...;-)
> 
> You're in good company . I'm using Linux and Emacs/JDE. That's the nice 
> thing about Java development - you can usually choose the tools which suit 
> you :)
> 

For what it's worth, nearly all of my personal development work on Struts has
been, and continues to be, done with XEmacs and Linux ... as does my
development work on JavaServer Faces.  It's important to me personally that
iconoclasts can still use this stuff to develop applications "by hand".  :-)

> -- 
> Paul Thomas

Craig


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



Re: JSF managed beans

2003-12-30 Thread Craig R. McClanahan
Quoting Nadeem Bitar <[EMAIL PROTECTED]>:

> 
> Where and how do Managed Beans and JSF's navigation rules fit in a
> struts/jsf application?
> 

It depends on whether you want all (or part) of your application to migrate to a
JSF for the "controller" type features or not.

In a pure-Struts app that is being modified to use JSF components, you probably
won't use the JSF navigation rules very much -- your decision to stay with the
Struts controller and Action architecture implies that you still want to use
Struts facilities for managing the navigation (forwards and such), so they
won't do you much good.  The managed bean facilities are useful (even here) to
load "backing beans" -- event handlers for UI events, such as the
"RegistrationBacking" class in the example program that's included in the
current nightly builds:

  http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

and managed beans are useful generally if you start using ValueBinding and
MethodBinding APIs programmatically in your own code (very easy to do).  You
don't need to worry about the form bean itself, though ... that gets created on
demand for you in the same way that standard Struts does it.

With the newest beta, it is also possible to have an intermixed application that
uses the Struts controller architecture for part of the app, and use JSF
faclities for the remainder.  In that scenario, you would of course be using
managed beans and the JSF navigation rules for the JSF-based portion of the
app.   In general, though, I'd recommend sticking with one controller
architecture for any partcular application, and think of this as primariy a
transition assistance facility.

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]



Tiles and Portlets (JSR 168)

2003-12-30 Thread Matthias Wessendorf
Hi,

just having a question about Tiles and the Portlet-Spec.

Tiles aims to reduce the work to develop
composite-webpages. which are modular and reusable!

The Portlet-Spec defines a standard incl. Portlet-Container.
A RI is in develop --> http://jakarta.apache.org/pluto


In Pluto-Docs found this about Portlets:

"In contrast to servlets, portlets may not do things like sending
redirects or errors to browsers directly, forwarding requests or writing
arbitrary markup to the output stream to assure that they don´ t
distract the portal web application which uses them."

okay, forwarding etc. in Struts is done by our ActionServlet.

"Another difference compared to servlets is that portlets rely on portal
specific infrastructure functions such as access to user profile
information, standard interface for storing/retrieving persistent
settings, getting client information, etc. Generally, portlets are
administrated more dynamically than servlets typically are."

This functionality should be done in user-action-classes.
My Tiles are also nice to administrate :-)


Now my question:
is tiles familiar to JSR 168 ? or will it move to JSR-168 compilant?
Or is it "just" an "easy and small" way for a composite-page?

Thanks!

Matthias

--
Matthias Weßendorf
Email: mailto:[EMAIL PROTECTED]
URL: http://www.wessendorf.net


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



Re: server-side validation with Validator

2003-12-30 Thread Brice Ruth
Aha, ok ... got it now. Thanks!

Robert Taylor wrote:

One could use DynaValidatorActionForm for wizard processes that used the
same form but
validate different fields based on the path.
robert

 

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 1:29 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator
Yeah, I read pretty much exactly that in Ted's book, but I have to
admit, I'm not entirely sure what it means ... someone previously also
mentioned that the DynaValidatorForm uses the "name" attribute of the
action definition, whereas the DynaValidatorActionForm uses the "path"
... well, my "path" is the path for the Action ... I'm not sure under
what circumstances one would use DynaValidatorActionForm, I guess ...
Matthias Wessendorf wrote:

   

Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator
The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator
-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator
OK, nevermind ... I just needed to change DynaValidatorActionForm to
DynaValidatorForm ... now it works.
Brice Ruth wrote:



 

OK, I have to admit, I'm a bit confused using Validator, despite
looking at the online docs & having Ted's excellent book at hand.
I have everything setup to do server-side validation, as far as I can
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
   

 

it is getting called ... to test if the validation is working, I've
disabled the JavaScript validation by removing the onsubmit call for
my  element ... fine, now I can submit non-valid data.
However, I keep getting to my Action, instead of being shunted back to
   

 

the input page. My input page is defined as a tile definition, here's
what my struts-config.xml looks like (for that section):

 

Does anyone see anything wrong here? To test the validation, I've left
out a required field and I've entered a text string for a numeric
(short) value.
My JavaScript validation seems to be working like a champ, but the
server-side stuff seems MIA, even though its being called.
TIA



   

 

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



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

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


RE: server-side validation with Validator

2003-12-30 Thread Robert Taylor
One could use DynaValidatorActionForm for wizard processes that used the
same form but
validate different fields based on the path.

robert

> -Original Message-
> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 30, 2003 1:29 PM
> To: Struts Users Mailing List
> Subject: Re: server-side validation with Validator
>
>
> Yeah, I read pretty much exactly that in Ted's book, but I have to
> admit, I'm not entirely sure what it means ... someone previously also
> mentioned that the DynaValidatorForm uses the "name" attribute of the
> action definition, whereas the DynaValidatorActionForm uses the "path"
> ... well, my "path" is the path for the Action ... I'm not sure under
> what circumstances one would use DynaValidatorActionForm, I guess ...
>
> Matthias Wessendorf wrote:
>
> >Hi,
> >
> >The DynaValidatorForm will match the formset name with the form-bean
> >name.
> >it uses mapping.getAttribute() to init the validator
> >
> >
> >The DynaValidatorActionForm will match the formset name with the
> >action-mapping path.
> >it uses mapping.getPath() for init the validator
> >
> >-Original Message-
> >From: Brice Ruth [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, December 30, 2003 7:11 PM
> >To: Struts Users Mailing List
> >Subject: Re: server-side validation with Validator
> >
> >
> >OK, nevermind ... I just needed to change DynaValidatorActionForm to
> >DynaValidatorForm ... now it works.
> >
> >Brice Ruth wrote:
> >
> >
> >
> >>OK, I have to admit, I'm a bit confused using Validator, despite
> >>looking at the online docs & having Ted's excellent book at hand.
> >>
> >>I have everything setup to do server-side validation, as far as I can
> >>tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
> >>
> >>
> >
> >
> >
> >>it is getting called ... to test if the validation is working, I've
> >>disabled the JavaScript validation by removing the onsubmit call for
> >>my  element ... fine, now I can submit non-valid data.
> >>However, I keep getting to my Action, instead of being shunted back to
> >>
> >>
> >
> >
> >
> >>the input page. My input page is defined as a tile definition, here's
> >>what my struts-config.xml looks like (for that section):
> >>
> >> >>   path="/US/garden/resources/orangeThumbApply"
> >>   type="com.fiskars.struts.actions.OrangeThumbSaveData"
> >>   name="orangeThumbApp"
> >>   scope="request"
> >>   validate="true"
> >>   input="garden.orangeThumbForm">
> >>>>   name="success"
> >>   path="garden.orangeThumbThankyou"/>
> >>
> >>
> >>Does anyone see anything wrong here? To test the validation, I've left
> >>out a required field and I've entered a text string for a numeric
> >>(short) value.
> >>
> >>My JavaScript validation seems to be working like a champ, but the
> >>server-side stuff seems MIA, even though its being called.
> >>
> >>TIA
> >>
> >>
> >>
> >
> >
> >
>
> --
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: server-side validation with Validator

2003-12-30 Thread Jarnot Voytek Contr AU HQ/SC
When you want different validations for the same form bean when used by
different actions (or action paths).

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam possit
materiari?


> -Original Message-
> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 30, 2003 12:29 PM
> To: Struts Users Mailing List
> Subject: Re: server-side validation with Validator
> 
> 
> Yeah, I read pretty much exactly that in Ted's book, but I have to 
> admit, I'm not entirely sure what it means ... someone 
> previously also 
> mentioned that the DynaValidatorForm uses the "name" attribute of the 
> action definition, whereas the DynaValidatorActionForm uses 
> the "path" 
> ... well, my "path" is the path for the Action ... I'm not sure under 
> what circumstances one would use DynaValidatorActionForm, I guess ...
> 
> Matthias Wessendorf wrote:
> 
> >Hi,
> >
> >The DynaValidatorForm will match the formset name with the form-bean
> >name.
> >it uses mapping.getAttribute() to init the validator
> >
> >
> >The DynaValidatorActionForm will match the formset name with the
> >action-mapping path.
> >it uses mapping.getPath() for init the validator
> >
> >-Original Message-
> >From: Brice Ruth [mailto:[EMAIL PROTECTED] 
> >Sent: Tuesday, December 30, 2003 7:11 PM
> >To: Struts Users Mailing List
> >Subject: Re: server-side validation with Validator
> >
> >
> >OK, nevermind ... I just needed to change DynaValidatorActionForm to 
> >DynaValidatorForm ... now it works.
> >
> >Brice Ruth wrote:
> >
> >  
> >
> >>OK, I have to admit, I'm a bit confused using Validator, despite
> >>looking at the online docs & having Ted's excellent book at hand.
> >>
> >>I have everything setup to do server-side validation, as 
> far as I can
> >>tell ... I've set a breakpoint in 
> DynaValidatorActionForm.validate and
> >>
> >>
> >
> >  
> >
> >>it is getting called ... to test if the validation is working, I've 
> >>disabled the JavaScript validation by removing the onsubmit 
> call for 
> >>my  element ... fine, now I can submit non-valid data. 
> >>However, I keep getting to my Action, instead of being 
> shunted back to
> >>
> >>
> >
> >  
> >
> >>the input page. My input page is defined as a tile 
> definition, here's 
> >>what my struts-config.xml looks like (for that section):
> >>
> >> >>   path="/US/garden/resources/orangeThumbApply"
> >>   type="com.fiskars.struts.actions.OrangeThumbSaveData"
> >>   name="orangeThumbApp"
> >>   scope="request"
> >>   validate="true"
> >>   input="garden.orangeThumbForm">
> >>>>   name="success"
> >>   path="garden.orangeThumbThankyou"/>
> >>
> >>
> >>Does anyone see anything wrong here? To test the 
> validation, I've left
> >>out a required field and I've entered a text string for a numeric 
> >>(short) value.
> >>
> >>My JavaScript validation seems to be working like a champ, but the
> >>server-side stuff seems MIA, even though its being called.
> >>
> >>TIA
> >>
> >>
> >>
> >
> >  
> >
> 
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



Re: server-side validation with Validator

2003-12-30 Thread Brice Ruth
Yeah, I read pretty much exactly that in Ted's book, but I have to 
admit, I'm not entirely sure what it means ... someone previously also 
mentioned that the DynaValidatorForm uses the "name" attribute of the 
action definition, whereas the DynaValidatorActionForm uses the "path" 
... well, my "path" is the path for the Action ... I'm not sure under 
what circumstances one would use DynaValidatorActionForm, I guess ...

Matthias Wessendorf wrote:

Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator
The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator
-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator

OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

 

OK, I have to admit, I'm a bit confused using Validator, despite
looking at the online docs & having Ted's excellent book at hand.
I have everything setup to do server-side validation, as far as I can
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
   

 

it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for 
my  element ... fine, now I can submit non-valid data. 
However, I keep getting to my Action, instead of being shunted back to
   

 

the input page. My input page is defined as a tile definition, here's 
what my struts-config.xml looks like (for that section):


  

Does anyone see anything wrong here? To test the validation, I've left
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the
server-side stuff seems MIA, even though its being called.
TIA

   

 

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


RE: server-side validation with Validator

2003-12-30 Thread Matthias Wessendorf
Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator


The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator


OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

> OK, I have to admit, I'm a bit confused using Validator, despite
> looking at the online docs & having Ted's excellent book at hand.
>
> I have everything setup to do server-side validation, as far as I can
> tell ... I've set a breakpoint in DynaValidatorActionForm.validate and

> it is getting called ... to test if the validation is working, I've 
> disabled the JavaScript validation by removing the onsubmit call for 
> my  element ... fine, now I can submit non-valid data. 
> However, I keep getting to my Action, instead of being shunted back to

> the input page. My input page is defined as a tile definition, here's 
> what my struts-config.xml looks like (for that section):
>
> path="/US/garden/resources/orangeThumbApply"
>type="com.fiskars.struts.actions.OrangeThumbSaveData"
>name="orangeThumbApp"
>scope="request"
>validate="true"
>input="garden.orangeThumbForm">
>name="success"
>path="garden.orangeThumbThankyou"/>
> 
>
> Does anyone see anything wrong here? To test the validation, I've left
> out a required field and I've entered a text string for a numeric 
> (short) value.
>
> My JavaScript validation seems to be working like a champ, but the
> server-side stuff seems MIA, even though its being called.
>
> TIA
>

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


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


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



Re: server-side validation with Validator

2003-12-30 Thread Brice Ruth
OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

OK, I have to admit, I'm a bit confused using Validator, despite 
looking at the online docs & having Ted's excellent book at hand.

I have everything setup to do server-side validation, as far as I can 
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and 
it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for 
my  element ... fine, now I can submit non-valid data. 
However, I keep getting to my Action, instead of being shunted back to 
the input page. My input page is defined as a tile definition, here's 
what my struts-config.xml looks like (for that section):


   

Does anyone see anything wrong here? To test the validation, I've left 
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the 
server-side stuff seems MIA, even though its being called.

TIA

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


server-side validation with Validator

2003-12-30 Thread Brice Ruth
OK, I have to admit, I'm a bit confused using Validator, despite looking 
at the online docs & having Ted's excellent book at hand.

I have everything setup to do server-side validation, as far as I can 
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and 
it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for my 
 element ... fine, now I can submit non-valid data. However, 
I keep getting to my Action, instead of being shunted back to the input 
page. My input page is defined as a tile definition, here's what my 
struts-config.xml looks like (for that section):


   

Does anyone see anything wrong here? To test the validation, I've left 
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the 
server-side stuff seems MIA, even though its being called.

TIA

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


Adding items to a vector of formbean in the jsp

2003-12-30 Thread Paulo Rezende
Struters,

I need help from somebody.

I have a formbean that has a vector property, and my jsp has a iterator that 
renderizes this:

  
  

  
  

If i change the value of any of these inputs and submit the page, the requestprocessor 
parse and update the values of the vector in the formbean correctly.

By if i, dinamicly with dom, create new inputs increasing the index (like in the 
example below) and submit the page, i get a exception of Beans.populate(), a out of 
ranger error.

  newInput = document.createElement("input");
  newInput.type = "hidden";
  newInput.name = "userList[2].id";
  newInput.id   = "id2";
  myHmtlBody.appendChild(inp);

  document.getElementById("id2").value = 3;

  newInput = document.createElement("input");
  newInput.type = "hidden";
  newInput.name = "userList[2].name";
  newInput.id   = "name2";
  myHmtlBody.appendChild(inp);

  document.getElementById("name2").value = "peter";

What i really want is that, when i submit the page, the requestprocessor add a new 
item in the vector and set the values of the new item with the values of the new 
inputs.

Anybody have any thing to say or suggest, any idea?

thanks, Paulo

Re: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Patrick Scheuerer
This is exactly what i was looking for! Thank you very much for your help Matthias.

Patrick

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


Re: Dynamic form property names

2003-12-30 Thread Paul-J Woodward

Hi Pedro,

I would be very grateful if you could send me the code.

Thanks, Paul



   
   
 
  Pedro Salgado
   
 
  <[EMAIL PROTECTED]To:   Struts Users Mailing List 
<[EMAIL PROTECTED]>

  .com>cc: 
   
 
   Subject:  Re: Dynamic form property 
names  
 
  30/12/2003 16:39 
   
 
  Please respond to
   
 
  "Struts Users
   
 
  Mailing List"
   
 
   
   
 
   
   
 






  Sorry but I haven't quite catch what you looking for...
  Do you want to create a form in runtime? Is that it?

  If you're using a DynaForm it already has map. You can't set new
properties to the form (it was built based on a DynaClass) but, if you
extend DynaForm to a XDynaForm and make XDynaForm implement Map maybe you
can set new properties on your new form. I used this approach (the
DynaBean/Map extension) to start using DynaBeans with JSTL and, maybe...
just maybe it can help you set new properties on your form. I can send you
the class, if you want.

  As I said, I haven't tried this (the runtime form approach) and I don't
know if this is what you are looking for...

Pedro Salgado


On 30/12/2003 13:34, "Paul-J Woodward" <[EMAIL PROTECTED]> wrote:

>
> Anyone got any ideas?
>
> Thanks, Paul
>
>
>
>
> "Paul-J Woodward"
>  Mailing List <[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>   cc:
>   Subject:  Dynamic form
> property names
> 29/12/2003 19:55
> Please respond to
> "Struts Users Mailing
> List"
>
>
>
>
>
>
> Dear All,
>
> I have been struggling with this all day, It'll take a bit of background to
> explain what I am trying to do:
>
> I am creating an online wizard to populate templatised web pages, and hence
> create a dynamic struts/tiles-based site.
>
> Each template has various containers for content, each container can be filled
> by a set of different tiles. The templates are defined in a database. The
> definition for a template associates each container with the category of tile
> that it can hold, for instance a template may have containers for navigation
> and menu tiles. The database also contains a list of tiles that fit into each
> category of container.
>
> I would like to create a single form that lists the categories, that has radio
> button for every tile in each category.
> My code looks like this:
>
>  property="elementCategories"
> type="com.db.gci.ge.epg.actions.addcontent.TemplateElementCategory">
> 
>   
>   
>   Compatible elements in this category:
>   
>property="compatibleElements"
> type="com.db.gci.ge.epg.actions.addcontent.TemplateElement">
>
>  idName="compatibleElement" value="name" >
>
>  />
> 
> 
>   
>   
> 
> 
>
>
> The issue is this:
> I need to make the action form map-backed (I thin

Re: RequestProcessor problem

2003-12-30 Thread Pedro Salgado


  Dependencies:

  struts
  servlet
  log4j
  plugincompanion
  log4j

  junit...

  I use a UserContainer to set login, roles and user variables.

  The RoleRequestProcessor tests the user roles against your struts defined
roles... simple.

  I use it in order to have a simple role restriction on my actions... and
in order to have a servlet container independent solution.

  Hope it helps,

Pedro Salgado 

On 30/12/2003 17:01, "Kelly Goedert" <[EMAIL PROTECTED]> wrote:

> If you can send it'll appreciate it.
> 
> Pedro Salgado wrote:
> 
>> On 30/12/2003 11:22, "Kelly Goedert" <[EMAIL PROTECTED]> wrote:
>> 
>>  
>> 
>>> Can anyone give me an example on how to use the RequestProcessor?
>>> 
>>> I want to use the RequestProcessor to check on action roles. Do I have
>>> to subclass it? Or I can use it as it is?
>>> To use roles to I have to configure anything in the container too? Or
>>> just setting the roles parameter and using the RequestProcessor, will
>>> allow mw to check the  roles that the user might have to access that action?
>>>
>>> 
>> 
>>  I made a framework for this purpose. If you want it I can send you the
>> source so you can reuse in any way you like.
>> 
>> Pedro Salgado
>> 
>>  
>> 
>>> Thanks
>>> 
>>> 
>>> -
>>> 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: Date validation problem?

2003-12-30 Thread Brice Ruth
OK, how do I enable server-side validation? I have validate="true" in my 
action-mapping definition, is that all I need?!

Andy Schmidgall wrote:

No, you should be able to do both. I was just saying that if you had
counted on datePattern functionality, and you switch to
datePatternStrict, you may get slightly different results as they are
supposed to act slightly differently. :)
-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 11:08 AM
To: Struts Users Mailing List
Subject: Re: Date validation problem?

How exactly do I get server-side validation? Is this an XOR condition? 
Either javascript or server-side, but not both?

Andy Schmidgall wrote:

 

The javascript should work, yes. I haven't tried this with serverside 
validation though. DatePattern works (or is supposed to work) 
differently than datePatternStrict, so be aware that if you were 
counting on datePattern functionality serverside, it may not work as 
you had expected.

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 10:44 AM
To: Struts Users Mailing List
Subject: Re: Date validation problem?
Aha, so all I need to do is change "datePattern" to "datePatternStrict"
in my XML?
Andy Schmidgall wrote:



   

datePattern doesn't work -- you must use datePatternStrict unless you
modify the javascript validation function.
This line is where the pattern is loaded:

var datePattern = oDate[x][2]("datePatternStrict");

Notice that it's loading datePatternStrict instead of datePattern from
the oDate object. The validation function completely ignores the 
datePattern var you defined in the xml.

You're getting the error because it's trying to load from the
datePatternStrict var which isn't defined, so the javascript 
datePattern var isn't a valid object.

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Date validation problem?
I'm testing the JavaScript validation for my form and noticed that the
 

 

JavaScript generated to validate my date fields throws an error that I
 

 

can see in Firebird's JavaScript console. Here's the error:

datePattern has no properties

and here's the line it occurs on:

for (x in oDate) {

	var value = form[oDate[x][0]].value;

	var datePattern = oDate[x][2]("datePatternStrict");



  

 

	if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type
   

  

 

==

  

 

'textarea') && value.length > 0 && datePattern.length > 0) {
   

  

 

		var MONTH = "MM";

		var DAY = "dd";

		var YEAR = "";

I can see that my date fields appear correctly in DateValidations(),
here:
 function DateValidations () {

  this.aa = new Array("theStartDate", "Availability Start Date is
not a valid date.", new Function ("varName", 
"this.datePattern='MM/dd/yy'; return this[varName];"));

  this.ab = new Array("theEndDate", "Availability End Date is not a
valid date.", new Function ("varName", "this.datePattern='MM/dd/yy'; 
return this[varName];"));

 }

And in my validation.xml file, the following is defined:



	

	

		datePattern

		${defaultDate}

	





	

	

		datePattern

		${defaultDate}

	



Where ${defaultDate} is a global defined as:



	defaultDate

	MM/dd/yy



 

From what I can see in DateValidations(), it looks like the var-value 
   

is being picked up correctly ... so, I'm at a bit of a loss on this. 
Is
  

 



   

this a know bug in Struts 1.1?

Also, does using DynaValidatorForm with validation.xml and such *only*
 

 

do JavaScript validation or is server-side validation performed as
  

 

well?

   

It'd be a nice bonus to have server-side validation, to prevent 
corrupt or malicious submittals, but that may require a custom 
ActionForm?!

  

 



   

 

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


RE: Date validation problem?

2003-12-30 Thread Andy Schmidgall
No, you should be able to do both. I was just saying that if you had
counted on datePattern functionality, and you switch to
datePatternStrict, you may get slightly different results as they are
supposed to act slightly differently. :)

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 11:08 AM
To: Struts Users Mailing List
Subject: Re: Date validation problem?


How exactly do I get server-side validation? Is this an XOR condition? 
Either javascript or server-side, but not both?

Andy Schmidgall wrote:

>The javascript should work, yes. I haven't tried this with serverside 
>validation though. DatePattern works (or is supposed to work) 
>differently than datePatternStrict, so be aware that if you were 
>counting on datePattern functionality serverside, it may not work as 
>you had expected.
>
>-Andy
>
>-Original Message-
>From: Brice Ruth [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 30, 2003 10:44 AM
>To: Struts Users Mailing List
>Subject: Re: Date validation problem?
>
>
>Aha, so all I need to do is change "datePattern" to "datePatternStrict"
>in my XML?
>
>Andy Schmidgall wrote:
>
>  
>
>>datePattern doesn't work -- you must use datePatternStrict unless you
>>modify the javascript validation function.
>>
>>This line is where the pattern is loaded:
>>
>>var datePattern = oDate[x][2]("datePatternStrict");
>>
>>Notice that it's loading datePatternStrict instead of datePattern from
>>the oDate object. The validation function completely ignores the 
>>datePattern var you defined in the xml.
>>
>>You're getting the error because it's trying to load from the
>>datePatternStrict var which isn't defined, so the javascript 
>>datePattern var isn't a valid object.
>>
>>-Andy
>>
>>-Original Message-
>>From: Brice Ruth [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 30, 2003 9:55 AM
>>To: Struts Users Mailing List
>>Subject: Date validation problem?
>>
>>
>>I'm testing the JavaScript validation for my form and noticed that the

>>JavaScript generated to validate my date fields throws an error that I

>>can see in Firebird's JavaScript console. Here's the error:
>>
>>datePattern has no properties
>>
>>and here's the line it occurs on:
>>
>>for (x in oDate) {
>>
>>  var value = form[oDate[x][0]].value;
>>
>>  var datePattern = oDate[x][2]("datePatternStrict");
>>
>> 
>>
>>
>>
if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type
 



>>==
>> 
>>
>>
>>
'textarea') && value.length > 0 && datePattern.length > 0) {
 



>>  var MONTH = "MM";
>>
>>  var DAY = "dd";
>>
>>  var YEAR = "";
>>
>>
>>I can see that my date fields appear correctly in DateValidations(),
>>here:
>>
>>   function DateValidations () {
>>
>>this.aa = new Array("theStartDate", "Availability Start Date is
>>not a valid date.", new Function ("varName", 
>>"this.datePattern='MM/dd/yy'; return this[varName];"));
>>
>>this.ab = new Array("theEndDate", "Availability End Date is not a
>>valid date.", new Function ("varName", "this.datePattern='MM/dd/yy'; 
>>return this[varName];"));
>>
>>   }
>>
>>
>>And in my validation.xml file, the following is defined:
>>
>>
>>
>>  
>>
>>  
>>
>>  datePattern
>>
>>  ${defaultDate}
>>
>>  
>>
>>
>>
>>
>>
>>  
>>
>>  
>>
>>  datePattern
>>
>>  ${defaultDate}
>>
>>  
>>
>>
>>
>>
>>Where ${defaultDate} is a global defined as:
>>
>>
>>
>>  defaultDate
>>
>>  MM/dd/yy
>>
>>
>>
>>
>>From what I can see in DateValidations(), it looks like the var-value 
>>is being picked up correctly ... so, I'm at a bit of a loss on this. 
>>Is
>>
>>
>
>  
>
>>this a know bug in Struts 1.1?
>>
>>Also, does using DynaValidatorForm with validation.xml and such *only*

>>do JavaScript validation or is server-side validation performed as
>>
>>
>well?
>  
>
>>It'd be a nice bonus to have server-side validation, to prevent 
>>corrupt or malicious submittals, but that may require a custom 
>>ActionForm?!
>> 
>>
>>
>>
>
>  
>

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


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


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



FW: Singleton pattern to business delegate

2003-12-30 Thread Viral_Thakkar








Any reply…??

 

-Original Message-
From: Viral_Thakkar

Sent: Tuesday, December 30, 2003 7:03 PM
To: Struts Users Mailing List
Subject: Singleton pattern to
business delegate

 

Hi,

 

Below text I found from sun java forum.

 

“The
pattern catalog describes the business delegate as containing an instance of an
EJBObject where as the service locator can optionally cache an EJBHome object.
The former avoids repeated JNDI lookups and creating an EJB whilst the later
just avoids repeated JNDI lookups. 
Using this strategy, the delegate looks up the home interface and creates an
instance of an EJB on creation; it has a one-to-one relationship with it. We
don’t really want the delegate to have to create an EJB from the home
interface in every method so it should therefore contain an instance member. 

This all means the delegate can’t be a singleton; it can't share that
EJBObject with multiple clients.”

 

Is
there any another pattern which is useful to apply to business delegate
classes?

 

Thanks &
Regards,

Viral

 






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

FW: Stateful session bean

2003-12-30 Thread Viral_Thakkar
Any response...???

-Original Message-
From: Viral_Thakkar 
Sent: Tuesday, December 30, 2003 7:26 PM
To: Struts Users Mailing List
Subject: RE: Stateful session bean

Assuming HttpSession is the place where I will store reference of
business delegate; can I store the ValueObject(VO) object also at
HttpSession (session)?

By storing the VO in session, can we achieve the reduction in network
traffic in operations like update, which will take data from screen,
update VO object of session, use this VO only to update the screen and
pass this VO to EJB to update the database. Here we are reducing the
network traffic by not expecting VO back from EJB. 

Is this seems logical?

Please advice.

Thanks & Regards,
Viral





-Original Message-
From: Nimmons, Buster [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:16 PM
To: 'Struts Users Mailing List'
Subject: RE: Stateful session bean

Even though it seems this is a general J2EE related question it is not.
Unlike most, this individual described the entire environment so that we
may
have a better understanding of the question. Which was, "should store
reference of business delegate in the HttpSession so that another Action
class (some another event in same session) can refer to the existing
stateful session bean instance" that seems like a logical STRUTS related
question to me.

Now to answer the question. HttpSession would be the logical place to
store
the reference to resources needed across multiple HTTP requests

-Original Message-
From: SasiDharma Tharmarajah [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:36 AM
To: Struts Users Mailing List
Subject: RE: Stateful session bean


I suppose this user group mainly caters for struts and strust related
issues...
 
May b u shd try posting it to [EMAIL PROTECTED] or
[EMAIL PROTECTED]
 
sasi
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:29 PM
To: Struts Users Mailing List
Subject: Stateful session bean


Hi all,
 
Please confirm the below understanding of mine.
 
Architecture:
Action --> Business Delegate --> Session Bean --> Database
 
Business delegate will hold a reference of session bean, this uses
Service
locator pattern to get Home Object reference. It will have business
methods
which will invoke corresponding methods on session EJB.
 
In case of stateless session bean, I don't seem any problem but if I
have to
use stateful session bean then I think I should store reference of
business
delegate in the HttpSession so that another Action class (some another
event
in same session) can refer to the existing stateful session bean
instance
through business delegate which can be accessed from HttpSession.
 
Please reply.
 
Thanks & Regards,
Viral
 
 

-
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: Date validation problem?

2003-12-30 Thread Brice Ruth
How exactly do I get server-side validation? Is this an XOR condition? 
Either javascript or server-side, but not both?

Andy Schmidgall wrote:

The javascript should work, yes. I haven't tried this with serverside
validation though. DatePattern works (or is supposed to work)
differently than datePatternStrict, so be aware that if you were
counting on datePattern functionality serverside, it may not work as you
had expected.
-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 10:44 AM
To: Struts Users Mailing List
Subject: Re: Date validation problem?

Aha, so all I need to do is change "datePattern" to "datePatternStrict" 
in my XML?

Andy Schmidgall wrote:

 

datePattern doesn't work -- you must use datePatternStrict unless you 
modify the javascript validation function.

This line is where the pattern is loaded:

var datePattern = oDate[x][2]("datePatternStrict");

Notice that it's loading datePatternStrict instead of datePattern from 
the oDate object. The validation function completely ignores the 
datePattern var you defined in the xml.

You're getting the error because it's trying to load from the 
datePatternStrict var which isn't defined, so the javascript 
datePattern var isn't a valid object.

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Date validation problem?
I'm testing the JavaScript validation for my form and noticed that the
JavaScript generated to validate my date fields throws an error that I 
can see in Firebird's JavaScript console. Here's the error:

datePattern has no properties

and here's the line it occurs on:

for (x in oDate) {

	var value = form[oDate[x][0]].value;

	var datePattern = oDate[x][2]("datePatternStrict");



   

	if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type


   

==

   

'textarea') && value.length > 0 && datePattern.length > 0) {


   

		var MONTH = "MM";

		var DAY = "dd";

		var YEAR = "";

I can see that my date fields appear correctly in DateValidations(),
here:
  function DateValidations () {

   this.aa = new Array("theStartDate", "Availability Start Date is 
not a valid date.", new Function ("varName", 
"this.datePattern='MM/dd/yy'; return this[varName];"));

   this.ab = new Array("theEndDate", "Availability End Date is not a 
valid date.", new Function ("varName", "this.datePattern='MM/dd/yy'; 
return this[varName];"));

  }

And in my validation.xml file, the following is defined:



	

	

		datePattern

		${defaultDate}

	





	

	

		datePattern

		${defaultDate}

	



Where ${defaultDate} is a global defined as:



	defaultDate

	MM/dd/yy



From what I can see in DateValidations(), it looks like the var-value
is being picked up correctly ... so, I'm at a bit of a loss on this. Is
   

 

this a know bug in Struts 1.1?

Also, does using DynaValidatorForm with validation.xml and such *only*
do JavaScript validation or is server-side validation performed as
   

well?
 

It'd be a nice bonus to have server-side validation, to prevent corrupt
or malicious submittals, but that may require a custom ActionForm?!
   

 

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


Re: html:select example

2003-12-30 Thread Carl
some working examples, but I'm not expert ;-)


normal
gras
italique
gras-italique






For the second one, It seems that there is other way to do the same, 
using html:options or html:optioncollection, but I've never used it.

Good luck

Carl

Otávio Augusto wrote:

Would someone show me a very simple example of the use of an html:select tag? I did not understand its use.

I'd appreciate any simple example.

Thanks a lot.

-
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: html:select example

2003-12-30 Thread Steve Raeburn
I have some examples of Struts tags, including html:select, at
http://www.ninsky.com/struts

Various other examples are listed at
http://struts.sourceforge.net/community/examples.html

Steve

Sorry if this is a duplicate message, sent the first one from the wrong
address :-(

> -Original Message-
> From: Otavio Augusto [mailto:[EMAIL PROTECTED]
> Sent: December 30, 2003 8:41 AM
> To: [EMAIL PROTECTED]
> Subject: html:select example
>
>
> Would someone show me a very simple example of the use of an
> html:select tag? I did not understand its use.
>
> I'd appreciate any simple example.
>
> Thanks a lot.
>
> -
> 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: html:select example

2003-12-30 Thread Daniel Lipofsky
> Would someone show me a very simple example of the use of an 
> html:select tag? I did not understand its use.
> 
> I'd appreciate any simple example.


  
  


The select tag can contain a list of option tags, or an options or
optionsCollection tag or any combination.  Here I use 1 option tag to
provide a blank default and a optionsCollection tag with a collection
of LabelValueBean objects to provide the rest of the list (the fact
that the collection contains LabelValueBean objects makes the syntax
much simplier as you don't have to specify the label or value
properties.  The value that matches the value of "someProperty"
will automatically be selected.

- Dan

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



Re: RequestProcessor problem

2003-12-30 Thread Kelly Goedert
If you can send it'll appreciate it.

Pedro Salgado wrote:

On 30/12/2003 11:22, "Kelly Goedert" <[EMAIL PROTECTED]> wrote:

 

Can anyone give me an example on how to use the RequestProcessor?

I want to use the RequestProcessor to check on action roles. Do I have
to subclass it? Or I can use it as it is?
To use roles to I have to configure anything in the container too? Or
just setting the roles parameter and using the RequestProcessor, will
allow mw to check the  roles that the user might have to access that action?
   

 I made a framework for this purpose. If you want it I can send you the
source so you can reuse in any way you like.
Pedro Salgado

 

Thanks

-
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: RequestProcessor problem

2003-12-30 Thread Pedro Salgado
On 30/12/2003 11:22, "Kelly Goedert" <[EMAIL PROTECTED]> wrote:

> Can anyone give me an example on how to use the RequestProcessor?
> 
> I want to use the RequestProcessor to check on action roles. Do I have
> to subclass it? Or I can use it as it is?
> To use roles to I have to configure anything in the container too? Or
> just setting the roles parameter and using the RequestProcessor, will
> allow mw to check the  roles that the user might have to access that action?

  I made a framework for this purpose. If you want it I can send you the
source so you can reuse in any way you like.

Pedro Salgado

> 
> Thanks
> 
> 
> -
> 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: Date validation problem?

2003-12-30 Thread Andy Schmidgall
The javascript should work, yes. I haven't tried this with serverside
validation though. DatePattern works (or is supposed to work)
differently than datePatternStrict, so be aware that if you were
counting on datePattern functionality serverside, it may not work as you
had expected.

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 10:44 AM
To: Struts Users Mailing List
Subject: Re: Date validation problem?


Aha, so all I need to do is change "datePattern" to "datePatternStrict" 
in my XML?

Andy Schmidgall wrote:

>datePattern doesn't work -- you must use datePatternStrict unless you 
>modify the javascript validation function.
>
>This line is where the pattern is loaded:
>
>var datePattern = oDate[x][2]("datePatternStrict");
>
>Notice that it's loading datePatternStrict instead of datePattern from 
>the oDate object. The validation function completely ignores the 
>datePattern var you defined in the xml.
>
>You're getting the error because it's trying to load from the 
>datePatternStrict var which isn't defined, so the javascript 
>datePattern var isn't a valid object.
>
>-Andy
>
>-Original Message-
>From: Brice Ruth [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 30, 2003 9:55 AM
>To: Struts Users Mailing List
>Subject: Date validation problem?
>
>
>I'm testing the JavaScript validation for my form and noticed that the
>JavaScript generated to validate my date fields throws an error that I 
>can see in Firebird's JavaScript console. Here's the error:
>
>datePattern has no properties
>
>and here's the line it occurs on:
>
>for (x in oDate) {
>
>   var value = form[oDate[x][0]].value;
>
>   var datePattern = oDate[x][2]("datePatternStrict");
>
>  
>
>>> if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type
>>>  
>>>
>==
>  
>
>>>'textarea') && value.length > 0 && datePattern.length > 0) {
>>>  
>>>
>
>   var MONTH = "MM";
>
>   var DAY = "dd";
>
>   var YEAR = "";
>
>
>I can see that my date fields appear correctly in DateValidations(),
>here:
>
>function DateValidations () {
>
> this.aa = new Array("theStartDate", "Availability Start Date is 
>not a valid date.", new Function ("varName", 
>"this.datePattern='MM/dd/yy'; return this[varName];"));
>
> this.ab = new Array("theEndDate", "Availability End Date is not a 
>valid date.", new Function ("varName", "this.datePattern='MM/dd/yy'; 
>return this[varName];"));
>
>}
>
>
>And in my validation.xml file, the following is defined:
>
>
>
>   
>
>   
>
>   datePattern
>
>   ${defaultDate}
>
>   
>
>
>
>
>
>   
>
>   
>
>   datePattern
>
>   ${defaultDate}
>
>   
>
>
>
>
>Where ${defaultDate} is a global defined as:
>
>
>
>   defaultDate
>
>   MM/dd/yy
>
>
>
>
> From what I can see in DateValidations(), it looks like the var-value
>is being picked up correctly ... so, I'm at a bit of a loss on this. Is

>this a know bug in Struts 1.1?
>
>Also, does using DynaValidatorForm with validation.xml and such *only*
>do JavaScript validation or is server-side validation performed as
well?
>
>It'd be a nice bonus to have server-side validation, to prevent corrupt
>or malicious submittals, but that may require a custom ActionForm?!
>  
>

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


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


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



html:select example

2003-12-30 Thread Otávio Augusto
Would someone show me a very simple example of the use of an html:select tag? I did 
not understand its use.

I'd appreciate any simple example.

Thanks a lot.

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



Re: Date validation problem?

2003-12-30 Thread Brice Ruth
Aha, so all I need to do is change "datePattern" to "datePatternStrict" 
in my XML?

Andy Schmidgall wrote:

datePattern doesn't work -- you must use datePatternStrict unless you
modify the javascript validation function.
This line is where the pattern is loaded:

var datePattern = oDate[x][2]("datePatternStrict");

Notice that it's loading datePatternStrict instead of datePattern from
the oDate object. The validation function completely ignores the
datePattern var you defined in the xml.
You're getting the error because it's trying to load from the
datePatternStrict var which isn't defined, so the javascript datePattern
var isn't a valid object.
-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Date validation problem?

I'm testing the JavaScript validation for my form and noticed that the 
JavaScript generated to validate my date fields throws an error that I 
can see in Firebird's JavaScript console. Here's the error:

datePattern has no properties

and here's the line it occurs on:

for (x in oDate) { 

	var value = form[oDate[x][0]].value;

	var datePattern = oDate[x][2]("datePatternStrict");

 

	if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type
 

== 
 

'textarea') && value.length > 0 && datePattern.length > 0) {
 

		var MONTH = "MM";

		var DAY = "dd";

		var YEAR = "";

I can see that my date fields appear correctly in DateValidations(),
here:
   function DateValidations () { 

this.aa = new Array("theStartDate", "Availability Start Date is not
a valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';
return this[varName];"));
this.ab = new Array("theEndDate", "Availability End Date is not a
valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';
return this[varName];"));
   } 

And in my validation.xml file, the following is defined:



	

	

		datePattern

		${defaultDate}

	





	

	

		datePattern

		${defaultDate}

	



Where ${defaultDate} is a global defined as:



	defaultDate

	MM/dd/yy



From what I can see in DateValidations(), it looks like the var-value 
is being picked up correctly ... so, I'm at a bit of a loss on this. Is 
this a know bug in Struts 1.1?

Also, does using DynaValidatorForm with validation.xml and such *only* 
do JavaScript validation or is server-side validation performed as well?

It'd be a nice bonus to have server-side validation, to prevent corrupt 
or malicious submittals, but that may require a custom ActionForm?!
 

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


Re: Dynamic form property names

2003-12-30 Thread Pedro Salgado


  Sorry but I haven't quite catch what you looking for...
  Do you want to create a form in runtime? Is that it?

  If you're using a DynaForm it already has map. You can't set new
properties to the form (it was built based on a DynaClass) but, if you
extend DynaForm to a XDynaForm and make XDynaForm implement Map maybe you
can set new properties on your new form. I used this approach (the
DynaBean/Map extension) to start using DynaBeans with JSTL and, maybe...
just maybe it can help you set new properties on your form. I can send you
the class, if you want.

  As I said, I haven't tried this (the runtime form approach) and I don't
know if this is what you are looking for...

Pedro Salgado
 

On 30/12/2003 13:34, "Paul-J Woodward" <[EMAIL PROTECTED]> wrote:

> 
> Anyone got any ideas?
> 
> Thanks, Paul
> 
> 
> 
>  
> "Paul-J Woodward"
>  Mailing List <[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>   cc:
>   Subject:  Dynamic form
> property names   
> 29/12/2003 19:55
> Please respond to
> "Struts Users Mailing
> List"
>  
>  
> 
> 
> 
> 
> Dear All,
> 
> I have been struggling with this all day, It'll take a bit of background to
> explain what I am trying to do:
> 
> I am creating an online wizard to populate templatised web pages, and hence
> create a dynamic struts/tiles-based site.
> 
> Each template has various containers for content, each container can be filled
> by a set of different tiles. The templates are defined in a database. The
> definition for a template associates each container with the category of tile
> that it can hold, for instance a template may have containers for navigation
> and menu tiles. The database also contains a list of tiles that fit into each
> category of container.
> 
> I would like to create a single form that lists the categories, that has radio
> button for every tile in each category.
> My code looks like this:
> 
>  property="elementCategories"
> type="com.db.gci.ge.epg.actions.addcontent.TemplateElementCategory">
> 
>   
>   
>   Compatible elements in this category:
>   
>property="compatibleElements"
> type="com.db.gci.ge.epg.actions.addcontent.TemplateElement">
> 
>  idName="compatibleElement" value="name" >
> 
>  />
> 
> 
>   
>   
> 
> 
> 
> 
> The issue is this:
> I need to make the action form map-backed (I think) because the number of
> radio buttons is only know at runtime, but I can't find any way to name the
> radio buttons by the name of the category that is being selected. What I would
> like to use is value(<%= elementCategory.getName() %>) where my action form
> has a map and a setValue(String key, Object object) function.
>
> Thanks in advance, Paul
> 
> 
> --
> 
> This e-mail may contain confidential and/or privileged information. If you are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is strictly
> forbidden.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> --
> 
> This e-mail may contain confidential and/or privileged information. If you are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is strictly
> forbidden.
> 
> 
> 
> -
> 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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Matthias Wessendorf
and nothing attched:


so see below

Greetings matthias

---
package net.wessendorf.utils.file;

import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;

import org.apache.struts.upload.FormFile;

/**
 * Hilfsklasse, mit welcher aus einer Web-Anwendung
 * Daten zum Web-Server geladen werden können.
 *
 * @author Matthias Wessendorf
 */
public final class UploadFile {

/**
 * 
 * Private Constructor, prevents the class for beeing
 * instanced.
 * 
 *
 */
private UploadFile() {

}

/**
 * 
 * Save a Jakarta FormFile to a preconfigured place.
 * 
 * @param file
 * @return
 */
public static String saveFile(FormFile file){
String retVal = null;

try {
//retrieve the file data
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
InputStream stream = file.getInputStream();
Properties props = new Properties();

//properties must exist

props.load(Thread.currentThread().getContextClassLoader().getResourceAsS
tream("ecards.properties"));
String place= props.getProperty("uploadPath");

if(!place.endsWith("/"))
place = new
StringBuffer(place).insert(place.length(),"/").toString();
retVal = place+file.getFileName();

//write the file to the file specified
OutputStream bos = new FileOutputStream(retVal);
int bytesRead = 0;
byte[] buffer = file.getFileData();
while ((bytesRead = stream.read(buffer)) != -1)
{
bos.write(buffer, 0, bytesRead);
}
bos.close();

//close the stream
stream.close();
}
catch (FileNotFoundException fnfe) {
System.out.println("Datei nicht vorhanden");
fnfe.printStackTrace();
}
catch (IOException ioe) {
ioe.printStackTrace();
}



return retVal;
}

/**
 * 
 * Saves a Jakarta FormFile to a desired place.
 * 
 * @param file - the FormFile to store
 * @param place - the desired place for the file
 * @return place of file
 */
public static String saveFile(FormFile file, String place) {
String retVal = null;

try {
//retrieve the file data
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
InputStream stream = file.getInputStream();

if(!place.endsWith("/"))
place = new
StringBuffer(place).insert(place.length(),"/").toString();

retVal = place+file.getFileName();

//write the file to the file specified
OutputStream bos = new FileOutputStream(retVal);
int bytesRead = 0;
byte[] buffer = file.getFileData();
while ((bytesRead = stream.read(buffer)) != -1)
{
bos.write(buffer, 0, bytesRead);
}
bos.close();

//close the stream
stream.close();
}
catch (FileNotFoundException fnfe) {
System.out.println("File not found");
fnfe.printStackTrace();
}
catch (IOException ioe) {
ioe.printStackTrace();
}



return retVal;
}
}



-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 5:37 PM
To: Struts Users Mailing List
Subject: Re: Still having problems with File upload (multipart-formdata)


construktor ;P

- Original Message - 
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 9:29 AM
Subject: RE: Still having problems with File upload (multipart-formdata)


H

Re: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread David Erickson
construktor ;P

- Original Message - 
From: "Matthias Wessendorf" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 9:29 AM
Subject: RE: Still having problems with File upload (multipart-formdata)


Hi Patrick,
okay attched is my class

it offers only two methods.
soon more... perhaps ;-)

one stores a form-file to a place, defined in a PROPERTIES-File
under uploadPath-KEY

the other stores the file to a place which is the second-parameter ;-)

both methods are static. The class has only a private Construktor,
so it is final... :-)



With

String placeString =
getServlet().getServletContext().getRealPath("/");

you get the Path of your Struts-App
like: C:\Tomcat\webapps\myStrutsApp


so you could use the second like:

UploadFile.saveFile(myFormFile, placeString);

your file is then in root.

hope this is what you needed.

greetings

matthias

-Original Message-
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 5:15 PM
To: Struts Users Mailing List
Subject: Re: Still having problems with File upload (multipart-formdata)


Matthias Wessendorf wrote:

> Hi Patrick,
>
> you want to get the path of /myapp
> like C:\Tomcat\webapps\myapp
> or?

That's exactly what i was trying to do!

> in an actionClass
> you now want to store
> in placeString\uploaddir
> isn´t it?

Right again :-)

> i wrote an Util-Class which managed the
> storage in my action.
> one parameter is the formfile the other the placeToStore.
> you can get it, if you want...

That would be wonderful! Thank you very much for your help!

Patrick


-
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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Matthias Wessendorf
Hi Patrick,
okay attched is my class

it offers only two methods.
soon more... perhaps ;-)

one stores a form-file to a place, defined in a PROPERTIES-File
under uploadPath-KEY

the other stores the file to a place which is the second-parameter ;-)

both methods are static. The class has only a private Construktor,
so it is final... :-)



With

String placeString = 
getServlet().getServletContext().getRealPath("/");

you get the Path of your Struts-App
like: C:\Tomcat\webapps\myStrutsApp


so you could use the second like:

UploadFile.saveFile(myFormFile, placeString);

your file is then in root.

hope this is what you needed.

greetings

matthias

-Original Message-
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 5:15 PM
To: Struts Users Mailing List
Subject: Re: Still having problems with File upload (multipart-formdata)


Matthias Wessendorf wrote:

> Hi Patrick,
> 
> you want to get the path of /myapp
> like C:\Tomcat\webapps\myapp
> or?

That's exactly what i was trying to do!

> in an actionClass
> you now want to store
> in placeString\uploaddir
> isn´t it?

Right again :-)

> i wrote an Util-Class which managed the
> storage in my action.
> one parameter is the formfile the other the placeToStore.
> you can get it, if you want...

That would be wonderful! Thank you very much for your help!

Patrick


-
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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Patrick Scheuerer
Matthias Wessendorf wrote:

Hi Patrick,

you want to get the path of /myapp 
like C:\Tomcat\webapps\myapp
or?
That's exactly what i was trying to do!

in an actionClass
you now want to store
in placeString\uploaddir
isn´t it?
Right again :-)

i wrote an Util-Class which managed the
storage in my action.
one parameter is the formfile the other the placeToStore.
you can get it, if you want...
That would be wonderful! Thank you very much for your help!

Patrick

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


RE: Date validation problem?

2003-12-30 Thread Andy Schmidgall
datePattern doesn't work -- you must use datePatternStrict unless you
modify the javascript validation function.

This line is where the pattern is loaded:

var datePattern = oDate[x][2]("datePatternStrict");

Notice that it's loading datePatternStrict instead of datePattern from
the oDate object. The validation function completely ignores the
datePattern var you defined in the xml.

You're getting the error because it's trying to load from the
datePatternStrict var which isn't defined, so the javascript datePattern
var isn't a valid object.

-Andy

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Date validation problem?


I'm testing the JavaScript validation for my form and noticed that the 
JavaScript generated to validate my date fields throws an error that I 
can see in Firebird's JavaScript console. Here's the error:

datePattern has no properties

and here's the line it occurs on:

for (x in oDate) { 

var value = form[oDate[x][0]].value;

var datePattern = oDate[x][2]("datePatternStrict");

>>  if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type
== 
>>'textarea') && value.length > 0 && datePattern.length > 0) {

var MONTH = "MM";

var DAY = "dd";

var YEAR = "";


I can see that my date fields appear correctly in DateValidations(),
here:

function DateValidations () { 

 this.aa = new Array("theStartDate", "Availability Start Date is not
a valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';
return this[varName];"));

 this.ab = new Array("theEndDate", "Availability End Date is not a
valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';
return this[varName];"));

} 


And in my validation.xml file, the following is defined:







datePattern

${defaultDate}











datePattern

${defaultDate}






Where ${defaultDate} is a global defined as:



defaultDate

MM/dd/yy




 From what I can see in DateValidations(), it looks like the var-value 
is being picked up correctly ... so, I'm at a bit of a loss on this. Is 
this a know bug in Struts 1.1?

Also, does using DynaValidatorForm with validation.xml and such *only* 
do JavaScript validation or is server-side validation performed as well?

It'd be a nice bonus to have server-side validation, to prevent corrupt 
or malicious submittals, but that may require a custom ActionForm?!
-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.

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


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



Date validation problem?

2003-12-30 Thread Brice Ruth
I'm testing the JavaScript validation for my form and noticed that the 
JavaScript generated to validate my date fields throws an error that I 
can see in Firebird's JavaScript console. Here's the error:

datePattern has no properties

and here's the line it occurs on:

for (x in oDate) { 

	var value = form[oDate[x][0]].value;

	var datePattern = oDate[x][2]("datePatternStrict");

	if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type == 'textarea') && value.length > 0 && datePattern.length > 0) {
		var MONTH = "MM";

		var DAY = "dd";

		var YEAR = "";

I can see that my date fields appear correctly in DateValidations(), here:

   function DateValidations () { 

this.aa = new Array("theStartDate", "Availability Start Date is not a valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';  return this[varName];"));

this.ab = new Array("theEndDate", "Availability End Date is not a valid date.", new Function ("varName", "this.datePattern='MM/dd/yy';  return this[varName];"));

   } 

And in my validation.xml file, the following is defined:



	

	

		datePattern

		${defaultDate}

	





	

	

		datePattern

		${defaultDate}

	



Where ${defaultDate} is a global defined as:



	defaultDate

	MM/dd/yy



From what I can see in DateValidations(), it looks like the var-value 
is being picked up correctly ... so, I'm at a bit of a loss on this. Is 
this a know bug in Struts 1.1?

Also, does using DynaValidatorForm with validation.xml and such *only* 
do JavaScript validation or is server-side validation performed as well? 
It'd be a nice bonus to have server-side validation, to prevent corrupt 
or malicious submittals, but that may require a custom ActionForm?!
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.

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


Re: Tutorial for struts-html.tld

2003-12-30 Thread Patrick Scheuerer
[EMAIL PROTECTED] wrote:

Any idea where I can find some tutorials with code snippets on using the
tags contained in struts-html.tld
There's the HTML Taglib API Reference 
(http://jakarta.apache.org/struts/userGuide/struts-html.html) which provides 
detailed information about every tag.

Additionally, you can find some interesting tips for individual tags just by 
googling for the name of the tag (as in ).

Some pages I found useful are:
Use Mulitbox to manage checkboxes (http://husted.com/struts/tips/007.html)
The Struttin' with Struts tutorial also provides some good examples. (e.g. 
http://www.reumann.net/do/struts/lesson3/step9).

Hope this gets you a little bit further.

Patrick

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


simple question on displaytag

2003-12-30 Thread dirk
if I put 
paging.banner.placement=bottom

i get the paging as well in bottom and in top. How can i put it only in the bottom ?

Thanks




Re: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Brice Ruth
Martin Cooper wrote:

"Brice Ruth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
 

I'm refactoring (so to speak) my currently working form, which accepts
an image to be uploaded, to use a DynaValidator(Action?)Form and I'm
again running into an exception being thrown:
java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/FileUploadBase$SizeLimitExceededException
   

This usually happens when your container has another copy of (a different
version of) the Commons FileUpload jar file, and you are not putting all of
your application's jar files in your WEB-INF/lib directory, so that the
wrong jar file is being loaded. Just make sure that your web app is
self-contained and you should be fine.
 

Damn, I tracked this down last time, made sure all the JARs were the 
same version, and somehow a different version has crept in again ... 
Jeesh!! I'll have to track down through CVS how this happened ...

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


RE: .NET: We are just like Struts... only better.

2003-12-30 Thread Nicholson, Robb
This is just marketing propaganda disguised as a technical article. 

If you actually make it to the bottom, on the "rate this article" section,
you will notice that most of the votes are for "1 - very poor", with an
average rating of 3 out of 10. 

Seems even those lined up in the MS camp can tell the difference between "we
are the best" posturing and useful information.

The one big strength MS will always have in this regard, and they exploit it
to the fullest, is the level of "integration" their developers will get from
their IDE. They can afford that level of integration because your only real
choice is developing .NET in Visual Studio on Windows. They don't have to
account for how their stuff might work on other DB's, on other app servers,
on other OS's, etc. 

That level of integration they brag about looks a lot like "vendor lock-in"
to me, and that will almost always be the albatross around the neck of a big
long-lived project. Once you're locked in, the prices of those licenses and
support can go up 900% and it will still be cheaper to pay that ransom than
it will be to rewrite a million lines of code for a different
language/OS/app server.


Design check-list for struts based application

2003-12-30 Thread Kathiresan Murugesan
Hi All,

  I need a check-list to verify a struts based application in all point of
view ( design, development, etc ). Can anyone help me in this regard.

Thanks in advance

Kathir

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



Re: html:link LookupDispatchAction

2003-12-30 Thread Kris Schneider

  


  


Another suggestion. Unless the map returned by getKeyMethodMap is dynamic,
create it once as a static field:

private static final Map KEY_METHOD_MAP = new HashMap();
static {
  // populate map
}

protected Map getKeyMethodMap() {
  return KEY_METHOD_MAP;
}

Quoting Ronald Rotteveel <[EMAIL PROTECTED]>:

> Dear struts users,
> 
> In every webapplication there are links. As I read in "Struts in Action",
> it's better to make links with actions.
> 
> I'm now working on some part of the application where we have to do a lot
> of
> CRUD actions, so I want to use the LookupDispatchAction. Inserting/creating
> records in the database works great now, but I also would like to use the
> LookupDispatchAction for initiating the forms I'm using, but then without
> having to use submit buttons.
> 
> Therefore I read some postings on this mailinglist that discussed the
> opportunity to use the html:link tag to do this. Unfortunately I can't get
> it working, so if somebody would have a look at the code I would be very
> happy!
> 
>  LookupDispatchAction (CustomerLookupDispatchAction) ###
> public Map getKeyMethodMap()
> {
>  Map map = new HashMap();
>  map.put("customer.form.button.initcreateform", "initCreateForm");
>  map.put("customer.form.button.initupdateform", "initUpdateForm");
>  map.put("form.button.create", "create");
>  map.put("form.button.read", "read");
>  map.put("form.button.update", "update");
>  map.put("form.button.delete", "delete");
> 
>  return map;
> }
> 
> public ActionForward initCreateForm(
>  ActionMapping mapping,
>  ActionForm form,
>  HttpServletRequest request,
>  HttpServletResponse response)
>  throws Exception
> {
>  resetToken(request);
>  removeFormBean(mapping,request);
> 
>  return mapping.findForward("form");
> }
> 
> ### JSP code (part of it) ###
>  value="customer.form.button.initcreateform"/>
>  paramId="method" paramName="CustomerCreateForm" styleClass="tree"
> transaction="true"> />
> 
> ### application.resources ###
> customer.form.button.initcreateform=Add customer
> customer.form.button.initupdateform=Update customer
> 
> ### struts-config.xml ###
> parameter="method" path="/maintenance/lookupDispatchCustomerSubmit"
>scope="request"
>type="com.mit.op.actions.maintenance.CustomerLookupDispatchAction"
> validate="true">
> redirect="false"/>
> 
> 
> 
> Any suggestions are welcome!
> 
> 
> Thanks in advance!
> 
> 
> Beste regards,
> 
> Ronald Rotteveel

-- 
Kris Schneider 
D.O.Tech   

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



RE: [Tiles] Populating Tiles definition attribute at runtime

2003-12-30 Thread Robert Taylor
Thanks to all who replied. I'll look into each suggested solution more
closely.

robert

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 29, 2003 2:15 PM
> To: Struts Users Mailing List
> Subject: RE: [Tiles] Populating Tiles definition attribute at runtime
>
>
> Thanks for the reply Pedro, but I was looking for a cleaner solution.
>
> robert
>
> > -Original Message-
> > From: Pedro Salgado [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 29, 2003 12:51 PM
> > To: Struts Users Mailing List
> > Subject: Re: [Tiles] Populating Tiles definition attribute at runtime
> >
> >
> >
> >   I don¹t know if it is possible to change a tiles definition at
> > runtime but
> > a solution to your problem could be solved by specifying a
> definition that
> > uses a jsp file that does a conditional include according to a given
> > parameter?
> >
> > 
> >   
> >  <-
> >
> > 
> >
> > > choose.jsp
> >
> > 
> >
> >
> > Pedro Salgado
> >
> >
> > On 29/12/2003 17:46, "Robert Taylor" <[EMAIL PROTECTED]> wrote:
> >
> > > Greetings, I have a tiles definition in my tiles-defs.xml
> > similar to below:
> > >
> > > 
> > >   
> > >   
> > > 
> > >
> > > which I would like to be able to modify the "heading" value such that
> > > at runtime I could substitute a value for {0}.
> > >
> > > For example, it would be ideal to use a JSTL type of syntax such as:
> > >
> > > 
> > >   
> > >   
> > > 
> > >
> > > but this does not work.
> > >
> > >
> > >
> > > robert
> > >
> > > -
> > > 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: Stateful session bean

2003-12-30 Thread Viral_Thakkar
Assuming HttpSession is the place where I will store reference of
business delegate; can I store the ValueObject(VO) object also at
HttpSession (session)?

By storing the VO in session, can we achieve the reduction in network
traffic in operations like update, which will take data from screen,
update VO object of session, use this VO only to update the screen and
pass this VO to EJB to update the database. Here we are reducing the
network traffic by not expecting VO back from EJB. 

Is this seems logical?

Please advice.

Thanks & Regards,
Viral





-Original Message-
From: Nimmons, Buster [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:16 PM
To: 'Struts Users Mailing List'
Subject: RE: Stateful session bean

Even though it seems this is a general J2EE related question it is not.
Unlike most, this individual described the entire environment so that we
may
have a better understanding of the question. Which was, "should store
reference of business delegate in the HttpSession so that another Action
class (some another event in same session) can refer to the existing
stateful session bean instance" that seems like a logical STRUTS related
question to me.

Now to answer the question. HttpSession would be the logical place to
store
the reference to resources needed across multiple HTTP requests

-Original Message-
From: SasiDharma Tharmarajah [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:36 AM
To: Struts Users Mailing List
Subject: RE: Stateful session bean


I suppose this user group mainly caters for struts and strust related
issues...
 
May b u shd try posting it to [EMAIL PROTECTED] or
[EMAIL PROTECTED]
 
sasi
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:29 PM
To: Struts Users Mailing List
Subject: Stateful session bean


Hi all,
 
Please confirm the below understanding of mine.
 
Architecture:
Action --> Business Delegate --> Session Bean --> Database
 
Business delegate will hold a reference of session bean, this uses
Service
locator pattern to get Home Object reference. It will have business
methods
which will invoke corresponding methods on session EJB.
 
In case of stateless session bean, I don't seem any problem but if I
have to
use stateful session bean then I think I should store reference of
business
delegate in the HttpSession so that another Action class (some another
event
in same session) can refer to the existing stateful session bean
instance
through business delegate which can be accessed from HttpSession.
 
Please reply.
 
Thanks & Regards,
Viral
 
 

-
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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Matthias Wessendorf
Hi Patrick,

you want to get the path of /myapp 
like C:\Tomcat\webapps\myapp
or?

that is done with:

String placeString = 
getServlet().getServletContext().getRealPath("/");

in an actionClass.

you now want to store
in placeString\uploaddir
isn´t it?

i wrote an Util-Class which managed the
storage in my action.
one parameter is the formfile the other the placeToStore.
you can get it, if you want...



-Original Message-
From: Patrick Scheuerer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 1:12 PM
To: Struts Users Mailing List
Subject: Re: Still having problems with File upload (multipart-formdata)


Brice Ruth wrote:

> I'm refactoring (so to speak) my currently working form, which accepts
> an image to be uploaded, to use a DynaValidator(Action?)Form and I'm 
> again running into an exception being thrown:

Hi Brice,
I'm also struggling with file uploads at the moment. But I'm stuck at an
earlier 
stage than you.
Could you please post some of your code on how to handle the file upload
in the 
action class?
I'm having problems to figure out how to write the file to a
subdirectory of my 
web application root.

Your help would be highly appreciated!
Thank you, Patrick


-
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: RequestProcessor problem

2003-12-30 Thread Kelly Goedert
As you suggested I now trying to use JDBC/Realm:

but I get the following error from tomcat
HTTP Status 400 - User is not authorized to access action /login
My server.xml is like this (I followed the tomcat docs):


   
   
driverName="org.gjt.mm.mysql.Driver"

connectionURL="jdbc:mysql://localhost/locadora?user=mysql&password=mysql"
userTable="users" userNameCol="username" userCredCol="password"
userRoleTable="userRoles" roleNameCol="rolename"/>
   

The database is created in mysql like this:
database name: locadora
table users:
  columns: username, password which values are user, user
table userRoles:
  columns: username, rolename which values are user, adm
My struts-config.xml is like this:

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

   
   
   
   
   
   
   
   
  
   
   
   
   

   
   
   
   roles = "adm"
   type="LoginAction"
   name = "loginForm"
   scope="request"
   input="/index.jsp"
   validate="true">
   
   name="continue"
   path="/principal.jsp"/>
   
   name="erro"
   path="/index.jsp"/>
   
   
 
  
   
   
   parameter="resources.application"/>
  
 
   
   
   


Can anyone point me what I'm missing?



Mohan Radhakrishnan wrote:

You can use a vendor-specify API ( JDBC/Realm ) to map to user/role tables.
You can also use the XML file ( tomcat-users.xml ) instead with hard-coded
values.
You don't have to extend RequestProcessor if you are using CMA.
 

If you want to do application based-security then you need to extend the
RequestProcessor and over-ride the processRoles() method.
   

You can read the tomcat JDBC/Realm doc. in the apache site. It is similar
for other
containers.
http://kb.atlassian.com/content/tutorials/jollem/orion-security-primer/ is
another good site explaining OC4J roles.
Mohan
-Original Message-
From: Kelly Goedert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 5:26 PM
To: Struts Users Mailing List
Subject: Re: RequestProcessor problem
Paul,

Thanks for your help, I've checked this links already and they didn help
me much. What I want is (following your example below): when the user
has the  role  uploader assigned to him he may call this action
uploadfile.
Now: where do I define the relation user/role? Do I use a JDBC/Realm?
If I want to check this relation in my application should I externd
RequestProcessor? (I believe so).
If I don't want to extend the RequestProcessor, and use it as it is,
where do I mantain the user/role relationship?
Kelly.

Paul-J Woodward wrote:

 

My understanding is:

The request processor will check on action roles if they are defined in
   

your struts-config.xml file e.g.:
 


   

type="com.db.gci.ge.epg.actions.UploadFileAction" name="fileUploadForm"
scope="request" validate="false" input="/uploadFile.jsp" roles="uploader">
 



If you want to do application based-security then you need to extend the
   

RequestProcessor and over-ride the processRoles() method.
 

I'm currently looking into application-based security, this is all I have
   

found so far:
 

http://puneetdelhi.tripod.com/
http://www.junlu.com/msg/40353.html
If you need more help and noone else replies, I'll write what I have found
   

in a few hours.
 

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



Kelly Goedert
<[EMAIL PROTECTED]To:   Struts Users
   

Mailing List <[EMAIL PROTECTED]>
 

xxera.com>   cc:
 Subject:  RequestProcessor
   

problem
 

30/12/2003 11:22
Please respond to
"Struts Users
Mailing List"




Can anyone give me an example on how to use the RequestProcessor?

I want to use the RequestProcessor to check on action roles. Do I have
to subclass it? Or I can use it as it is?
To use roles to I have to configure anything in the container too? Or
just setting the roles parameter and using the RequestProcessor, will
allow mw to check the  roles that the user might have to access that
   

action?
 

Thanks

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




--

This e-mail may contain confidential and/or privileged information. If you
   

are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-ma

RE: Stateful session bean

2003-12-30 Thread Viral_Thakkar
Are there any other alternatives available for this situation?

Thanks,
Viral

-Original Message-
From: Nimmons, Buster [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:16 PM
To: 'Struts Users Mailing List'
Subject: RE: Stateful session bean

Even though it seems this is a general J2EE related question it is not.
Unlike most, this individual described the entire environment so that we
may
have a better understanding of the question. Which was, "should store
reference of business delegate in the HttpSession so that another Action
class (some another event in same session) can refer to the existing
stateful session bean instance" that seems like a logical STRUTS related
question to me.

Now to answer the question. HttpSession would be the logical place to
store
the reference to resources needed across multiple HTTP requests

-Original Message-
From: SasiDharma Tharmarajah [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:36 AM
To: Struts Users Mailing List
Subject: RE: Stateful session bean


I suppose this user group mainly caters for struts and strust related
issues...
 
May b u shd try posting it to [EMAIL PROTECTED] or
[EMAIL PROTECTED]
 
sasi
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:29 PM
To: Struts Users Mailing List
Subject: Stateful session bean


Hi all,
 
Please confirm the below understanding of mine.
 
Architecture:
Action --> Business Delegate --> Session Bean --> Database
 
Business delegate will hold a reference of session bean, this uses
Service
locator pattern to get Home Object reference. It will have business
methods
which will invoke corresponding methods on session EJB.
 
In case of stateless session bean, I don't seem any problem but if I
have to
use stateful session bean then I think I should store reference of
business
delegate in the HttpSession so that another Action class (some another
event
in same session) can refer to the existing stateful session bean
instance
through business delegate which can be accessed from HttpSession.
 
Please reply.
 
Thanks & Regards,
Viral
 
 

-
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: Stateful session bean

2003-12-30 Thread Nimmons, Buster
Even though it seems this is a general J2EE related question it is not.
Unlike most, this individual described the entire environment so that we may
have a better understanding of the question. Which was, "should store
reference of business delegate in the HttpSession so that another Action
class (some another event in same session) can refer to the existing
stateful session bean instance" that seems like a logical STRUTS related
question to me.

Now to answer the question. HttpSession would be the logical place to store
the reference to resources needed across multiple HTTP requests

-Original Message-
From: SasiDharma Tharmarajah [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:36 AM
To: Struts Users Mailing List
Subject: RE: Stateful session bean


I suppose this user group mainly caters for struts and strust related
issues...
 
May b u shd try posting it to [EMAIL PROTECTED] or
[EMAIL PROTECTED]
 
sasi
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:29 PM
To: Struts Users Mailing List
Subject: Stateful session bean


Hi all,
 
Please confirm the below understanding of mine.
 
Architecture:
Action --> Business Delegate --> Session Bean --> Database
 
Business delegate will hold a reference of session bean, this uses Service
locator pattern to get Home Object reference. It will have business methods
which will invoke corresponding methods on session EJB.
 
In case of stateless session bean, I don't seem any problem but if I have to
use stateful session bean then I think I should store reference of business
delegate in the HttpSession so that another Action class (some another event
in same session) can refer to the existing stateful session bean instance
through business delegate which can be accessed from HttpSession.
 
Please reply.
 
Thanks & Regards,
Viral
 
 

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



RE: Stateful session bean

2003-12-30 Thread SasiDharma Tharmarajah
I suppose this user group mainly caters for struts and strust related issues...
 
May b u shd try posting it to [EMAIL PROTECTED] or
[EMAIL PROTECTED]
 
sasi
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:29 PM
To: Struts Users Mailing List
Subject: Stateful session bean


Hi all,
 
Please confirm the below understanding of mine.
 
Architecture:
Action --> Business Delegate --> Session Bean --> Database
 
Business delegate will hold a reference of session bean, this uses Service locator 
pattern to get Home Object reference. It will have business methods which will invoke 
corresponding methods on session EJB.
 
In case of stateless session bean, I don't seem any problem but if I have to use 
stateful session bean then I think I should store reference of business delegate in 
the HttpSession so that another Action class (some another event in same session) can 
refer to the existing stateful session bean instance through business delegate which 
can be accessed from HttpSession.
 
Please reply.
 
Thanks & Regards,
Viral
 
 


Singleton pattern to business delegate

2003-12-30 Thread Viral_Thakkar








Hi,

 

Below text I found from sun java forum.

 

“The
pattern catalog describes the business delegate as containing an instance of an
EJBObject where as the service locator can optionally cache an EJBHome object. The
former avoids repeated JNDI lookups and creating an EJB whilst the later just
avoids repeated JNDI lookups. 
Using this strategy, the delegate looks up the home interface and creates an
instance of an EJB on creation; it has a one-to-one relationship with it. We
don’t really want the delegate to have to create an EJB from the home
interface in every method so it should therefore contain an instance member. 

This all means the delegate can’t be a singleton; it can't share that
EJBObject with multiple clients.”

 

Is
there any another pattern which is useful to apply to business delegate
classes?

 

Thanks &
Regards,

Viral

 






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

Re: Dynamic form property names

2003-12-30 Thread Paul-J Woodward

Anyone got any ideas?

Thanks, Paul



   
   
  
  "Paul-J Woodward"
   
  
 
 
  [EMAIL PROTECTED]>   cc: 
   
 
Subject:  Dynamic form property 
names  
 
  29/12/2003 19:55 
   
  
  Please respond to
   
  
  "Struts Users Mailing
   
  
  List"
   
  
   
   
  
   
   
  




Dear All,

I have been struggling with this all day, It'll take a bit of background to explain 
what I am trying to do:

I am creating an online wizard to populate templatised web pages, and hence create a 
dynamic struts/tiles-based site.

Each template has various containers for content, each container can be filled by a 
set of different tiles. The templates are defined in a database. The definition for a 
template associates each container with the category of tile that it can hold, for 
instance a template may have containers for navigation and menu tiles. The database 
also contains a list of tiles that fit into each category of container.

I would like to create a single form that lists the categories, that has radio button 
for every tile in each category.
My code looks like this:

  
  


Compatible elements in this category:



  

  
  
  


  
  


The issue is this:
I need to make the action form map-backed (I think) because the number of radio 
buttons is only know at runtime, but I can't find any way to name the radio buttons by 
the name of the category that is being selected. What I would like to use is value(<%= 
elementCategory.getName() %>) where my action form has a map and a setValue(String 
key, Object object) function.

Thanks in advance, Paul


--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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





--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



Stateful session bean

2003-12-30 Thread Viral_Thakkar








Hi all,

 

Please confirm the below understanding of
mine.

 

Architecture:

Action à Business Delegate à
Session Bean à
Database

 

Business delegate will hold a reference of
session bean, this uses Service locator pattern to get Home Object reference.
It will have business methods which will invoke corresponding methods on session
EJB.

 

In case of stateless
session bean, I don’t seem any problem but if I have to use stateful session bean then I think
I should store reference of business delegate in the HttpSession so that another
Action class (some another event in same session) can refer to the existing
stateful session bean instance through business delegate which can be accessed
from HttpSession.

 

Please reply.

 

Thanks & Regards,

Viral

 

 






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

Tiles & self-reference

2003-12-30 Thread Andriy Ruzhevych
Hi.
I'm using Struts 1.1 with Tiles and have some problems with
self-referencing.
When I call calendar java script to bring up popup calendar window, I
receive exception like
"javax.servlet.jsp.JspException: Error - tag importAttribute : no tiles
context found."

That's my piece of code



var cal1 = new CalendarPopup();

select


How can I solved there?


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



Re: how to submit action form while invoking a popup

2003-12-30 Thread Domingo A. Rodriguez S.

You mean something like this?

.script.
var a= window.open(url,"childwin",features);
parent.document.YourFormName.action='<%=target%>';
parent.document.YourFormName.submit();
./script.

Atte.
Domingo A. Rodriguez S.

 --- Nisith Dash <[EMAIL PROTECTED]> escribió: > Hi,
> 
> i am using   window.open(url,"childwin",features) to open  pop up screen
> where
> the url= contextRoot + '/someAction.do?'. I also want to submit the
> action form of my parent screen so that i can use it in the action class
> method corresponding to my action mapping someAction.do?.
> 
> How can in do it using java script. Any suggestions???
> 
> Thanks,
> Nisith> ** Message from InterScan E-Mail VirusWall NT **
> 
> ** No virus found in attached file noname.htm
> ** No virus found in attached file noname.htm
> 
> NO VIRUS FOUND: SERVER GENERATED MESSAGE
> * End of message ***
> 
> 
> > DISCLAIMER: The information contained in this message is intended only
> and solely for the addressed individual or entity indicated in this
> message and for the exclusive use of the said addressed individual or
> entity indicated in this message (or responsible for delivery of the
> message to such person) and may contain legally privileged and
> confidential information belonging to Tata Consultancy Services. It must
> not be printed, read, copied, disclosed, forwarded, distributed or used
> (in whatsoever manner) by any person other than the addressee.
> Unauthorized use, disclosure or copying is strictly prohibited and may
> constitute unlawful act and can possibly attract legal action, civil
> and/or criminal. The contents of this message need not necessarily
> reflect or endorse the views of Tata Consultancy Services on any subject
> matter. Any action taken or omitted to be taken based on this message is
> entirely at your risk and neither the originator of this message nor
> Tata Consultancy Services takes any responsibility or liability towards
> the same. Opinions, conclusions and any other information contained in
> this message that do not relate to the official business of Tata
> Consultancy Services shall be understood as neither given nor endorsed
> by Tata Consultancy Services or any affiliate of Tata Consultancy
> Services. If you have received this message in error, you should destroy
> this message and may please notify the sender by e-mail. Thank you.
> 
> 
> > -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] 

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: .NET: We are just like Struts... only better.

2003-12-30 Thread Paul Thomas
On 29/12/2003 03:40 Curtis Taylor wrote:
This brings up an interesting point (for me, at least): Is anyone on
this list developing under Linux w/XEmacs or Emacs? I'm curious as to
whether I'm living in the past or not...;-)
You're in good company . I'm using Linux and Emacs/JDE. That's the nice 
thing about Java development - you can usually choose the tools which suit 
you :)

--
Paul Thomas
+--+-+
| Thomas Micro Systems Limited | Software Solutions for the Smaller 
Business |
| Computer Consultants | 
http://www.thomas-micro-systems-ltd.co.uk   |
+--+-+

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


html:link LookupDispatchAction

2003-12-30 Thread Ronald Rotteveel
Dear struts users,

In every webapplication there are links. As I read in "Struts in Action",
it's better to make links with actions.

I'm now working on some part of the application where we have to do a lot of
CRUD actions, so I want to use the LookupDispatchAction. Inserting/creating
records in the database works great now, but I also would like to use the
LookupDispatchAction for initiating the forms I'm using, but then without
having to use submit buttons.

Therefore I read some postings on this mailinglist that discussed the
opportunity to use the html:link tag to do this. Unfortunately I can't get
it working, so if somebody would have a look at the code I would be very
happy!

 LookupDispatchAction (CustomerLookupDispatchAction) ###
public Map getKeyMethodMap()
{
 Map map = new HashMap();
 map.put("customer.form.button.initcreateform", "initCreateForm");
 map.put("customer.form.button.initupdateform", "initUpdateForm");
 map.put("form.button.create", "create");
 map.put("form.button.read", "read");
 map.put("form.button.update", "update");
 map.put("form.button.delete", "delete");

 return map;
}

public ActionForward initCreateForm(
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws Exception
{
 resetToken(request);
 removeFormBean(mapping,request);

 return mapping.findForward("form");
}

### JSP code (part of it) ###



### application.resources ###
customer.form.button.initcreateform=Add customer
customer.form.button.initupdateform=Update customer

### struts-config.xml ###

   



Any suggestions are welcome!


Thanks in advance!


Beste regards,

Ronald Rotteveel


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



RE: RequestProcessor problem

2003-12-30 Thread Mohan Radhakrishnan

 You can use a vendor-specify API ( JDBC/Realm ) to map to user/role tables.
 You can also use the XML file ( tomcat-users.xml ) instead with hard-coded
values.
 You don't have to extend RequestProcessor if you are using CMA.

>If you want to do application based-security then you need to extend the
>RequestProcessor and over-ride the processRoles() method.

You can read the tomcat JDBC/Realm doc. in the apache site. It is similar
for other
containers.
http://kb.atlassian.com/content/tutorials/jollem/orion-security-primer/ is
another good site explaining OC4J roles.
Mohan

-Original Message-
From: Kelly Goedert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 5:26 PM
To: Struts Users Mailing List
Subject: Re: RequestProcessor problem


Paul,

Thanks for your help, I've checked this links already and they didn help
me much. What I want is (following your example below): when the user
has the  role  uploader assigned to him he may call this action
uploadfile.
Now: where do I define the relation user/role? Do I use a JDBC/Realm?
If I want to check this relation in my application should I externd
RequestProcessor? (I believe so).
If I don't want to extend the RequestProcessor, and use it as it is,
where do I mantain the user/role relationship?

Kelly.

Paul-J Woodward wrote:

>My understanding is:
>
>The request processor will check on action roles if they are defined in
your struts-config.xml file e.g.:
>
>
>
>If you want to do application based-security then you need to extend the
RequestProcessor and over-ride the processRoles() method.
>
>I'm currently looking into application-based security, this is all I have
found so far:
>http://puneetdelhi.tripod.com/
>http://www.junlu.com/msg/40353.html
>
>If you need more help and noone else replies, I'll write what I have found
in a few hours.
>
>Paul
>
>Global Equity Derivatives Technology
>Deutsche Bank [/]
>Office  +44 (0)20 754 55458
>Mobile +44 (0)7736 299483
>Fax  +44 (0)20 7547 2752
>
>
>
>
>  Kelly Goedert
>  <[EMAIL PROTECTED]To:   Struts Users
Mailing List <[EMAIL PROTECTED]>
>  xxera.com>   cc:
>   Subject:  RequestProcessor
problem
>  30/12/2003 11:22
>  Please respond to
>  "Struts Users
>  Mailing List"
>
>
>
>
>
>
>Can anyone give me an example on how to use the RequestProcessor?
>
>I want to use the RequestProcessor to check on action roles. Do I have
>to subclass it? Or I can use it as it is?
>To use roles to I have to configure anything in the container too? Or
>just setting the roles parameter and using the RequestProcessor, will
>allow mw to check the  roles that the user might have to access that
action?
>
>Thanks
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>--
>
>This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
>
>
>
>-
>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: Still having problems with File upload (multipart-formdata)

2003-12-30 Thread Patrick Scheuerer
Brice Ruth wrote:

I'm refactoring (so to speak) my currently working form, which accepts 
an image to be uploaded, to use a DynaValidator(Action?)Form and I'm 
again running into an exception being thrown:
Hi Brice,
I'm also struggling with file uploads at the moment. But I'm stuck at an earlier 
stage than you.
Could you please post some of your code on how to handle the file upload in the 
action class?
I'm having problems to figure out how to write the file to a subdirectory of my 
web application root.

Your help would be highly appreciated!
Thank you, Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: RequestProcessor problem

2003-12-30 Thread Kelly Goedert
Paul,

Thanks for your help, I've checked this links already and they didn help 
me much. What I want is (following your example below): when the user 
has the  role  uploader assigned to him he may call this action 
uploadfile. 
Now: where do I define the relation user/role? Do I use a JDBC/Realm?
If I want to check this relation in my application should I externd 
RequestProcessor? (I believe so).
If I don't want to extend the RequestProcessor, and use it as it is, 
where do I mantain the user/role relationship?

Kelly.

Paul-J Woodward wrote:

My understanding is:

The request processor will check on action roles if they are defined in your 
struts-config.xml file e.g.:


If you want to do application based-security then you need to extend the RequestProcessor and over-ride the processRoles() method.

I'm currently looking into application-based security, this is all I have found so far:
http://puneetdelhi.tripod.com/
http://www.junlu.com/msg/40353.html
If you need more help and noone else replies, I'll write what I have found in a few hours.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752

  
 Kelly Goedert
 <[EMAIL PROTECTED]To:   Struts Users Mailing List <[EMAIL PROTECTED]>
 xxera.com>   cc: 
  Subject:  RequestProcessor problem  
 30/12/2003 11:22 
 Please respond to
 "Struts Users
 Mailing List"
  
  



Can anyone give me an example on how to use the RequestProcessor?

I want to use the RequestProcessor to check on action roles. Do I have
to subclass it? Or I can use it as it is?
To use roles to I have to configure anything in the container too? Or
just setting the roles parameter and using the RequestProcessor, will
allow mw to check the  roles that the user might have to access that action?
Thanks

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




--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



-
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: RequestProcessor problem

2003-12-30 Thread Paul-J Woodward

My understanding is:

The request processor will check on action roles if they are defined in your 
struts-config.xml file e.g.:



If you want to do application based-security then you need to extend the 
RequestProcessor and over-ride the processRoles() method.

I'm currently looking into application-based security, this is all I have found so far:
http://puneetdelhi.tripod.com/
http://www.junlu.com/msg/40353.html

If you need more help and noone else replies, I'll write what I have found in a few 
hours.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



   
   
 
  Kelly Goedert
   
 
  <[EMAIL PROTECTED]To:   Struts Users Mailing List 
<[EMAIL PROTECTED]>

  xxera.com>   cc: 
   
 
   Subject:  RequestProcessor problem  
   
 
  30/12/2003 11:22 
   
 
  Please respond to
   
 
  "Struts Users
   
 
  Mailing List"
   
 
   
   
 
   
   
 




Can anyone give me an example on how to use the RequestProcessor?

I want to use the RequestProcessor to check on action roles. Do I have
to subclass it? Or I can use it as it is?
To use roles to I have to configure anything in the container too? Or
just setting the roles parameter and using the RequestProcessor, will
allow mw to check the  roles that the user might have to access that action?

Thanks


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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



RequestProcessor problem

2003-12-30 Thread Kelly Goedert
Can anyone give me an example on how to use the RequestProcessor?

I want to use the RequestProcessor to check on action roles. Do I have 
to subclass it? Or I can use it as it is?
To use roles to I have to configure anything in the container too? Or 
just setting the roles parameter and using the RequestProcessor, will  
allow mw to check the  roles that the user might have to access that action?

Thanks

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


Re: array property in ActionForm ???

2003-12-30 Thread Mark Lowe
public class Player {
private String name;
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

...

DynaActionForm playerForm = (DynaActionForm) form;

ArrayList playerList = new ArrayList();

Player p1 = new Player();
p1.setName("Brian");
Player p2 = new Player();
p2.setName("Henry");
playerList.add(p1);
playerList.add(p2);
playerForm.set("player",playerList);

...



The form needs to be scoped to session.





On 30 Dec 2003, at 11:00, Mark Lowe wrote:





On 30 Dec 2003, at 07:49, Patrick Cheng wrote:

Hi all,
I would like to continue on this question, on the jsp side.
I tried:

0



1


   ... So on...
But then, this doesn't work.
<%for (int i=0;i<4;i++){%>

<%=i%>


<%}%>
Is that NOT supposed to work?
Last question. There is the logic:iterate , I suppose it's the most
normal way of doing it, but I can't get it to work, can someone point
out the error?

indexId="ind">
	
	<%=ind%>
	
	


ViewContactForm is suppose to be the formbean for this jsp, containing
the code suggested below in the previous message.  What seems to be 
the
problem?

Thanks everyone.
Rgds,
Patrick
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 2:16 PM
To: 'Struts Users Mailing List'; 'Eric Chow'
Subject: RE: array property in ActionForm ???
Hi
Seems that you have a List of player objects. If so then indexed
bean properties might help. Your form will contain something like the
following.
public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}
public ArrayList getPlayerList(){
return playerList ;
}
public void setPlayer(int index, Player player){
playerList .add(index, player);
}
public Player getPlayer (int index){
return (Player)playerList .get(index);
}
Read the doc. for the JSP portion of the solution.

One more solution is the nested tag. I've used nested beans for 
multiple
levels of nesting. It is so cool.

Mohan
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:25 AM
To: Struts Users Mailing List
Subject: array property in ActionForm ???
Hello,









In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?
I tried,

public void setPlayer(int[] player) {
   this.player = player;
}
public int[] getPlayer() {
   return player;
}
But it seems not working !!!

Best regards,
Eric
==
If you know what you are doing,
it is not called RESEARCH!
==
-
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: array property in ActionForm ???

2003-12-30 Thread Mark Lowe




On 30 Dec 2003, at 07:49, Patrick Cheng wrote:

Hi all,
I would like to continue on this question, on the jsp side.
I tried:

0



1


   ... So on...
But then, this doesn't work.
<%for (int i=0;i<4;i++){%>

<%=i%>


<%}%>
Is that NOT supposed to work?
Last question. There is the logic:iterate , I suppose it's the most
normal way of doing it, but I can't get it to work, can someone point
out the error?


<%=ind%>



ViewContactForm is suppose to be the formbean for this jsp, containing
the code suggested below in the previous message.  What seems to be the
problem?
Thanks everyone.
Rgds,
Patrick
-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 2:16 PM
To: 'Struts Users Mailing List'; 'Eric Chow'
Subject: RE: array property in ActionForm ???
Hi
Seems that you have a List of player objects. If so then indexed
bean properties might help. Your form will contain something like the
following.
public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}
public ArrayList getPlayerList(){
return playerList ;
}
public void setPlayer(int index, Player player){
playerList .add(index, player);
}
public Player getPlayer (int index){
return (Player)playerList .get(index);
}
Read the doc. for the JSP portion of the solution.

One more solution is the nested tag. I've used nested beans for 
multiple
levels of nesting. It is so cool.

Mohan
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:25 AM
To: Struts Users Mailing List
Subject: array property in ActionForm ???
Hello,









In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?
I tried,

public void setPlayer(int[] player) {
   this.player = player;
}
public int[] getPlayer() {
   return player;
}
But it seems not working !!!

Best regards,
Eric
==
If you know what you are doing,
it is not called RESEARCH!
==
-
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: array property in ActionForm ???

2003-12-30 Thread Patrick Cheng
Hi, 
When I tried this out, I wasn't really using the Player entity. I'm
using a String instead. Could that be the problem?
Is it true that, the object u iterate over must be another bean with
properties? (So that you can specify )
That is, I should be using a collection storing all strings in it,
right?

Rgds,
Patrick.

-Original Message-
From: Patrick Cheng 
Sent: Tuesday, December 30, 2003 3:50 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: array property in ActionForm ???


Hi all, 
I would like to continue on this question, on the jsp side.
I tried:

0



1


   ... So on...
But then, this doesn't work.
<%for (int i=0;i<4;i++){%>

<%=i%>


<%}%>
Is that NOT supposed to work?
Last question. There is the logic:iterate , I suppose it's the most
normal way of doing it, but I can't get it to work, can someone point
out the error?



<%=ind%>




ViewContactForm is suppose to be the formbean for this jsp, containing
the code suggested below in the previous message.  What seems to be the
problem? 

Thanks everyone.
Rgds,
Patrick

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 2:16 PM
To: 'Struts Users Mailing List'; 'Eric Chow'
Subject: RE: array property in ActionForm ???


Hi
Seems that you have a List of player objects. If so then indexed
bean properties might help. Your form will contain something like the
following.

public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}

public ArrayList getPlayerList(){
return playerList ;
}

public void setPlayer(int index, Player player){
playerList .add(index, player);
}

public Player getPlayer (int index){
return (Player)playerList .get(index);
}

Read the doc. for the JSP portion of the solution.

One more solution is the nested tag. I've used nested beans for multiple
levels of nesting. It is so cool.

Mohan
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:25 AM
To: Struts Users Mailing List
Subject: array property in ActionForm ???


Hello,











In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?

I tried,

public void setPlayer(int[] player) {
   this.player = player;
}

public int[] getPlayer() {
   return player;
}

But it seems not working !!!


Best regards,
Eric


==
If you know what you are doing,
it is not called RESEARCH!
==


-
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 submit action form while invoking a popup

2003-12-30 Thread Paul-J Woodward

How about opening the action forward in the popup and pass the intended popup url as a 
parameter to which the action can redirect.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



   
   
 
  "Nisith Dash"
   
 
  <[EMAIL PROTECTED]To:   "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
  
  l.co.in> cc: 
   
 
   Subject:  how to submit action form 
while invoking a popup 
 
  30/12/2003 07:30 
   
 
  Please respond to
   
 
  "Struts Users
   
 
  Mailing List"
   
 
   
   
 
   
   
 





Hi,

i am using    window.open(url,"childwin",features) to open  pop up screen  where
the url= contextRoot + '/someAction.do?'. I also  want to submit the action form of my 
parent screen so that i can use it in the  action class method corresponding to my 
action mapping  someAction.do?.

How can in do it using java script. Any  suggestions???

Thanks,
Nisith


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

The following file(s) have been deleted by: Paul-J Woodward on 30/12/2003 9:58:35

InterScan_SafeStamp.txt
InterScan_Disclaimer.txt





--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



Re: annoying JSP runtime exception message

2003-12-30 Thread Paul-J Woodward

Something I do for development/debugging is surround the whole jsp file with a 
try/catch:

<%
try {
%>

...

<%
}
catch (Exception e) {
  out.println(e.getMessage());
  e.printStackTrace(System.err);
}

With a little work you could dump the stack trace to the screen.

Paul

Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax  +44 (0)20 7547 2752



   
   
 
  Raphaël di Cicco 
   
 
  <[EMAIL PROTECTED]To:   "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
  
  origin.com>  cc: 
   
 
   Subject:  Re: annoying JSP runtime 
exception message  
  
  30/12/2003 09:37 
   
 
  Please respond to
   
 
  "Struts Users Mailing
   
 
  List"
   
 
   
   
 
   
   
 




This file says nothing really except charging servlet, container etc... that
would be great to have the JSP error output there.

- Original Message -
From: "Martin Gainty" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 30, 2004 1:53 AM
Subject: Fw: annoying JSP runtime exception message


> What does your
> $TOMCAT_HOME/logs/.log say?
> Regards
> -Martin
> - Original Message -
> From: "" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 29, 2003 10:05 AM
> Subject: Re: annoying JSP runtime exception message
>
>
> > This comes up quite a bit for my Students.
> > When using Tiles, the JSP full error does not get displayed, becuase
> > tiles blocks it sometimes.
> >
> > I forward to the working JSP for the moment to see the error.
> >
> > .V
> >
> >
> > Raphaël di Cicco wrote:
> > > Hi,
> > > I'm working with struts 1.1, Tiles and Tomcat.
> > >
> > > on my JSP pages where I did something wrong I often get this exception
> message :
> > >
> > > [ServletException in:/foo.jsp] Define tag cannot set a null value'
> > >
> > > or simply :
> > > [ServletException in:/foo.jsp] null
> > >
> > > Looking at the source of the HTML page don't give me more information,
> neither the tomcat logs. I used to have a detailed message explaining me
> where the define was wrong but now I have to carefully cut and paste parts
> of my JSP page to find out where the error is.
> > >
> > > Is there any way to tell Tomcat to also output JSP exceptions to a log
> file ? Or is is a struts problem ?
> > >
> > > Any ideas are welcomed !
> > > 
> > > Raphaël di Cicco
> > >
> >
> >
> >
> > -
> > 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]


---

action roles

2003-12-30 Thread Kelly Goedert
Could someone give me an example on how to use action roles?
Does this roles have to be used with the container security?
Kelly.

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


Re: annoying JSP runtime exception message

2003-12-30 Thread Raphaël di Cicco
This file says nothing really except charging servlet, container etc... that
would be great to have the JSP error output there.

- Original Message - 
From: "Martin Gainty" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 30, 2004 1:53 AM
Subject: Fw: annoying JSP runtime exception message


> What does your
> $TOMCAT_HOME/logs/.log say?
> Regards
> -Martin
> - Original Message -
> From: "" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 29, 2003 10:05 AM
> Subject: Re: annoying JSP runtime exception message
>
>
> > This comes up quite a bit for my Students.
> > When using Tiles, the JSP full error does not get displayed, becuase
> > tiles blocks it sometimes.
> >
> > I forward to the working JSP for the moment to see the error.
> >
> > .V
> >
> >
> > Raphaël di Cicco wrote:
> > > Hi,
> > > I'm working with struts 1.1, Tiles and Tomcat.
> > >
> > > on my JSP pages where I did something wrong I often get this exception
> message :
> > >
> > > [ServletException in:/foo.jsp] Define tag cannot set a null value'
> > >
> > > or simply :
> > > [ServletException in:/foo.jsp] null
> > >
> > > Looking at the source of the HTML page don't give me more information,
> neither the tomcat logs. I used to have a detailed message explaining me
> where the define was wrong but now I have to carefully cut and paste parts
> of my JSP page to find out where the error is.
> > >
> > > Is there any way to tell Tomcat to also output JSP exceptions to a log
> file ? Or is is a struts problem ?
> > >
> > > Any ideas are welcomed !
> > > 
> > > Raphaël di Cicco
> > >
> >
> >
> >
> > -
> > 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: array property in ActionForm ???

2003-12-30 Thread Eric Chow
Hi,

For your solution, how can I define the HTML form in JSP ?


Eric



- Original Message - 
From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; "'Eric
Chow'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 2:16 PM
Subject: RE: array property in ActionForm ???


> Hi
> Seems that you have a List of player objects. If so then indexed bean
> properties might help. Your form will contain something like the
following.
>
> public void setPlayerList(ArrayList playerList){
> this.playerList = playerList;
> }
>
> public ArrayList getPlayerList(){
> return playerList ;
> }
>
> public void setPlayer(int index, Player player){
> playerList .add(index, player);
> }
>
> public Player getPlayer (int index){
> return (Player)playerList .get(index);
> }
>
> Read the doc. for the JSP portion of the solution.
>
> One more solution is the nested tag. I've used nested beans for multiple
> levels of nesting. It is so cool.
>
> Mohan
> -Original Message-
> From: Eric Chow [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 30, 2003 8:25 AM
> To: Struts Users Mailing List
> Subject: array property in ActionForm ???
>
>
> Hello,
>
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> In the above JSP, there are five TEXT form field with the same name
> "player", how can I design my ActionForm code for this case?
>
> I tried,
>
> public void setPlayer(int[] player) {
>this.player = player;
> }
>
> public int[] getPlayer() {
>return player;
> }
>
> But it seems not working !!!
>
>
> Best regards,
> Eric
>
>
> ==
> If you know what you are doing,
> it is not called RESEARCH!
> ==
>
>
> -
> 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 to submit action form while invoking a popup

2003-12-30 Thread Nisith Dash



Hi,
 
i am using   
window.open(url,"childwin",features) to open  pop up screen 
where
the url= "" + '/someAction.do?'. I also 
want to submit the action form of my parent screen so that i can use it in the 
action class method corresponding to my action mapping 
someAction.do?.
 
How can in do it using _javascript_. Any 
suggestions???
 
Thanks,
Nisith
** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm
** No virus found in attached file noname.htm

NO VIRUS FOUND: SERVER GENERATED MESSAGE
* End of message ***


DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery of the message to such person) and may contain legally privileged and 
confidential information belonging to Tata Consultancy Services. It must not be 
printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever 
manner) by any person other than the addressee. Unauthorized use, disclosure or 
copying is strictly prohibited and may constitute unlawful act and can possibly 
attract legal action, civil and/or criminal. The contents of this message need not 
necessarily reflect or endorse the views of Tata Consultancy Services on any subject 
matter. Any action taken or omitted to be taken based on this message is entirely at 
your risk and neither the originator of this message nor Tata Consultancy Services 
takes any responsibility or liability towards the same. Opinions, conclusions and any 
other information contained in this message that do not relate to the official 
business of Tata Consultancy Services shall be understood as neither given nor 
endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. 
If you have received this message in error, you should destroy this message and may 
please notify the sender by e-mail. Thank you.


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

RE: array property in ActionForm ???

2003-12-30 Thread Patrick Cheng
Hi all, 
I would like to continue on this question, on the jsp side.
I tried:

0



1


   ... So on...
But then, this doesn't work.
<%for (int i=0;i<4;i++){%>

<%=i%>


<%}%>
Is that NOT supposed to work?
Last question. There is the logic:iterate , I suppose it's the most
normal way of doing it, but I can't get it to work, can someone point
out the error?



<%=ind%>




ViewContactForm is suppose to be the formbean for this jsp, containing
the code suggested below in the previous message.  What seems to be the
problem? 

Thanks everyone.
Rgds,
Patrick

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 2:16 PM
To: 'Struts Users Mailing List'; 'Eric Chow'
Subject: RE: array property in ActionForm ???


Hi
Seems that you have a List of player objects. If so then indexed
bean properties might help. Your form will contain something like the
following.

public void setPlayerList(ArrayList playerList){
this.playerList = playerList;
}

public ArrayList getPlayerList(){
return playerList ;
}

public void setPlayer(int index, Player player){
playerList .add(index, player);
}

public Player getPlayer (int index){
return (Player)playerList .get(index);
}

Read the doc. for the JSP portion of the solution.

One more solution is the nested tag. I've used nested beans for multiple
levels of nesting. It is so cool.

Mohan
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 8:25 AM
To: Struts Users Mailing List
Subject: array property in ActionForm ???


Hello,











In the above JSP, there are five TEXT form field with the same name
"player", how can I design my ActionForm code for this case?

I tried,

public void setPlayer(int[] player) {
   this.player = player;
}

public int[] getPlayer() {
   return player;
}

But it seems not working !!!


Best regards,
Eric


==
If you know what you are doing,
it is not called RESEARCH!
==


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