Re: Re[2]: Best Practices for Logging?

2002-12-11 Thread Gemes Tibor
2002. december 11. 02:34 dátummal Craig R. McClanahan ezt írtad:
 If I'm understanding what you are doing correctly, doesn't this make the
 logging level global to all logging in your application?  The approach
 Struts uses internally (essentially a category name per class) lets you
 make much more fine grained decisions about wanting DEBUG messages from
 this class, but WARN messages from that class.

This is really important imho. One day I accidentally turned on debug 
globally, and s many messages from sooo many places (commons, struts, my 
own app etc) flooded me with DEBUG, that I daresay noone could use that 
output. I am (and suppose you are) interested in DEBUG from the currently 
changed class exclusively, and at most WARN from the others.

Tib

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




how to submit a form using html:link

2002-12-11 Thread Amit Badheka
Is it possioble to submit a form using html:link tag.
I want to call a servlet that resided on another war file. I am able to call it by 
click on html link.
But, my requirement is to submit the form.





How to Format default input text value according to user request?

2002-12-11 Thread Renato Aganippe
Hello everybody,

Please help, I can't get through this problem and it drives me crazy!

I need to initialize the default field value from a html:text tag with a timestamp 
field from a Bean according to the user's request Locale.

I am looking for an equivalent of formatKey attribute from bean:write

Thanks a lot,

Renato


RE: Re: Re[2]: Best Practices for Logging?

2002-12-11 Thread shirishchandra . sakhare
Hi,
 
 If I'm understanding what you are doing correctly, doesn't this make
 the logging level global to all logging in your application?  The
 approach Struts uses internally (essentially a category name per
 class) lets you make much more fine grained decisions about wanting
 DEBUG messages from this class, but WARN messages from that class.
I think u can still avoid putting logging instantiation code in every class 
.And use class level loggers as well.This is what we have done in done

class ApplicationLogger{
public static void debug(
Object logSource,
Object message) {
getLogger(logSource).debug(message);
}

public static void debug(Object logSource, Object message, Throwable t) {
getLogger(logSource).debug(message, t);
}

public static void info(Object logSource, Object message) {
getLogger(logSource).info(message);
}
//similarly all other  log methods are overloaded...
private Logger getLogger(Object logSource){
String loggerName= logSource.getClass().getName();
try {
loggerName = getLoggerName(className,companyId);
} catch (Exception e) {
return defaultLogger;
}
return Logger.getLogger(loggerName);
}


SO now I have loggers per class level and also every class need not have a 
instance of logger.So when I want to log,i wil just say
ApplicationLogger.log(this,message);

so if u want to change logging behaviour , it is at one place only.

regards,
Shirish
-Original Message-
From: maillist [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 7:55 AM
To: struts-user
Cc: maillist
Subject: Re: Re[2]: Best Practices for Logging?


On Tue, 10 Dec 2002 17:34:10 -0800 (PST)
Craig R. McClanahan [EMAIL PROTECTED] wrote:
 
 If I'm understanding what you are doing correctly, doesn't this make
 the logging level global to all logging in your application?  The
 approach Struts uses internally (essentially a category name per
 class) lets you make much more fine grained decisions about wanting
 DEBUG messages from this class, but WARN messages from that class.
 

Yes, I see your point. I guess I was trying to avoid having to put
something like:

Category log = Category.getInstance( FooThisClass.class.getName() );

on the top of each class (or maybe that doesn't have to be done?). I was
thinking what if later on I decide not to use log4j then all my classes
would still be tied to it would they not? By going straight to another
class called Logging I could then implement any other type of logging
I like in the future, but I guess the drawback is the lack of fine
grained logging. Would it be a bad idea to possibly pass the name of the
class you want logging for to another class? That way if I ever decided
to a different type of logging in the future the app would still work
fine. For example if I had an a class called Logging I could now call
the Logging methods in this class from another class as such...

Logging.debug(FooBarName.class, my message to log );
 
I really should do some more reading on how to better implement log4j in
my Struts apps. Any good pointers to sources for this particular topic?

Thanks for the help.

Rick
 
 
MY ORIGINAL POST:

I apologize, I haven't been following this whole thread, but I'm
wondering if what I've implemented is a poor solution. For a
particular app called taskmanager I created a Logging class which is
pretty small and looks like this:

public class Logging {

static Category log = Category.getInstance(taskmanager);

public static void debug(String msg) {
log.debug(msg);
}

public static void error(String msg) {
log.error(msg);
}

public static void info(String msg) {
log.info(msg);
}
//etc
}

taskmanager corresponds to a category in my log4j.properties file so
that I can set up what I want for the app this way. Then wherever I
need to do logging in the app I just call
Logging.info(...) or Logging.error( )..etc

Are there some major drawbacks to using this type of a solution? I'm
pretty much a log4j newbie so I'm probably missing a better way to do
all of this and will go back through the archives to read these past
posts.

Thanks for any feedback

-- 
Rick

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



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




Re: Validator with separate modules (Tiles too)

2002-12-11 Thread Cedric Dumoulin

 Hi,

 Tiles now allow to have one Tiles factory for each module (since 2/3 
weeks). But, for backward compatibility, you need to enable it. Add the 
following property value in your Tiles plugin declaration:
   set-property property=moduleAware value=true /

 Remember that you need to declare the Tiles plugin in each module, so 
in each struts-config file.

   Cedric

Frost, Gary [IT] wrote:

Hi,

Sorry if this has already been asked and answered, I tried a search on it,
but came up with nothing matching.

Anyway I'm using a recent nightly build of struts (about a week old),
and am using struts broken into various modules.

E.g.
/myapp
/myapp/admin
/myapp/coolstuff

So 	/myapp if configured from 	/config/struts-config.xml
	/myapp/admin from		/config/admin/struts-config.xml
/myapp/coolstuff		/config/coolstuff/struts-config.xml
The tiles configs 
	/myapp if configured from 	/config/tiles-config.xml
	/myapp/admin from		/config/admin/tiles-config.xml
/myapp/coolstuff from		/config/coolstuff/tiles-config.xml
The validator configs 
	/myapp if configured from 	/config/validator-config.xml
	/myapp/admin from		/config/admin/validator-config.xml
		/myapp/coolstuff from
/config/coolstuff/validator-config.xml


Which makes it nice to track/control the config files on a per module basis.

My query/problem is that it seems that each struts-config.xml file must
include it plugin configs each associated config files for each module, if I
fail to do this then the config is not necessarily loaded, it seems to be
whichever module gets loaded first set the tiles and validator rules
globally.

I.e. if my /myapp/admin/struts-config contains the plugin code
	plug-in className=org.apache.struts.validator.ValidatorPlugIn
		set-property property=pathnames
	
value=/WEB-INF/config/admin/validator-config.xml
	/plug-in
	plug-in className=org.apache.struts.tiles.TilesPlugin 
	  set-property property=definitions-config
	
value=/WEB-INF/config/admin/tiles-config.xml/
	/plug-in

Then when I start the webapp and check the logfile (I have loggin turned to
max), I see that the rules for these two plugins get loaded, and if I go to
an action (tiles definition) in the admin module, everything works fine, the
tiles come together, the validators all work sweet etc.  However if I go to
an action (tiles definition) in the coolstuff module it cant find the tiles
definition, or the validator definition etc.

The only way I can get round it is to put all of the validator.xml configs
and tiles.xml configs in each of the struts-config.xml files.

So, is there anyway for each module to have its own TileFactory and
ValidatorFactory, and hence each one loads the appropriate definitions.
Failing that any other suggestions (was thinking something like having all
the definitions in the 'root' config file, and forcing somehow that one to
be that is read, but I'm not sure I like that idea)

All help/comments appreciated

Gary

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


 



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




Request is Missing in MultiPart/form File Upload

2002-12-11 Thread Rajesh_Gangadharan
Hi ,
 I am facing a crazy problem.I am using Struts1.1.b2.In that after the
file upload I want to redirect the page to some other JSP..As normal I used
mapping.findForward(somejsp)..It is not working...
 In console the error is coming that Orginal Request is missing..Pls
help to solve this


Regards,

Rajesh
** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**

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




RE: how to submit a form using html:link

2002-12-11 Thread Andrew Hill
Yes, ... BUT
you will need to use javascript.
ie:

a href=javascript: document.forms[0].submit()Submit/a

i guess for the tag the syntax would be something very similar:

html:link href=javascript: document.forms[0].submit()Submit/html:link

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 16:52
To: Struts Users Mailing List
Subject: how to submit a form using html:link


Is it possioble to submit a form using html:link tag.
I want to call a servlet that resided on another war file. I am able to call
it by click on html link.
But, my requirement is to submit the form.




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




Re: how to submit a form using html:link

2002-12-11 Thread Gemes Tibor
2002. december 11. 09:52 dátummal Amit Badheka ezt írtad:
 Is it possioble to submit a form using html:link tag.
 I want to call a servlet that resided on another war file. I am able to
 call it by click on html link. But, my requirement is to submit the form.

You are not forced to use html:link. It is useful for url rewriting, which is 
not needed by you. So you can use 
a href=# onClick=document.forms.myForm.submit()submit/a

Hth,

Tib

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




RE: how to submit a form using html:link

2002-12-11 Thread Mouratidis, Georg


-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 11. Dezember 2002 09:58
To: Struts Users Mailing List
Subject: Re: how to submit a form using html:link


You are not forced to use html:link. It is useful for url rewriting, which is 
not needed by you. So you can use 
a href=# onClick=document.forms.myForm.submit()submit/a

In my opinion it makes no sense to mix struts-tags with ordinary html-tags.
so, i dicided to use only struts-tags.

so your solution for the question is e.g.:

html:link href=javascript:submituserForm('NEW_USER');
  html:img src='../../images/buttons/New.gif' border='0'/
/html:link

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




Re: how to submit a form using html:link

2002-12-11 Thread Gemes Tibor
2002. december 11. 10:00 dátummal Andrew Hill ezt írtad:
 Yes, ... BUT
 you will need to use javascript.
 ie:

 a href=javascript: document.forms[0].submit()Submit/a

 i guess for the tag the syntax would be something very similar:

 html:link href=javascript: document.forms[0].submit()Submit/html:link

What will he achieve by using html:link? I think it is unnecesary.

Tib

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




RE: How to Format default input text value according to user request?

2002-12-11 Thread Míguel Ángel Mulero Martínez
The Locale object exists in the Actions. Use an Action before the JSP that
creates this bean. In this way you can format the text before call the
bean:write

Regards,
Miguel

-Mensaje original-
De: Renato Aganippe [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 11 de diciembre de 2002 9:48
Para: Struts Users Mailing List
Asunto: How to Format default input text value according to user request?

Hello everybody,

Please help, I can't get through this problem and it drives me crazy!

I need to initialize the default field value from a html:text tag with
a timestamp field from a Bean according to the user's request Locale.

I am looking for an equivalent of formatKey attribute from bean:write

Thanks a lot,

Renato


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




RE: how to submit a form using html:link

2002-12-11 Thread Andrew Hill
Yep. Its a waste of time and server resources, but he did ask...

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 17:08
To: Struts Users Mailing List
Subject: Re: how to submit a form using html:link


2002. december 11. 10:00 dátummal Andrew Hill ezt írtad:
 Yes, ... BUT
 you will need to use javascript.
 ie:

 a href=javascript: document.forms[0].submit()Submit/a

 i guess for the tag the syntax would be something very similar:

 html:link href=javascript:
document.forms[0].submit()Submit/html:link

What will he achieve by using html:link? I think it is unnecesary.

Tib

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


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




Re: How to Format default input text value according to user request?

2002-12-11 Thread Renato Aganippe
Miguel,

Thanks for your answer but I don't have any problem with bean:write tag
but with html:text tag.

Regards,

Renato

- Original Message -
From: Míguel Ángel Mulero Martínez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 10:13 AM
Subject: RE: How to Format default input text value according to user
request?


 The Locale object exists in the Actions. Use an Action before the JSP that
 creates this bean. In this way you can format the text before call the
 bean:write

 Regards,
 Miguel

 -Mensaje original-
 De: Renato Aganippe [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 11 de diciembre de 2002 9:48
 Para: Struts Users Mailing List
 Asunto: How to Format default input text value according to user request?

 Hello everybody,

 Please help, I can't get through this problem and it drives me crazy!

 I need to initialize the default field value from a html:text tag with
 a timestamp field from a Bean according to the user's request Locale.

 I am looking for an equivalent of formatKey attribute from bean:write

 Thanks a lot,

 Renato


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






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




Re: How to Format default input text value according to user request?

2002-12-11 Thread Gemes Tibor
2002. december 11. 09:48 dátummal Renato Aganippe ezt írtad:
 Hello everybody,

 Please help, I can't get through this problem and it drives me crazy!

 I need to initialize the default field value from a html:text tag with a
 timestamp field from a Bean according to the user's request Locale.

You might want to read this thread:

http://nagoya.apache.org/eyebrowse/BrowseList?[EMAIL PROTECTED]by=threadfrom=281706

Hth,

Tib

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




DynaActionForm in session scope

2002-12-11 Thread Charles
Hi all,

Can a DynaValidatorForm be in session scope? Whenever I submit a page that
uses a DynaValidatorForm, which is in session scope, it resets itself and
all the previously stored data are lost. I did not call the form reset
function at all. I thought by adding the scope=session attribute in the
tag, the form would save previously entered data in the session. However it
seems to behave as though its in request scope.  Is this normal with using
dynamic form beans?

Tried searching the message list at nagoya but the search function doesn't
seem to be working.

TIA
Charles



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




Re: struts, tiles ans roles

2002-12-11 Thread Cedric Dumoulin

 Hi,


Christian Simonutti wrote:


Hi there.

I'm on the way to get into struts 1.1-b2 with tiles and have to develope
a web-application with a lot of roles.

In the sample chapter of Struts in Action, there is an example with the
role attribute in the tiles:put statement, but according to
tiles-dtd, the role is used in an definition-statement.


 The role in tiles:put ... should work. If you specify a role, the 
attribute defined by the tiles:put .../ will be passed to the inserted 
tiles only if the user is in the specified role. Otherwise, the 
attribute is not added.


Hmmm, can anybody point me to some documentation how to use tiles and
roles? If the tiles-definition is role-dependant, 

 A tiles-definition can be role dependant. The role is checked when the 
definition is inserted with tiles:insert name=aDefinition /. The 
role is not checked
if you insert the tiles-definition with a struts forward. The reason is 
that if the role is not valid, nothing will be outputted. I prefer to 
let the programmer decide what to do if the role is not valid, and this 
can be easily done in the action.

  Cedric

how do I forward to a jsp
and insert a tile according to the specific role? Is that possible, or
do I have to if-out the roles in the action? I'm a littlebit confused. I
hate to use if-statements, that is the part of factorys, but I don't
want to handle that in my action.

Thank for any help,
Simon

 



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




urgent

2002-12-11 Thread Amit Badheka
Hi All,

I have a requirement to call a servlet from a action class or jsp. The servlet is 
residing on the war file other than struts app. Hence, there are two different context.

The servlet is used for file upload so my jsp should contain multipart/form data. so, 
I have to call post method of the servlet.

If I am using html:link I am able to call the servlet, but the form data can not be 
passed.

I also tried with action forward but it is not calling servlet.(may be b'cos it is not 
in same context).

Is there any way to achieve something like this.









Re: DynaActionForm in session scope

2002-12-11 Thread Gemes Tibor
2002. december 12. 02:29 dátummal Charles ezt írtad:
 Hi all,

 Can a DynaValidatorForm be in session scope? Whenever I submit a page that
 uses a DynaValidatorForm, which is in session scope, it resets itself and
 all the previously stored data are lost. I did not call the form reset
 function at all. I thought by adding the scope=session attribute in the
 tag, the form would save previously entered data in the session. However it
 seems to behave as though its in request scope.  Is this normal with using
 dynamic form beans?

 Tried searching the message list at nagoya but the search function doesn't
 seem to be working.

It is sad, because this was answered multiple times. You might want to extend 
DynActionForm and override the reset(). Maybe depending on an extra property 
of the form-property wheter or not do you want to reset it. The extra 
property can be set in the struts-config.xml via set-property tags. 

Hth,

Tib

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




Re: DynaActionForm in session scope

2002-12-11 Thread Gemes Tibor
2002. december 12. 02:29 dátummal Charles ezt írtad:

 Tried searching the message list at nagoya but the search function doesn't
 seem to be working.

http://www.google.com/search?q=struts-user+session+reset+DynaActionForm+site%3Awww.mail-archive.com


Tib

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




RE: urgent

2002-12-11 Thread Andrew Hill
No joy with the javascript submit() huh? :-(

Are you getting any error messages?
Are you submitting to the correct url? (ie: forms action is set
appropriately)

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 17:36
To: Struts Users Mailing List
Subject: urgent


Hi All,

I have a requirement to call a servlet from a action class or jsp. The
servlet is residing on the war file other than struts app. Hence, there are
two different context.

The servlet is used for file upload so my jsp should contain multipart/form
data. so, I have to call post method of the servlet.

If I am using html:link I am able to call the servlet, but the form data can
not be passed.

I also tried with action forward but it is not calling servlet.(may be b'cos
it is not in same context).

Is there any way to achieve something like this.








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




Re: urgent

2002-12-11 Thread Gemes Tibor
2002. december 11. 10:35 dátummal Amit Badheka ezt írtad:
 If I am using html:link I am able to call the servlet, but the form data
 can not be passed.

 I also tried with action forward but it is not calling servlet.(may be
 b'cos it is not in same context).

 Is there any way to achieve something like this.

Maybe it is urgent for you, but it is not me. Please provide more descriptive 
subject next time! Thank you.

Check org.apache.struts.actions.ForwardAction

Hth,

Tib

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




common validation error page

2002-12-11 Thread David Mulligan
Got a quick validation question.

All validation errors that occur from action forms are to be displayed on a
common error page. Not the input page of the action! 
How do I setup the validator to forward to this common error page when there
are problems?


e.g. Something like the below will work

  action path=/logon
type=ie.lecan.core.web.authentication.actions.LogonAction
name=/authentication/logonForm
input=/pages/common/errors.vm
scope=request
forward name=success path=/myWorkspace.do/
  /action

but I prefer not this for two reasons 

1. the input should really be /pages/logon.vm and may confuse developers
etc. later.
2. it's a pain having to set input=/pages/common/error.vm for every
action.

Any ideas would be greatly appreciated
dave.



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




how to dynamically generate several file upload fields

2002-12-11 Thread matthew yee-king
Hello

I have a form where the user uploads several files. The number of files
they have to upload is defined in a database, i.e. it can change. How
can I write a form that generates the correct number of file upload
fields automatically and stores the uploaded files into a  FormFile
array in an ActionForm bean?

cheers

matthew

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




RE: how to submit a form using html:link

2002-12-11 Thread Deepika Malik
you can submit the form in html:link
by using sth like this
html:link href=javascript:redirectUser('/meterTransfer.do');
function redirectUser(strAction)
{

document.formname.action=strAction;
document.formname.submit();
}
where strAction is the action mapping in struts-config
and formname is the form bean name specified in struts-config
-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:52 AM
To: Struts Users Mailing List
Subject: how to submit a form using html:link


Is it possioble to submit a form using html:link tag.
I want to call a servlet that resided on another war file. I am able to call
it by click on html link.
But, my requirement is to submit the form.




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




RE: how to dynamically generate several file upload fields

2002-12-11 Thread Andrew Hill
I had a similar problem.
At first I tried using a FormFile[] array like one does with other non-file
fields, but it just didnt work, and I dont believe its supported, though it
may be that I was doing something wrong? :-(

I thought of a few other (rather bad) solutions.

The most obvious involves having enough fields defined in your actionForm to
cover all your needs.
ie:
setFile1(FormFile ff)
setFile2 etc
Then you only render file inputs for the number you actually need at the
time. It sounds like you know at the time you render the page how many you
have which is a big plus, as you thus know how many inputs to include.
This is still not a very satisfactory solution though it may be your best
bet. You will still be limited by the number of fields you have on your
action form, though since its not very practical to upload many files at
once anyway this might not be a problem. If you know the highest number fo
files is say 10, then you only need 10 fields on the form. If its 100 then
100 - but no user is going to want to sit there and browse for that many
files anyway ;-)

Another idea you might try is similar to what I ended up doing. This
involves having a single file input field. The user can only upload one file
at a time, but after each upload they are brought back to the form to add
more. This is implemented by having the form in session scope and the
setFile() method (or whatever you call your file field) adds each FormFile
that is set into it to a list. The advantage of this method is that it
allows for any number of files , but has several disadvantages too - such as
needing to use the session scope, and it feels (very) clunky to the user.

Im still trying to think up a nicer way to do it that covers all my needs.
If you come up with something better do let me know as Id be most interested
:-)

regards
Andrew

-Original Message-
From: matthew yee-king [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 17:48
To: [EMAIL PROTECTED]
Subject: how to dynamically generate several file upload fields


Hello

I have a form where the user uploads several files. The number of files
they have to upload is defined in a database, i.e. it can change. How
can I write a form that generates the correct number of file upload
fields automatically and stores the uploaded files into a  FormFile
array in an ActionForm bean?

cheers

matthew

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


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




Re: urgent

2002-12-11 Thread Amit Badheka
Hi Andrew,
thanks for reply,

If I give the below url as action and submit the form I am getting error as
not a valid url
/http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser

and if I try with ActionForward from action then it is not giving any error,
but also not doing anything.

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 3:13 PM
Subject: RE: urgent


 No joy with the javascript submit() huh? :-(

 Are you getting any error messages?
 Are you submitting to the correct url? (ie: forms action is set
 appropriately)

 -Original Message-
 From: Amit Badheka [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 17:36
 To: Struts Users Mailing List
 Subject: urgent


 Hi All,

 I have a requirement to call a servlet from a action class or jsp. The
 servlet is residing on the war file other than struts app. Hence, there
are
 two different context.

 The servlet is used for file upload so my jsp should contain
multipart/form
 data. so, I have to call post method of the servlet.

 If I am using html:link I am able to call the servlet, but the form data
can
 not be passed.

 I also tried with action forward but it is not calling servlet.(may be
b'cos
 it is not in same context).

 Is there any way to achieve something like this.








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




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




Re: how to dynamically generate several file upload fields

2002-12-11 Thread matthew yee-king

 Another idea you might try is similar to what I ended up doing. This
 involves having a single file input field. The user can only upload
 one file at a time, but after each upload they are brought back to the
 form to add more. This is implemented by having the form in session
 scope and the setFile() method (or whatever you call your file field)
 adds each FormFile that is set into it to a list. The advantage of
 this method is that it allows for any number of files , but has
 several disadvantages too - such as needing to use the session scope,
 and it feels (very) clunky to the user.
 

that sounds like the best solution to me for the moment. I need a quick
solution as ever ;)

 Im still trying to think up a nicer way to do it that covers all my
 needs. If you come up with something better do let me know as Id be
 most interested:-)
 


I'm thinking the best way would be to get into the taglibs and write
some new html: tags that let you generate sets of text fields or file
fields that are stored to an ActionForm's arrays in the same way you can
with thehtml:select multiple=yes.. tags. 

thanks for the tips

matthew

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




RE: how to dynamically generate several file upload fields

2002-12-11 Thread Andrew Hill
Well you can do it for text fields already - just pump out several fields
with the same name. Works for almost all field types actually.

...just not files :-(

I think to get multiple files working (ie: array of FormFile) would need
changes to the classes in the struts upload package. I would imagine that it
is not simple (mainly on the evidence that nobodys done it yet!).


-Original Message-
From: matthew yee-king [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:10
To: Struts Users Mailing List
Subject: Re: how to dynamically generate several file upload fields



 Another idea you might try is similar to what I ended up doing. This
 involves having a single file input field. The user can only upload
 one file at a time, but after each upload they are brought back to the
 form to add more. This is implemented by having the form in session
 scope and the setFile() method (or whatever you call your file field)
 adds each FormFile that is set into it to a list. The advantage of
 this method is that it allows for any number of files , but has
 several disadvantages too - such as needing to use the session scope,
 and it feels (very) clunky to the user.


that sounds like the best solution to me for the moment. I need a quick
solution as ever ;)

 Im still trying to think up a nicer way to do it that covers all my
 needs. If you come up with something better do let me know as Id be
 most interested:-)



I'm thinking the best way would be to get into the taglibs and write
some new html: tags that let you generate sets of text fields or file
fields that are stored to an ActionForm's arrays in the same way you can
with thehtml:select multiple=yes.. tags.

thanks for the tips

matthew

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


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




Re: how to dynamically generate several file upload fields

2002-12-11 Thread Gemes Tibor
2002. december 11. 11:10 dátummal matthew yee-king ezt írtad:
 that sounds like the best solution to me for the moment. I need a quick
 solution as ever ;)

  Im still trying to think up a nicer way to do it that covers all my
  needs. If you come up with something better do let me know as Id be
  most interested:-)

I think that the file input field can accept multiple files for upload.

Hth,

Tib

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




Re: how to dynamically generate several file upload fields

2002-12-11 Thread Gemes Tibor
2002. december 11. 11:21 dátummal Andrew Hill ezt írtad:
 I think to get multiple files working (ie: array of FormFile) would need
 changes to the classes in the struts upload package. I would imagine that
 it is not simple (mainly on the evidence that nobodys done it yet!).

Oh, I haven't think of this. Yes, input type=file can accept files (at 
least the html specs is talking about entering files etc) , but it might 
not be handled by the upload package. :(

Tib

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




RE: urgent

2002-12-11 Thread Andrew Hill
hmmm. Whats in the actual html/javascript then? (for the forms action
property).
Are you rendering the action with a form tag, or setting it at submit time
with javascript?

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:30
To: [EMAIL PROTECTED]
Subject: Re: urgent


/ is there in the error.
it looks like taking as /actionmapping.do etc.

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Amit Badheka [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 3:40 PM
Subject: RE: urgent


 Is that / supposed to be there in the front of http - or is it just copy
and
 paste error writing the email?

 -Original Message-
 From: Amit Badheka [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 18:09
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: urgent


 Hi Andrew,
 thanks for reply,

 If I give the below url as action and submit the form I am getting error
as
 not a valid url
 /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser

 and if I try with ActionForward from action then it is not giving any
error,
 but also not doing anything.

 - Original Message -
 From: Andrew Hill [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, December 11, 2002 3:13 PM
 Subject: RE: urgent


  No joy with the javascript submit() huh? :-(
 
  Are you getting any error messages?
  Are you submitting to the correct url? (ie: forms action is set
  appropriately)
 
  -Original Message-
  From: Amit Badheka [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 11, 2002 17:36
  To: Struts Users Mailing List
  Subject: urgent
 
 
  Hi All,
 
  I have a requirement to call a servlet from a action class or jsp. The
  servlet is residing on the war file other than struts app. Hence, there
 are
  two different context.
 
  The servlet is used for file upload so my jsp should contain
 multipart/form
  data. so, I have to call post method of the servlet.
 
  If I am using html:link I am able to call the servlet, but the form data
 can
  not be passed.
 
  I also tried with action forward but it is not calling servlet.(may be
 b'cos
  it is not in same context).
 
  Is there any way to achieve something like this.
 
 
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 




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




RE: how to dynamically generate several file upload fields

2002-12-11 Thread Andrew Hill
Yeh. I rememeber reading in the html specs (or was that the 'draft' for file
uplaoding with html) that it would support multiple files, alas the browsers
dont. One can of course have multiple input type=file elements, but I
dont think this can be mapped to the same property in the actionForm as an
array of FormFile. I never got it to work , and I vaguely remember someone
saying something to that effect a while ago on the list. Doing a quick web
search now to see if can get more info.

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:27
To: Struts Users Mailing List
Subject: Re: how to dynamically generate several file upload fields


2002. december 11. 11:21 dátummal Andrew Hill ezt írtad:
 I think to get multiple files working (ie: array of FormFile) would need
 changes to the classes in the struts upload package. I would imagine that
 it is not simple (mainly on the evidence that nobodys done it yet!).

Oh, I haven't think of this. Yes, input type=file can accept files (at
least the html specs is talking about entering files etc) , but it might
not be handled by the upload package. :(

Tib

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


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




RE: how to dynamically generate several file upload fields

2002-12-11 Thread Andrew Hill
Aha. here we go. Its a known limitation to be resolved later.
Heres the link to bugzilla:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6847

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:39
To: Struts Users Mailing List
Subject: RE: how to dynamically generate several file upload fields


Yeh. I rememeber reading in the html specs (or was that the 'draft' for file
uplaoding with html) that it would support multiple files, alas the browsers
dont. One can of course have multiple input type=file elements, but I
dont think this can be mapped to the same property in the actionForm as an
array of FormFile. I never got it to work , and I vaguely remember someone
saying something to that effect a while ago on the list. Doing a quick web
search now to see if can get more info.

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:27
To: Struts Users Mailing List
Subject: Re: how to dynamically generate several file upload fields


2002. december 11. 11:21 dátummal Andrew Hill ezt írtad:
 I think to get multiple files working (ie: array of FormFile) would need
 changes to the classes in the struts upload package. I would imagine that
 it is not simple (mainly on the evidence that nobodys done it yet!).

Oh, I haven't think of this. Yes, input type=file can accept files (at
least the html specs is talking about entering files etc) , but it might
not be handled by the upload package. :(

Tib

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


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


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




Re: urgent

2002-12-11 Thread Amit Badheka
I am setting it as action attribute for html:form tag.

But after getting that error I created one action class and then tried to
forward using ActionForward (as it is a proper way).
With this it is not giving any error but also not accessing the servlet.
I checked out the url, it is correct as when  I copied that url in browser
then it calls servlet.

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 4:08 PM
Subject: RE: urgent


 hmmm. Whats in the actual html/javascript then? (for the forms action
 property).
 Are you rendering the action with a form tag, or setting it at submit time
 with javascript?

 -Original Message-
 From: Amit Badheka [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 18:30
 To: [EMAIL PROTECTED]
 Subject: Re: urgent


 / is there in the error.
 it looks like taking as /actionmapping.do etc.

 - Original Message -
 From: Andrew Hill [EMAIL PROTECTED]
 To: Amit Badheka [EMAIL PROTECTED]
 Sent: Wednesday, December 11, 2002 3:40 PM
 Subject: RE: urgent


  Is that / supposed to be there in the front of http - or is it just copy
 and
  paste error writing the email?
 
  -Original Message-
  From: Amit Badheka [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 11, 2002 18:09
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: urgent
 
 
  Hi Andrew,
  thanks for reply,
 
  If I give the below url as action and submit the form I am getting error
 as
  not a valid url
  /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser
 
  and if I try with ActionForward from action then it is not giving any
 error,
  but also not doing anything.
 
  - Original Message -
  From: Andrew Hill [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, December 11, 2002 3:13 PM
  Subject: RE: urgent
 
 
   No joy with the javascript submit() huh? :-(
  
   Are you getting any error messages?
   Are you submitting to the correct url? (ie: forms action is set
   appropriately)
  
   -Original Message-
   From: Amit Badheka [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, December 11, 2002 17:36
   To: Struts Users Mailing List
   Subject: urgent
  
  
   Hi All,
  
   I have a requirement to call a servlet from a action class or jsp. The
   servlet is residing on the war file other than struts app. Hence,
there
  are
   two different context.
  
   The servlet is used for file upload so my jsp should contain
  multipart/form
   data. so, I have to call post method of the servlet.
  
   If I am using html:link I am able to call the servlet, but the form
data
  can
   not be passed.
  
   I also tried with action forward but it is not calling servlet.(may be
  b'cos
   it is not in same context).
  
   Is there any way to achieve something like this.
  
  
  
  
  
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
 
 


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




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




RE: urgent

2002-12-11 Thread Andrew Hill
Just saw your other email.
Submitting from an action and forwarding from that instead of the browser
seems a good idea but Ive not tried it myself for resources outside the same
webapp.
Im not sure if it works or what needs to be done to make it work for that
situation. Sorry :-(

If you cant find a way to get that idea working then the other alternative
is to continue trying to submit straight from the browser to the other
servlet:

I dont think you will be able to use the action attribute of html:form for
this as it will actually go and look up info about the form from struts
config based on this. I forgot about that!

If this form doesnt need to have an associated actionForm you could use a
normal form tag (ie not a taglib) instead of the html:form tag. Make
sure theres no slash before the http.

Now on the other hand if you are using an action and actionForm then you
could set the action attribute as the path to that action, but in your code
to submit the form, you have javascript that will change the action property
in the clientside document object model using javascript:

function doSubmit()
{
document.forms[0].action='http://localhost:7001/ManageStyle/servlet/stylegen
eralinfoservlet';
document.forms[0].submit();
}

(Adapt as required)

Hope this helps.
regards
Andrew


-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:43
To: [EMAIL PROTECTED]
Subject: Re: urgent


Hi Andrew,
thanks for reply,

the exact error message i am pasting here -

javax.servlet.jsp.JspException: Cannot retrieve mapping for action
 /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet

I hope it can help you understand the problem, and will be great help for
me.

Amit.

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Amit Badheka [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 3:40 PM
Subject: RE: urgent


 Is that / supposed to be there in the front of http - or is it just copy
and
 paste error writing the email?

 -Original Message-
 From: Amit Badheka [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 18:09
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: urgent


 Hi Andrew,
 thanks for reply,

 If I give the below url as action and submit the form I am getting error
as
 not a valid url
 /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser

 and if I try with ActionForward from action then it is not giving any
error,
 but also not doing anything.

 - Original Message -
 From: Andrew Hill [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, December 11, 2002 3:13 PM
 Subject: RE: urgent


  No joy with the javascript submit() huh? :-(
 
  Are you getting any error messages?
  Are you submitting to the correct url? (ie: forms action is set
  appropriately)
 
  -Original Message-
  From: Amit Badheka [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 11, 2002 17:36
  To: Struts Users Mailing List
  Subject: urgent
 
 
  Hi All,
 
  I have a requirement to call a servlet from a action class or jsp. The
  servlet is residing on the war file other than struts app. Hence, there
 are
  two different context.
 
  The servlet is used for file upload so my jsp should contain
 multipart/form
  data. so, I have to call post method of the servlet.
 
  If I am using html:link I am able to call the servlet, but the form data
 can
  not be passed.
 
  I also tried with action forward but it is not calling servlet.(may be
 b'cos
  it is not in same context).
 
  Is there any way to achieve something like this.
 
 
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 




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




Re: whither validator taglib?

2002-12-11 Thread Enrico Donelli
Brian Moseley wrote:


(apologies if this topic has been discussed before- i'm getting an 
error when searching the list archive: text search not supported for 
this list or some such.)

chapter 12 of struts in action refers to a javascript taglib that 
doesn't appear to exist. i see the javascript tag in the html taglib, 
but nothing else. what's the current story?

i need the functionality of the errorsPresent and messagesPresent tags 
described in ch 12. if those don't exist in 1.1b2 or a more current 
version, i guess i'll need to recreate them. but i can't be the only 
struts user with this need, can i? i wish the archive was working..

I don't know if this is corret (I'm a struts newbye), but I had the same 
problem yesterday and I solved it using the tag html:javascript.

Hope this works

Best regards
Enrico


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



Re: how to dynamically generate several file upload fields

2002-12-11 Thread matthew yee-king
I've got this working nicely now. And its not a /total/ HCI disaster by
any means :). 

cheers

- matthew


On Wed, 11 Dec 2002 10:10:17 +
matthew yee-king [EMAIL PROTECTED] wrote:

 
  Another idea you might try is similar to what I ended up doing. This
  involves having a single file input field. The user can only upload
  one file at a time, but after each upload they are brought back to
  the form to add more. This is implemented by having the form in
  session scope and the setFile() method (or whatever you call your
  file field) adds each FormFile that is set into it to a list. The
  advantage of this method is that it allows for any number of files ,
  but has several disadvantages too - such as needing to use the
  session scope, and it feels (very) clunky to the user.
  
 
 that sounds like the best solution to me for the moment. I need a
 quick solution as ever ;)
 

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




RE: How to Format default input text value according to user request?

2002-12-11 Thread Edgar P. Dollin
If I were doing this I would do it either in the validate() or reset()
functions of my form bean during the load action.

Edgar

-Original Message-
From: Renato Aganippe [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 4:18 AM
To: 'Struts Users Mailing List'
Subject: Re: How to Format default input text value according to user
request?


Miguel,

Thanks for your answer but I don't have any problem with bean:write
tag but with html:text tag.

Regards,

Renato

- Original Message -
From: Míguel Ángel Mulero Martínez
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 10:13 AM
Subject: RE: How to Format default input text value according to user
request?


 The Locale object exists in the Actions. Use an Action before the JSP 
 that creates this bean. In this way you can format the text before 
 call the bean:write

 Regards,
 Miguel

 -Mensaje original-
 De: Renato Aganippe [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 11 de diciembre de 2002 9:48
 Para: Struts Users Mailing List
 Asunto: How to Format default input text value according to user 
 request?

 Hello everybody,

 Please help, I can't get through this problem and it drives me crazy!

 I need to initialize the default field value from a html:text tag 
 with a timestamp field from a Bean according to the user's request 
 Locale.

 I am looking for an equivalent of formatKey attribute from 
 bean:write

 Thanks a lot,

 Renato


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






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


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




RE: how to dynamically generate several file upload fields

2002-12-11 Thread Andrew Hill
Wow. That was quick. I spent ages when I did it.
Good work :-)

-Original Message-
From: matthew yee-king [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 19:43
To: Struts Users Mailing List
Subject: Re: how to dynamically generate several file upload fields


I've got this working nicely now. And its not a /total/ HCI disaster by
any means :).

cheers

- matthew


On Wed, 11 Dec 2002 10:10:17 +
matthew yee-king [EMAIL PROTECTED] wrote:


  Another idea you might try is similar to what I ended up doing. This
  involves having a single file input field. The user can only upload
  one file at a time, but after each upload they are brought back to
  the form to add more. This is implemented by having the form in
  session scope and the setFile() method (or whatever you call your
  file field) adds each FormFile that is set into it to a list. The
  advantage of this method is that it allows for any number of files ,
  but has several disadvantages too - such as needing to use the
  session scope, and it feels (very) clunky to the user.
 

 that sounds like the best solution to me for the moment. I need a
 quick solution as ever ;)


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


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




RE: SOLVED common validation error page

2002-12-11 Thread David Mulligan
Solved by overriding the RequestProcessor and inserted the below code.

Now, if we got validation errors the request is forwarded to the form input
(if it exists),
otherwise to the validation_error forward.

// Has an input form been specified for this mapping?
String input = mapping.getInput();

//START MODIFIED CODE
if( input == null) {
  // Has a validation_error forward been specified for this mapping?
  ForwardConfig validationError = mapping.findForward(validation_error);
  if( validationError != null ) {
input = validationError.getPath();
  }
}
//END MODIFIED CODE





-Original Message-
From: David Mulligan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 9:57 AM
To: Struts-User (E-mail)
Subject: common validation error page


Got a quick validation question.

All validation errors that occur from action forms are to be displayed on a
common error page. Not the input page of the action! 
How do I setup the validator to forward to this common error page when there
are problems?


e.g. Something like the below will work

  action path=/logon
type=ie.lecan.core.web.authentication.actions.LogonAction
name=/authentication/logonForm
input=/pages/common/errors.vm
scope=request
forward name=success path=/myWorkspace.do/
  /action

but I prefer not this for two reasons 

1. the input should really be /pages/logon.vm and may confuse developers
etc. later.
2. it's a pain having to set input=/pages/common/error.vm for every
action.

Any ideas would be greatly appreciated
dave.



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

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




RE: how to submit a form using html:link

2002-12-11 Thread Bill Chmura

Do you mean you want to have the html link start the submit of the form?
You should just be able to add javascript to do the form.submit if that
is what you are looking for

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 3:52 AM
To: Struts Users Mailing List
Subject: how to submit a form using html:link


Is it possioble to submit a form using html:link tag.
I want to call a servlet that resided on another war file. I am able to
call it by click on html link. But, my requirement is to submit the
form.




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




Re: urgent

2002-12-11 Thread Amit Badheka
Thanks Andrew for help,

I am not finding anyway ,as yet to do it with struts action hence for the
time being I am  doing it by submitting thru javascript.

Amit Badheka.
- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 4:29 PM
Subject: RE: urgent


 Just saw your other email.
 Submitting from an action and forwarding from that instead of the browser
 seems a good idea but Ive not tried it myself for resources outside the
same
 webapp.
 Im not sure if it works or what needs to be done to make it work for that
 situation. Sorry :-(

 If you cant find a way to get that idea working then the other alternative
 is to continue trying to submit straight from the browser to the other
 servlet:

 I dont think you will be able to use the action attribute of html:form
for
 this as it will actually go and look up info about the form from struts
 config based on this. I forgot about that!

 If this form doesnt need to have an associated actionForm you could use a
 normal form tag (ie not a taglib) instead of the html:form tag. Make
 sure theres no slash before the http.

 Now on the other hand if you are using an action and actionForm then you
 could set the action attribute as the path to that action, but in your
code
 to submit the form, you have javascript that will change the action
property
 in the clientside document object model using javascript:

 function doSubmit()
 {

document.forms[0].action='http://localhost:7001/ManageStyle/servlet/stylegen
 eralinfoservlet';
 document.forms[0].submit();
 }

 (Adapt as required)

 Hope this helps.
 regards
 Andrew


 -Original Message-
 From: Amit Badheka [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 18:43
 To: [EMAIL PROTECTED]
 Subject: Re: urgent


 Hi Andrew,
 thanks for reply,

 the exact error message i am pasting here -

 javax.servlet.jsp.JspException: Cannot retrieve mapping for action
  /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet

 I hope it can help you understand the problem, and will be great help for
 me.

 Amit.

 - Original Message -
 From: Andrew Hill [EMAIL PROTECTED]
 To: Amit Badheka [EMAIL PROTECTED]
 Sent: Wednesday, December 11, 2002 3:40 PM
 Subject: RE: urgent


  Is that / supposed to be there in the front of http - or is it just copy
 and
  paste error writing the email?
 
  -Original Message-
  From: Amit Badheka [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 11, 2002 18:09
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: urgent
 
 
  Hi Andrew,
  thanks for reply,
 
  If I give the below url as action and submit the form I am getting error
 as
  not a valid url
  /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser
 
  and if I try with ActionForward from action then it is not giving any
 error,
  but also not doing anything.
 
  - Original Message -
  From: Andrew Hill [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, December 11, 2002 3:13 PM
  Subject: RE: urgent
 
 
   No joy with the javascript submit() huh? :-(
  
   Are you getting any error messages?
   Are you submitting to the correct url? (ie: forms action is set
   appropriately)
  
   -Original Message-
   From: Amit Badheka [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, December 11, 2002 17:36
   To: Struts Users Mailing List
   Subject: urgent
  
  
   Hi All,
  
   I have a requirement to call a servlet from a action class or jsp. The
   servlet is residing on the war file other than struts app. Hence,
there
  are
   two different context.
  
   The servlet is used for file upload so my jsp should contain
  multipart/form
   data. so, I have to call post method of the servlet.
  
   If I am using html:link I am able to call the servlet, but the form
data
  can
   not be passed.
  
   I also tried with action forward but it is not calling servlet.(may be
  b'cos
   it is not in same context).
  
   Is there any way to achieve something like this.
  
  
  
  
  
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
 
 


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




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




Map-backed ActionForms

2002-12-11 Thread Pat Quinn
I'm using the Map-Backed action form approach as detailed here:

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

I have a form bean with a one instance of a Value Object(i.e.customersVO), 
this value object contain an ArrayList(i.e. CustomerDetails) of other Value 
objects(i.e. CustomerDetailsVO).

--
Form Bean
--
public class customersForm extends ActionForm {


   private customersVO customers = null;


   /*Get  Set methods for the customers Value Object*/
   public void setCustomers(customersVO pCustomersVO ) {
   customers = pCustomersVO;
   }


   public customersVO getCustomers() {
   return customers;
   }


   /*Get  Set methods for the ArrayList of VO's contained within the 
customersVO*/
   public Object getCustomerDetail(int key) {
   return customers.getCustomerDetails().get(key);
   }

   public void setCustomerDetail(int key, Object value) {
  customers.getCustomerDetails().set(key, value);
   }
}


---
JSP Source
---
logic:iterate name=myForm  property=CustomerDetails indexId=rowIndex
	% String name = customerDetail[+rowIndex+];%
	html:text property=%=name + .firstName%/



This works fine but i personally don't like including scriplet code like 
this in my jsp's. Is there another way can do this??






_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



Prepopulating DynaActionForm which has an indexed property

2002-12-11 Thread Srinivas Bhagavathula

Hi,

I am reposting this question, did not get any input for my last post. Hope 
someone can give me some inputs here. thanks, srinivas


How can I prepopulate an DynaValidator/DynaAction form which has an  indexed 
property?

this is my form definition

form-bean name=myForm type=org.apache.struts.action.DynaActionForm
dynamic=true
form-property name=firstName type=java.lang.string[]/
form-property name=companyID type=java.lang.string/
/form-bean


Action class:

DynaBean newForm =
DynaActionFormClass.getDynaActionFormClass(myForm).newInstance
();

for (int i= 0; i  employee.numberofPersons() ; ++ i)
  newForm.set(firstName, i , employee.firstName();

newForm.set(companyID, 12345);
request.setAttribute(InfoForm, newForm);


The code breaks because it does not know the size of the firstName[] indexed 
property. I could have done this by using an initial property and set the 
size but the size changes dynamically. How can I set the size of the 
firstName property in the action class code (just before populating the 
property)


TIA,
srinivas





_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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



DynaForm example

2002-12-11 Thread Mark
Hello

Anybody have any pointers for using Mapped backed Action forms (MBAF).

I've read the documentation, MBAF fits the task in hand. I just need an
example or a clear explaination of how to get something up and running.

Many thanks in advance

mark


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




Re: DynaForm example

2002-12-11 Thread Pat Quinn

If you look at my last posting i've detailed how i'm using a List-Backed 
action form... mapped-backed is very similar.





From: Mark [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: DynaForm example
Date: Wed, 11 Dec 2002 15:06:53 +0100

Hello

Anybody have any pointers for using Mapped backed Action forms (MBAF).

I've read the documentation, MBAF fits the task in hand. I just need an
example or a clear explaination of how to get something up and running.

Many thanks in advance

mark


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


_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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



RE: Prepopulating DynaActionForm which has an indexed property

2002-12-11 Thread Robert Taylor
 Try this:

 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance();
 String[] firstNames = new String[employee.numberOfPersons()];

 for (int i= 0; i  employee.numberofPersons() ; ++ i)
firstNames[i] = employee.firstName(); // do you mean
employee.firstName(i); ?

 newForm.set(firstName, firstNames);
 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);



HTH,

robert


 -Original Message-
 From: Srinivas Bhagavathula [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 8:54 AM
 To: [EMAIL PROTECTED]
 Subject: Prepopulating DynaActionForm which has an indexed property



 Hi,

 I am reposting this question, did not get any input for my last
 post. Hope
 someone can give me some inputs here. thanks, srinivas


 How can I prepopulate an DynaValidator/DynaAction form which has
 an  indexed
 property?

 this is my form definition

 form-bean name=myForm type=org.apache.struts.action.DynaActionForm
 dynamic=true
 form-property name=firstName type=java.lang.string[]/
 form-property name=companyID type=java.lang.string/
 /form-bean


 Action class:

 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance
 ();

 for (int i= 0; i  employee.numberofPersons() ; ++ i)
newForm.set(firstName, i , employee.firstName();

 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);


 The code breaks because it does not know the size of the
 firstName[] indexed
 property. I could have done this by using an initial property and set the
 size but the size changes dynamically. How can I set the size of the
 firstName property in the action class code (just before populating the
 property)


 TIA,
 srinivas





 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail


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


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




Constructing absolute URL in struts 1.1-b2

2002-12-11 Thread Andrew Watters
I'm trying to create an absolute URL to redirect to. The URL is generated dynamically 
at runtime so I can't declare it in the config file for the module. My controller code 
ends with -

String url = getPaymentServerUrl(); // Returns an absolute URL
ActionForward forward = new ActionForward(url, true);
return forward;

I have tried all the different ActionForward constructors but Struts always pre-pends 
the web app name and module name so that it tries to redirect to

/webapp/module/http://www.etc.com/etc

instead of

http://www.etc.com/etc


Any suggestions would be greatly appreciated.
Andrew



Re: Prepopulating DynaActionForm which has an indexed property

2002-12-11 Thread Mark
I'm doing the same kind of thing, I don't think dynaform supports arrays so
that might explain why it isn't digging what its being sent. The mapped
backed action form is the puppy you need to get your head 'round (as do i).

Read the latest docs on 'map backed action forms'.. This basically puts an
undefined amount of form values into a hash map. To the best of my knowledge
you don't define these fields in config.xml.

Cheers mark

On 11-12-2002 14:54, Srinivas Bhagavathula [EMAIL PROTECTED] wrote:

 
 Hi,
 
 I am reposting this question, did not get any input for my last post. Hope
 someone can give me some inputs here. thanks, srinivas
 
 
 How can I prepopulate an DynaValidator/DynaAction form which has an  indexed
 property?
 
 this is my form definition
 
 form-bean name=myForm type=org.apache.struts.action.DynaActionForm
 dynamic=true
 form-property name=firstName type=java.lang.string[]/
 form-property name=companyID type=java.lang.string/
 /form-bean
 
 
 Action class:
 
 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance
 ();
 
 for (int i= 0; i  employee.numberofPersons() ; ++ i)
  newForm.set(firstName, i , employee.firstName();
 
 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);
 
 
 The code breaks because it does not know the size of the firstName[] indexed
 property. I could have done this by using an initial property and set the
 size but the size changes dynamically. How can I set the size of the
 firstName property in the action class code (just before populating the
 property)
 
 
 TIA,
 srinivas
 
 
 
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Struts Tags Helper

2002-12-11 Thread Heligon Sandra

I read on the site
http://codecentral.borland.com/codecentral/ccweb.exe/prodcat?prodid=3catid=
11
that an new open tool StrutsTagsHelper is available but I don't know
where I can find/download  the file StrutsTagsHelper.jar.

Sandra

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




Re: DynaForm example

2002-12-11 Thread Mark
I have seen it and i'm hoping to have the same problem as you in the next
hour or so..

Cheers mark

On 11-12-2002 15:13, Pat Quinn [EMAIL PROTECTED] wrote:

 
 If you look at my last posting i've detailed how i'm using a List-Backed
 action form... mapped-backed is very similar.
 
 
 
 
 
 From: Mark [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: DynaForm example
 Date: Wed, 11 Dec 2002 15:06:53 +0100
 
 Hello
 
 Anybody have any pointers for using Mapped backed Action forms (MBAF).
 
 I've read the documentation, MBAF fits the task in hand. I just need an
 example or a clear explaination of how to get something up and running.
 
 Many thanks in advance
 
 mark
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 _
 MSN 8 with e-mail virus protection service: 2 months FREE*
 http://join.msn.com/?page=features/virus
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




RE: Constructing absolute URL in struts 1.1-b2

2002-12-11 Thread Edgar P. Dollin
This is a known bug and the solution is not known at this time although
it is stated it will be fixed.

If you need an immediate solution you might consider using
javax.servlet.RequestDispatcher from
ServletRequest.getRequestDispatcher.

Edgar

-Original Message-
From: Andrew Watters [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 9:37 AM
To: '[EMAIL PROTECTED]'
Subject: Constructing absolute URL in struts 1.1-b2


I'm trying to create an absolute URL to redirect to. The URL is
generated dynamically at runtime so I can't declare it in the config
file for the module. My controller code ends with -

String url = getPaymentServerUrl(); // Returns an absolute URL
ActionForward forward = new ActionForward(url, true); return forward;

I have tried all the different ActionForward constructors but Struts
always pre-pends the web app name and module name so that it tries to
redirect to

/webapp/module/http://www.etc.com/etc

instead of

http://www.etc.com/etc


Any suggestions would be greatly appreciated.
Andrew


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




RE: Prepopulating DynaActionForm which has an indexed property

2002-12-11 Thread Srinivas Bhagavathula
Thanks Robert!!! That worked...appreciate the help







From: Robert Taylor [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Prepopulating DynaActionForm which has an indexed property
Date: Wed, 11 Dec 2002 09:21:11 -0500

 Try this:

 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance();
 String[] firstNames = new String[employee.numberOfPersons()];

 for (int i= 0; i  employee.numberofPersons() ; ++ i)
firstNames[i] = employee.firstName(); // do you mean
employee.firstName(i); ?

 newForm.set(firstName, firstNames);
 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);



HTH,

robert


 -Original Message-
 From: Srinivas Bhagavathula [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 8:54 AM
 To: [EMAIL PROTECTED]
 Subject: Prepopulating DynaActionForm which has an indexed property



 Hi,

 I am reposting this question, did not get any input for my last
 post. Hope
 someone can give me some inputs here. thanks, srinivas


 How can I prepopulate an DynaValidator/DynaAction form which has
 an  indexed
 property?

 this is my form definition

 form-bean name=myForm type=org.apache.struts.action.DynaActionForm
 dynamic=true
 form-property name=firstName type=java.lang.string[]/
 form-property name=companyID type=java.lang.string/
 /form-bean


 Action class:

 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance
 ();

 for (int i= 0; i  employee.numberofPersons() ; ++ i)
newForm.set(firstName, i , employee.firstName();

 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);


 The code breaks because it does not know the size of the
 firstName[] indexed
 property. I could have done this by using an initial property and set 
the
 size but the size changes dynamically. How can I set the size of the
 firstName property in the action class code (just before populating 
the
 property)


 TIA,
 srinivas





 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail


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


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


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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



Re: Prepopulating DynaActionForm which has an indexed property

2002-12-11 Thread Mark
I'm doing the same kind of thing, I don't think dynaform supports arrays so
that might explain why it isn't digging what its being sent. The mapped
backed action form is the puppy you need to get your head 'round (as do i).

Read the latest docs on 'map backed action forms'.. This basically puts an
undefined amount of form values into a hash map. To the best of my knowledge
you don't define these fields in config.xml.

Cheers mark

On 11-12-2002 14:54, Srinivas Bhagavathula [EMAIL PROTECTED] wrote:

 
 Hi,
 
 I am reposting this question, did not get any input for my last post. Hope
 someone can give me some inputs here. thanks, srinivas
 
 
 How can I prepopulate an DynaValidator/DynaAction form which has an  indexed
 property?
 
 this is my form definition
 
 form-bean name=myForm type=org.apache.struts.action.DynaActionForm
 dynamic=true
 form-property name=firstName type=java.lang.string[]/
 form-property name=companyID type=java.lang.string/
 /form-bean
 
 
 Action class:
 
 DynaBean newForm =
 DynaActionFormClass.getDynaActionFormClass(myForm).newInstance
 ();
 
 for (int i= 0; i  employee.numberofPersons() ; ++ i)
  newForm.set(firstName, i , employee.firstName();
 
 newForm.set(companyID, 12345);
 request.setAttribute(InfoForm, newForm);
 
 
 The code breaks because it does not know the size of the firstName[] indexed
 property. I could have done this by using an initial property and set the
 size but the size changes dynamically. How can I set the size of the
 firstName property in the action class code (just before populating the
 property)
 
 
 TIA,
 srinivas
 
 
 
 
 
 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Struts site and programmer listing on Jarkarta Resources site

2002-12-11 Thread Bill Blackmon
I've recently completed a Struts-driven site and would like to have it and
my firm listed on the Jakarta
Resources pages. There doesn't seem to be any way to submit this
information. Can anyone give me an email
address or something to send the information to?

Thanks,
Bill Blackmon


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




Re: Map-backed ActionForms

2002-12-11 Thread Mark
Pat

How do i get to my FormBean in my action class

usually:

MyForm theForm = (MyForm) form;

But when i try to compile javac says 'no', is there something i'm missing or
does javac hate me :)?


On 11-12-2002 14:49, Pat Quinn [EMAIL PROTECTED] wrote:

 I'm using the Map-Backed action form approach as detailed here:
 
 http://jakarta.apache.org/struts/userGuide/building_controller.html#map_action
 _form_classes
 
 I have a form bean with a one instance of a Value Object(i.e.customersVO),
 this value object contain an ArrayList(i.e. CustomerDetails) of other Value
 objects(i.e. CustomerDetailsVO).
 
 --
 Form Bean
 --
 public class customersForm extends ActionForm {
 
 
   private customersVO customers = null;
 
 
   /*Get  Set methods for the customers Value Object*/
   public void setCustomers(customersVO pCustomersVO ) {
   customers = pCustomersVO;
   }
 
 
   public customersVO getCustomers() {
   return customers;
   }
 
 
   /*Get  Set methods for the ArrayList of VO's contained within the
 customersVO*/
   public Object getCustomerDetail(int key) {
   return customers.getCustomerDetails().get(key);
   }
 
   public void setCustomerDetail(int key, Object value) {
  customers.getCustomerDetails().set(key, value);
   }
 }
 
 
 ---
 JSP Source
 ---
 logic:iterate name=myForm  property=CustomerDetails indexId=rowIndex
 % String name = customerDetail[+rowIndex+];%
 html:text property=%=name + .firstName%/
 
 
 
 This works fine but i personally don't like including scriplet code like
 this in my jsp's. Is there another way can do this??
 
 
 
 
 
 
 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*.
 http://join.msn.com/?page=features/featuredemail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Re: Constructing absolute URL in struts 1.1-b2

2002-12-11 Thread Andrew Watters
Thanks Edgar for your prompt reply. It is good to know I'm not going mad - I
searched the archives but couldn't find anything.

I tried both request.getRequestDispatcher.forward and response.sendRedirect
but in both cases I got an IllegalStateException because the response was
already committed. I haven't done anything to commit the response in my
controller, I think, so I assumed that the struts framework had done so. Is
this assumption correct do you know?

Thanks again for your help.
Andrew


- Original Message -
From: Edgar P. Dollin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 2:51 PM
Subject: RE: Constructing absolute URL in struts 1.1-b2


 This is a known bug and the solution is not known at this time although
 it is stated it will be fixed.

 If you need an immediate solution you might consider using
 javax.servlet.RequestDispatcher from
 ServletRequest.getRequestDispatcher.

 Edgar

 -Original Message-
 From: Andrew Watters [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 9:37 AM
 To: '[EMAIL PROTECTED]'
 Subject: Constructing absolute URL in struts 1.1-b2


 I'm trying to create an absolute URL to redirect to. The URL is
 generated dynamically at runtime so I can't declare it in the config
 file for the module. My controller code ends with -

 String url = getPaymentServerUrl(); // Returns an absolute URL
 ActionForward forward = new ActionForward(url, true); return forward;

 I have tried all the different ActionForward constructors but Struts
 always pre-pends the web app name and module name so that it tries to
 redirect to

 /webapp/module/http://www.etc.com/etc

 instead of

 http://www.etc.com/etc


 Any suggestions would be greatly appreciated.
 Andrew


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




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




Re: Map-backed ActionForms

2002-12-11 Thread Justin Ashworth
That should work.  Are you certain that MyForm is extending ActionForm?

- Original Message -
From: Mark [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 9:54 AM
Subject: Re: Map-backed ActionForms


 Pat

 How do i get to my FormBean in my action class

 usually:

 MyForm theForm = (MyForm) form;

 But when i try to compile javac says 'no', is there something i'm missing
or
 does javac hate me :)?


 On 11-12-2002 14:49, Pat Quinn [EMAIL PROTECTED] wrote:

  I'm using the Map-Backed action form approach as detailed here:
 
 
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on
  _form_classes
 
  I have a form bean with a one instance of a Value
Object(i.e.customersVO),
  this value object contain an ArrayList(i.e. CustomerDetails) of other
Value
  objects(i.e. CustomerDetailsVO).
 
  --
  Form Bean
  --
  public class customersForm extends ActionForm {
 
 
private customersVO customers = null;
 
 
/*Get  Set methods for the customers Value Object*/
public void setCustomers(customersVO pCustomersVO ) {
customers = pCustomersVO;
}
 
 
public customersVO getCustomers() {
return customers;
}
 
 
/*Get  Set methods for the ArrayList of VO's contained within the
  customersVO*/
public Object getCustomerDetail(int key) {
return customers.getCustomerDetails().get(key);
}
 
public void setCustomerDetail(int key, Object value) {
   customers.getCustomerDetails().set(key, value);
}
  }
 
 
  ---
  JSP Source
  ---
  logic:iterate name=myForm  property=CustomerDetails
indexId=rowIndex
  % String name = customerDetail[+rowIndex+];%
  html:text property=%=name + .firstName%/
 
 
 
  This works fine but i personally don't like including scriplet code like
  this in my jsp's. Is there another way can do this??
 
 
 
 
 
 
  _
  Add photos to your e-mail with MSN 8. Get 2 months FREE*.
  http://join.msn.com/?page=features/featuredemail
 
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 


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



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




Re: Map-backed ActionForms

2002-12-11 Thread Pat Quinn
You access your form bean in the very same way as before theres nothing new 
there.






From: Mark [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Map-backed ActionForms
Date: Wed, 11 Dec 2002 15:54:36 +0100

Pat

How do i get to my FormBean in my action class

usually:

MyForm theForm = (MyForm) form;

But when i try to compile javac says 'no', is there something i'm missing 
or
does javac hate me :)?


On 11-12-2002 14:49, Pat Quinn [EMAIL PROTECTED] wrote:

 I'm using the Map-Backed action form approach as detailed here:

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

 I have a form bean with a one instance of a Value 
Object(i.e.customersVO),
 this value object contain an ArrayList(i.e. CustomerDetails) of other 
Value
 objects(i.e. CustomerDetailsVO).

 --
 Form Bean
 --
 public class customersForm extends ActionForm {


   private customersVO customers = null;


   /*Get  Set methods for the customers Value Object*/
   public void setCustomers(customersVO pCustomersVO ) {
   customers = pCustomersVO;
   }


   public customersVO getCustomers() {
   return customers;
   }


   /*Get  Set methods for the ArrayList of VO's contained within the
 customersVO*/
   public Object getCustomerDetail(int key) {
   return customers.getCustomerDetails().get(key);
   }

   public void setCustomerDetail(int key, Object value) {
  customers.getCustomerDetails().set(key, value);
   }
 }


 ---
 JSP Source
 ---
 logic:iterate name=myForm  property=CustomerDetails 
indexId=rowIndex
 % String name = customerDetail[+rowIndex+];%
 html:text property=%=name + .firstName%/



 This works fine but i personally don't like including scriplet code like
 this in my jsp's. Is there another way can do this??






 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*.
 http://join.msn.com/?page=features/featuredemail


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




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


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



Re: Map-backed ActionForms

2002-12-11 Thread Mark
Dooh.. I assumed i had to pass the form to the excute method as a dynaform..
Cool i'll be back soon.

On 11-12-2002 15:59, Pat Quinn [EMAIL PROTECTED] wrote:

 You access your form bean in the very same way as before theres nothing new
 there.
 
 
 
 
 
 
 From: Mark [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: Map-backed ActionForms
 Date: Wed, 11 Dec 2002 15:54:36 +0100
 
 Pat
 
 How do i get to my FormBean in my action class
 
 usually:
 
 MyForm theForm = (MyForm) form;
 
 But when i try to compile javac says 'no', is there something i'm missing
 or
 does javac hate me :)?
 
 
 On 11-12-2002 14:49, Pat Quinn [EMAIL PROTECTED] wrote:
 
 I'm using the Map-Backed action form approach as detailed here:
 
 
 
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_actio
n
 _form_classes
 
 I have a form bean with a one instance of a Value
 Object(i.e.customersVO),
 this value object contain an ArrayList(i.e. CustomerDetails) of other
 Value
 objects(i.e. CustomerDetailsVO).
 
 --
 Form Bean
 --
 public class customersForm extends ActionForm {
 
 
   private customersVO customers = null;
 
 
   /*Get  Set methods for the customers Value Object*/
   public void setCustomers(customersVO pCustomersVO ) {
   customers = pCustomersVO;
   }
 
 
   public customersVO getCustomers() {
   return customers;
   }
 
 
   /*Get  Set methods for the ArrayList of VO's contained within the
 customersVO*/
   public Object getCustomerDetail(int key) {
   return customers.getCustomerDetails().get(key);
   }
 
   public void setCustomerDetail(int key, Object value) {
  customers.getCustomerDetails().set(key, value);
   }
 }
 
 
 ---
 JSP Source
 ---
 logic:iterate name=myForm  property=CustomerDetails
 indexId=rowIndex
 % String name = customerDetail[+rowIndex+];%
 html:text property=%=name + .firstName%/
 
 
 
 This works fine but i personally don't like including scriplet code like
 this in my jsp's. Is there another way can do this??
 
 
 
 
 
 
 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*.
 http://join.msn.com/?page=features/featuredemail
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*
 http://join.msn.com/?page=features/junkmail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Tile attribute has no value question

2002-12-11 Thread Joao Araujo
Hi,

	I have the following definition on my tile-defs.xml file:

tiles-definitions
definition name=mainLayout page=/pages/layouts/basicLayout.jsp
put name=header value=/pages/header.jsp /
put name=menu   value=/pages/mainMenu.jsp /
put name=body   value=/pages/blank_body.jsp /
put name=footer value=/pages/footer.jsp /
/definition
/tiles-definitions

	When I insert this tile in a page like this:

tiles:insert beanName=mainLayout beanScope=request/


	I Get the following message :

javax.servlet.ServletException: Error - Tag Insert : No value defined for 
bean 'mainLayout' with property 'null' in scope 'null'.

	I use the same basicLayout like this in a jsp page. It works pretty fine.

tiles:insert page=/pages/layouts/basicLayout.jsp flush=true
  tiles:put name=header value=/pages/header.jsp /
  tiles:put name=menu value=/pages/mainMenu.jsp /
  tiles:put name=body value=/pages/blank_body.jsp /
  tiles:put name=footer value=/pages/copyright.jsp /
/tiles:insert



	What is the big problem here? I have looked several documents and books 
but did not find the reason.


	Thanks in advance.

Joao,


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



Tiles editor, help

2002-12-11 Thread Heligon Sandra

I have developed a Struts application with Tiles definition.
I used JBuilder7, but it was a trial edition.
Now I use JBuilder6, but with JBuilder7 I was able to display Tiles
definition
with a friendly API without used XML syntax.
I don't remember which extension I must add to have this Tiles
editor
with JBuilder6.
Thanks a lot in advance.

Sandra

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




RE: Constructing absolute URL in struts 1.1-b2

2002-12-11 Thread Edgar P. Dollin
I use the RequestDispatcher without a problem.  I don't believe struts
does commits (I think I read something about tiles making commits
however).

Edgar

-Original Message-
From: Andrew Watters [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 9:56 AM
To: [EMAIL PROTECTED]
Subject: Re: Constructing absolute URL in struts 1.1-b2


Thanks Edgar for your prompt reply. It is good to know I'm not going mad
- I searched the archives but couldn't find anything.

I tried both request.getRequestDispatcher.forward and
response.sendRedirect but in both cases I got an IllegalStateException
because the response was already committed. I haven't done anything to
commit the response in my controller, I think, so I assumed that the
struts framework had done so. Is this assumption correct do you know?

Thanks again for your help.
Andrew


- Original Message -
From: Edgar P. Dollin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 2:51 PM
Subject: RE: Constructing absolute URL in struts 1.1-b2


 This is a known bug and the solution is not known at this time 
 although it is stated it will be fixed.

 If you need an immediate solution you might consider using 
 javax.servlet.RequestDispatcher from 
 ServletRequest.getRequestDispatcher.

 Edgar

 -Original Message-
 From: Andrew Watters [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 9:37 AM
 To: '[EMAIL PROTECTED]'
 Subject: Constructing absolute URL in struts 1.1-b2


 I'm trying to create an absolute URL to redirect to. The URL is 
 generated dynamically at runtime so I can't declare it in the config 
 file for the module. My controller code ends with -

 String url = getPaymentServerUrl(); // Returns an absolute URL 
 ActionForward forward = new ActionForward(url, true); return forward;

 I have tried all the different ActionForward constructors but Struts 
 always pre-pends the web app name and module name so that it tries to 
 redirect to

 /webapp/module/http://www.etc.com/etc

 instead of

 http://www.etc.com/etc


 Any suggestions would be greatly appreciated.
 Andrew


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




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


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




static elements in forms

2002-12-11 Thread Edgar Dollin
I have worked around this and it is not major, but does anyone know the
reason why optionsCollection can't take a  [ public static Collection ] from
a form bean as input?  This is an issue for me since if a select list is
related to the form, not the application, I prefer to keep it as part of the
form.
 
Thanks in advance.
 
Edgar



RE: Tiles editor, help - StrutsConsole new version ?

2002-12-11 Thread Heligon Sandra
It seems that it is the StrutsConsole extension that allows to
have Tiles extension.
I have downloaded the last version 3.1 of StrutsConsole but
it doesn't work. I think that the console.jar is not the same for
all the IDE, but only one .zip is available on the site
http://www.jamesholmes.com/struts/console/download.html
where can I find the StrutsConsole for JBuilder.

Thanks a lot in advance
Sandra

-Original Message-
From: Heligon Sandra 
Sent: 11 December 2002 16:59
To: '[EMAIL PROTECTED]'
Subject: Tiles editor, help
Importance: High



I have developed a Struts application with Tiles definition.
I used JBuilder7, but it was a trial edition.
Now I use JBuilder6, but with JBuilder7 I was able to display Tiles
definition
with a friendly API without used XML syntax.
I don't remember which extension I must add to have this Tiles
editor
with JBuilder6.
Thanks a lot in advance.

Sandra

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

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




RE: Tiles editor, help - StrutsConsole new version ?

2002-12-11 Thread James Holmes
If you visit the help section of my website it gives
you details on how to install Struts Console for each
of the specific IDEs.

http://www.jamesholmes.com/struts/console/help.html

-james

--- Heligon Sandra [EMAIL PROTECTED] wrote:
 It seems that it is the StrutsConsole extension that
 allows to
 have Tiles extension.
 I have downloaded the last version 3.1 of
 StrutsConsole but
 it doesn't work. I think that the console.jar is not
 the same for
 all the IDE, but only one .zip is available on the
 site

http://www.jamesholmes.com/struts/console/download.html
 where can I find the StrutsConsole for JBuilder.
 
 Thanks a lot in advance
 Sandra
 
 -Original Message-
 From: Heligon Sandra 
 Sent: 11 December 2002 16:59
 To: '[EMAIL PROTECTED]'
 Subject: Tiles editor, help
 Importance: High
 
 
 
   I have developed a Struts application with Tiles
 definition.
   I used JBuilder7, but it was a trial edition.
   Now I use JBuilder6, but with JBuilder7 I was able
 to display Tiles
 definition
   with a friendly API without used XML syntax.
   I don't remember which extension I must add to have
 this Tiles
 editor
   with JBuilder6.
   Thanks a lot in advance.
 
   Sandra
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: Constructing absolute URL in struts 1.1-b2

2002-12-11 Thread Andrew Watters
Thanks again, it must be something in our application that is causing the
exception then. Off I go to investigate...

Andrew


- Original Message -
From: Edgar P. Dollin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 4:22 PM
Subject: RE: Constructing absolute URL in struts 1.1-b2


 I use the RequestDispatcher without a problem.  I don't believe struts
 does commits (I think I read something about tiles making commits
 however).

 Edgar

 -Original Message-
 From: Andrew Watters [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 9:56 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Constructing absolute URL in struts 1.1-b2


 Thanks Edgar for your prompt reply. It is good to know I'm not going mad
 - I searched the archives but couldn't find anything.

 I tried both request.getRequestDispatcher.forward and
 response.sendRedirect but in both cases I got an IllegalStateException
 because the response was already committed. I haven't done anything to
 commit the response in my controller, I think, so I assumed that the
 struts framework had done so. Is this assumption correct do you know?

 Thanks again for your help.
 Andrew


 - Original Message -
 From: Edgar P. Dollin [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, December 11, 2002 2:51 PM
 Subject: RE: Constructing absolute URL in struts 1.1-b2


  This is a known bug and the solution is not known at this time
  although it is stated it will be fixed.
 
  If you need an immediate solution you might consider using
  javax.servlet.RequestDispatcher from
  ServletRequest.getRequestDispatcher.
 
  Edgar
 
  -Original Message-
  From: Andrew Watters [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 11, 2002 9:37 AM
  To: '[EMAIL PROTECTED]'
  Subject: Constructing absolute URL in struts 1.1-b2
 
 
  I'm trying to create an absolute URL to redirect to. The URL is
  generated dynamically at runtime so I can't declare it in the config
  file for the module. My controller code ends with -
 
  String url = getPaymentServerUrl(); // Returns an absolute URL
  ActionForward forward = new ActionForward(url, true); return forward;
 
  I have tried all the different ActionForward constructors but Struts
  always pre-pends the web app name and module name so that it tries to
  redirect to
 
  /webapp/module/http://www.etc.com/etc
 
  instead of
 
  http://www.etc.com/etc
 
 
  Any suggestions would be greatly appreciated.
  Andrew
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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


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




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




RE: Tiles editor, help - StrutsConsole new version ?

2002-12-11 Thread Emmanuel Boudrant

 Hi Sandra,
Struts console work fine with my JBuilder6, did you read 
http://www.jamesholmes.com/struts/console/help.html#jbuilder

-emmanuel
  Heligon Sandra lt;[EMAIL PROTECTED]gt; a écrit : It seems that it is the 
StrutsConsole extension that allows to
have Tiles extension.
I have downloaded the last version 3.1 of StrutsConsole but
it doesn't work. I think that the console.jar is not the same for
all the IDE, but only one .zip is available on the site
http://www.jamesholmes.com/struts/console/download.html
where can I find the StrutsConsole for JBuilder.

Thanks a lot in advance
Sandra

-Original Message-
From: Heligon Sandra 
Sent: 11 December 2002 16:59
To: '[EMAIL PROTECTED]'
Subject: Tiles editor, help
Importance: High



I have developed a Struts application with Tiles definition.
I used JBuilder7, but it was a trial edition.
Now I use JBuilder6, but with JBuilder7 I was able to display Tiles
definition
with a friendly API without used XML syntax.
I don't remember which extension I must add to have this Tiles
editor
with JBuilder6.
Thanks a lot in advance.

Sandra

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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



-
Soyez solidaire soutenez l’action du Téléthon avec Yahoo! France.
Cliquez ici pour faire un don !


Map-backed ActionForms with JSTL

2002-12-11 Thread Justin Ashworth
Hi,

Has anyone been able to successfully access properties in a map-backed
ActionForm with JSTL?  I haven't been able to come up with the expression
language to retrieve properties out of a Map in my ActionForm.  If this is
possible, what is the syntax?  I have tried c:out
value=${profilePage[property].ID}, but that didn't return anything.  I
don't get a compilation error - it just returns empty.  profilePage is my
ActionForm, property is the name of the Map within my form (with the
appropriate getProperty(String) and setProperty(String, Object) methods),
and ID is the key within the property Map.

Once I get this figured out, I'm going to try to replace ID with a constant
variable defined in some class.  Ideas on that?

Thanks,

Justin


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




Re: static elements in forms

2002-12-11 Thread David Graham
Probably because of the JavaBean spec.  I'm not too familiar with the 
details but static variables may not be accessible the same way member 
variables are.

David






From: Edgar Dollin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: static elements in forms
Date: Wed, 11 Dec 2002 11:29:34 -0500

I have worked around this and it is not major, but does anyone know the
reason why optionsCollection can't take a  [ public static Collection ] 
from
a form bean as input?  This is an issue for me since if a select list is
related to the form, not the application, I prefer to keep it as part of 
the
form.

Thanks in advance.

Edgar


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Transforming a String to valid HTML encoding

2002-12-11 Thread Hirschmann, Bernhard

Hello!

Is there a parser around, which is able to parse a String with special
characters (like in the German language), and can transform them into valid
html encoding?

(like schouml;n for schön)

Best regards
Bernhard




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




Re: Using the key of a HashMap in an html:option tag ?

2002-12-11 Thread Kris Schneider
The problem is that the type of the property that the tag handler exposes as an
attribute has to be assignable from the type of the expression. Taking the
current example:

html:select styleClass=field property=assignedTo
  logic:iterate id=element name=employees
html:option value=%= ((java.util.Map.Entry)element).getKey() %
  bean:write name=element property=value.firstName/
  bean:write name=element property=value.lastName/
/html:option
  /logic:iterate
/html:select

The type of the expression is Object and the type of the tag handler's
(OptionTag) value property is String. So you'll end up with a compilation error
like:

setValue(java.lang.String) in org.apache.struts.taglib.html.OptionTag cannot be
applied to (java.lang.Object)

In which case, either of these should work:

%= ((java.util.Map.Entry)element).getKey().toString() %
%= String.valueOf(((java.util.Map.Entry)element).getKey()) %

If you know that the key really is a String, you could also cast:

%= (String)((java.util.Map.Entry)element).getKey() %

Quoting Rick Reumann [EMAIL PROTECTED]:

 On Tuesday, December 10, 2002, 5:06:26 PM, Kris wrote:
 
 KS Glad it's working, but I don't understand why you'd have a problem with
 the JSP
 KS expression. IIRC, it's equivalent to the following code getting generated
 within
 KS the page's _jspService method:
 
 Trust me I don't know either. I'm using Tomcat 4.0.6 if that
 matters. It only causes me this problem when inside of a tag
 trying to use %= . I don't get it. Has anyone else ever ran into
 this situation?
 
 
 -- 
 
 Rick
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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

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




RE: Tiles editor, help - StrutsConsole new version ?

2002-12-11 Thread Heligon Sandra
I have the StrutsConsole tab when I open a struts-config.xml
file but I don't have this tab with the tiles-def.xml file.
I read that It can be due to the DOCTYPE but this DOCTYPE
seems good:
!DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles
Configuration//EN
http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;

-Original Message-
From: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2002 17:29
To: Struts Users Mailing List
Subject: RE: Tiles editor, help - StrutsConsole new version ?



 Hi Sandra,
Struts console work fine with my JBuilder6, did you read
http://www.jamesholmes.com/struts/console/help.html#jbuilder

-emmanuel
  Heligon Sandra lt;[EMAIL PROTECTED]gt; a écrit : It seems that
it is the StrutsConsole extension that allows to
have Tiles extension.
I have downloaded the last version 3.1 of StrutsConsole but
it doesn't work. I think that the console.jar is not the same for
all the IDE, but only one .zip is available on the site
http://www.jamesholmes.com/struts/console/download.html
where can I find the StrutsConsole for JBuilder.

Thanks a lot in advance
Sandra

-Original Message-
From: Heligon Sandra 
Sent: 11 December 2002 16:59
To: '[EMAIL PROTECTED]'
Subject: Tiles editor, help
Importance: High



I have developed a Struts application with Tiles definition.
I used JBuilder7, but it was a trial edition.
Now I use JBuilder6, but with JBuilder7 I was able to display Tiles
definition
with a friendly API without used XML syntax.
I don't remember which extension I must add to have this Tiles
editor
with JBuilder6.
Thanks a lot in advance.

Sandra

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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



-
Soyez solidaire soutenez l'action du Téléthon avec Yahoo! France.
Cliquez ici pour faire un don !

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




RE: Map-backed ActionForms with JSTL

2002-12-11 Thread Jarnot Voytek Contr AU HQ/SC
not a JSTL expert here, but have you tried ${profilePage.property[ID]}?

-Original Message-
From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 10:34 AM
To: Struts Users Mailing List
Subject: Map-backed ActionForms with JSTL


Hi,

Has anyone been able to successfully access properties in a map-backed
ActionForm with JSTL?  I haven't been able to come up with the expression
language to retrieve properties out of a Map in my ActionForm.  If this is
possible, what is the syntax?  I have tried c:out
value=${profilePage[property].ID}, but that didn't return anything.  I
don't get a compilation error - it just returns empty.  profilePage is my
ActionForm, property is the name of the Map within my form (with the
appropriate getProperty(String) and setProperty(String, Object) methods),
and ID is the key within the property Map.

Once I get this figured out, I'm going to try to replace ID with a constant
variable defined in some class.  Ideas on that?

Thanks,

Justin


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

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




Re: Transforming a String to valid HTML encoding

2002-12-11 Thread Andrew Watters
Can you use java.net.URLEncoder.encode(String s,String enc) (since J2SE
1.4)?

- Original Message -
From: Hirschmann, Bernhard [EMAIL PROTECTED]
To: Struts User Mailing List (E-Mail) [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 4:34 PM
Subject: Transforming a String to valid HTML encoding



Hello!

Is there a parser around, which is able to parse a String with special
characters (like in the German language), and can transform them into valid
html encoding?

(like schouml;n for schön)

Best regards
Bernhard




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




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




RE: Transforming a String to valid HTML encoding

2002-12-11 Thread Dennis van den Berg
Hi,

from javadoc of struts:

org.apache.struts.util.ResponseUtils.

filter
public static java.lang.String filter(java.lang.String value)Filter the specified 
string for characters that are senstive to HTML interpreters, returning the string 
with these characters replaced by the corresponding character entities.
Parameters:
value - The string to be filtered and returned

Hope this helps.

Dennis

-Original Message-
From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
Sent: woensdag 11 december 2002 17:35
To: Struts User Mailing List (E-Mail)
Subject: Transforming a String to valid HTML encoding



Hello!

Is there a parser around, which is able to parse a String with special
characters (like in the German language), and can transform them into valid
html encoding?

(like schouml;n for schön)

Best regards
Bernhard




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


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




Help! StrutsL-EL error (HTML tag)

2002-12-11 Thread Hohlen, John
I'm currently encountering the following error in my JSP trying to use
Struts-EL tags.

Error in using tag library uri='/WEB-INF/struts-html-el.tld'
prefix='html-el': The Tag class 'org.apache.strutsel.taglib.html.ELImageTag'
has no setter method corresponding to TLD declared attribute 'styleId', (JSP
1.1 spec, 5.4.1)

I decompiled the binary code to insure the ElImageTag inherits the
styleId attribute via the
following inheritance hiearchy:

BaseHandlerTag (public declaration of styleId)
   |
SubmitTag (Struts HTML
   |
ImageTag (Struts HTML)
   |
ElImageTag (Strut-EL HTML)

Has anyone else encountered this problem?  I posted a similar message
yesterday but didn't get any feedback. 

Thanks a lot, JOHN


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




I cannot unsubscribe from Struts Email list

2002-12-11 Thread Ota, Larry W
I wish to unsubscribe to this mailing list.  I've tried to unsubscribe by following:
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]

It's been a few days since I sent that out, and I am still receiving all posts.  I 
love the info and plan on getting back onto the list when the time is right, but for 
now, I need to opt out.

Can anyone tell me why I might be having trouble unsubscribing?   I've sent empty 
email to the above address... I've sent email w/unsubscribe as the Subject field.   
Neither seemed to take.


Larry Ota
Structural Analysis Computing



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




RE: I cannot unsubscribe from Struts Email list

2002-12-11 Thread Arnaud HERITIER
Did you send this e-mail with the SAME e-mail address you used to register
to the mailing-list ???

 -Message d'origine-
 De : Ota, Larry W [mailto:[EMAIL PROTECTED]]
 Envoyé : mercredi 11 décembre 2002 17:54
 À : Struts Users Mailing List (E-mail)
 Objet : I cannot unsubscribe from Struts Email list


 I wish to unsubscribe to this mailing list.  I've tried to
 unsubscribe by following:
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]

 It's been a few days since I sent that out, and I am still
 receiving all posts.  I love the info and plan on getting
 back onto the list when the time is right, but for now, I
 need to opt out.

 Can anyone tell me why I might be having trouble
 unsubscribing?   I've sent empty email to the above
 address... I've sent email w/unsubscribe as the Subject
 field.   Neither seemed to take.


 Larry Ota
 Structural Analysis Computing



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



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




RE: Map-backed ActionForms with JSTL

2002-12-11 Thread Kris Schneider
Assuming you've got something like:

public ProfilePageForm extends ActionForm {
  private final Map map = new HashMap();

  public void setProperty(String key, Object value) {
map.put(key, value);
  }

  public Object getProperty(String key) {
return map.get(key);
  }
}

As a standard bean, there really aren't any properties exposed for JSTL to play
with. You'd have to add something like:

public Map getMap() {
  return map;
}

Then you should be able to do:

c:out value=${profilePage.map.ID}/

or:

c:out value=${profilePage.map['ID']}/

Quoting Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED]:

 not a JSTL expert here, but have you tried ${profilePage.property[ID]}?
 
 -Original Message-
 From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 10:34 AM
 To: Struts Users Mailing List
 Subject: Map-backed ActionForms with JSTL
 
 
 Hi,
 
 Has anyone been able to successfully access properties in a map-backed
 ActionForm with JSTL?  I haven't been able to come up with the expression
 language to retrieve properties out of a Map in my ActionForm.  If this is
 possible, what is the syntax?  I have tried c:out
 value=${profilePage[property].ID}, but that didn't return anything.  I
 don't get a compilation error - it just returns empty.  profilePage is my
 ActionForm, property is the name of the Map within my form (with the
 appropriate getProperty(String) and setProperty(String, Object) methods),
 and ID is the key within the property Map.
 
 Once I get this figured out, I'm going to try to replace ID with a constant
 variable defined in some class.  Ideas on that?
 
 Thanks,
 
 Justin
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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

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




Re: I cannot unsubscribe from Struts Email list

2002-12-11 Thread Eddie Bush
The process goes like:
   - send the email you did
   - wait for a reply
   - reply to that reply
   - receive notification that you're off the list

If that process fails you, you could always contact the owner at  
[EMAIL PROTECTED] and have them manually remove you.

Ota, Larry W wrote:

I wish to unsubscribe to this mailing list.  I've tried to unsubscribe by following:
 

To unsubscribe, e-mail:  
mailto:[EMAIL PROTECTED]
   


It's been a few days since I sent that out, and I am still receiving all posts.  I love the info and plan on getting back onto the list when the time is right, but for now, I need to opt out.

Can anyone tell me why I might be having trouble unsubscribing?   I've sent empty email to the above address... I've sent email w/unsubscribe as the Subject field.   Neither seemed to take.


Larry Ota
Structural Analysis Computing


--
Eddie Bush




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




Re: Help! StrutsL-EL error (HTML tag)

2002-12-11 Thread Brian Moseley
Hohlen, John wrote:

I'm currently encountering the following error in my JSP trying to use
Struts-EL tags.

Error in using tag library uri='/WEB-INF/struts-html-el.tld'
prefix='html-el': The Tag class 'org.apache.strutsel.taglib.html.ELImageTag'
has no setter method corresponding to TLD declared attribute 'styleId', (JSP
1.1 spec, 5.4.1)


that's exactly what happened to me when i manually added styleId to 
struts-html-el.tld a couple of weeks ago, which prompted me to make my 
original post.


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



Design tools and Struts

2002-12-11 Thread Moyer, Alan L
I'm interested in finding what web design tools (Example: Dreamweaver) work
well with Struts. With a good tool, the effort to go from web page design to
JSP with struts tag libraries should be mimimized.

Any recommendations? Tools to avoid?

Thanks much,

Al


This transmission is intended only for use by the addressee(s) named herein and may 
contain information that is proprietary, confidential and/or legally privileged. If 
you are not the intended recipient, you are hereby notified that any disclosure, 
copying, distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, 
please immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. 


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




RE: Help! StrutsL-EL error (HTML tag)

2002-12-11 Thread Karr, David
I think I found the problem in the latest code base.  Adding styleId to 
html-el:image required one more change that I didn't think of.  I had to uncomment 
the use of the styleId attribute in the BeanInfo class.  I've submitted a fix which 
will hopefully be in tonight's build (if the problem with building of struts-el has 
been resolved).

 -Original Message-
 From: Hohlen, John [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 8:54 AM
 To: Struts-User (E-mail)
 Subject: Help! StrutsL-EL error (HTML tag)
 
 
 I'm currently encountering the following error in my JSP trying to use
 Struts-EL tags.
 
 Error in using tag library uri='/WEB-INF/struts-html-el.tld'
 prefix='html-el': The Tag class 
 'org.apache.strutsel.taglib.html.ELImageTag'
 has no setter method corresponding to TLD declared attribute 
 'styleId', (JSP
 1.1 spec, 5.4.1)
 
 I decompiled the binary code to insure the ElImageTag inherits the
 styleId attribute via the
 following inheritance hiearchy:
 
 BaseHandlerTag (public declaration of styleId)
|
 SubmitTag (Struts HTML
|
 ImageTag (Struts HTML)
|
 ElImageTag (Strut-EL HTML)
 
 Has anyone else encountered this problem?  I posted a similar message
 yesterday but didn't get any feedback. 
 
 Thanks a lot, JOHN
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: Help! StrutsL-EL error (HTML tag)

2002-12-11 Thread Brian Moseley
Karr, David wrote:

I think I found the problem in the latest code base.  Adding styleId to html-el:image required one more change that I didn't think of.  I had to uncomment the use of the styleId attribute in the BeanInfo class.  I've submitted a fix which will hopefully be in tonight's build (if the problem with building of struts-el has been resolved).


fwiw, i also did that, and i still go the no setter method jsp error 
mentioned earlier in the thread. hopefully you will nail the issue tho. 
thanks david!




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



tiles:insert page=?

2002-12-11 Thread ajTreece
Folks...

I tried to search the archives, but for some reason any text search 
returns no data... Could just be me!

I have a tile def and in it I have the following code:

tiles:insert page=some-jsp/

The challenge is the some-jsp page to be inserted could be one of 
many. Is it possible to set the page name in a variable (request, 
session, etc.) then let the tiles:insert retrieve it form that variable?

I tried doing a request.setAttribute(link,xxx) in the action servlet 
and then doing a tiles:insert page=%=request.getAttribute('link')/
but that doesn't seem to work.

Are there any examples out there that do something g along these lines?

Later, ajTreece


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



Cannot find bean under name org.apache.struts.taglib.html.BEAN

2002-12-11 Thread aduprat . struts
Hello all.

I'm back with my modules problems.
Someone taold me that hmtl:form is bugged in struts 1.1 and that it is for this reason 
i can find any action when in a module witch is not the default one.
So i transformed my html:form... /html:form in FORM.../FORM

Then i have another problem : 
Generated page comes with an error : 
javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN

What's wrong now...
I'm quite desappointed with use of struts 1.1 :-(

Thanks to help me becoming happy with struts again.

Alexandre.

-
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,15 € TTC/min)


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




RE: Cannot find bean under name org.apache.struts.taglib.html.BEAN

2002-12-11 Thread James Childers

 Then i have another problem : 
 Generated page comes with an error : 
 javax.servlet.ServletException: Cannot find bean under name 
 org.apache.struts.taglib.html.BEAN

Check your form bean and make sure it has getters/setters for each element in the 
html:form/html:form tag. If it is getting thrown during validation this may be 
what is causing your problem. 

-= J

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




Re: RE: Cannot find bean under name org.apache.struts.taglib.html.BEAN

2002-12-11 Thread aduprat . struts
I'm sure each property of the form has a getter in the for bean cause it was working 
in struts 1.0 without any module...

can it be becuse i put FORM in place of html:form ?


Message d'origine
Sujet: RE: Cannot find bean under name org.apache.struts.taglib.html.BEAN
Date: Wed, 11 Dec 2002 11:35:05 -0600
De: James Childers [EMAIL PROTECTED]
A: Struts Users Mailing List [EMAIL PROTECTED]


 Then i have another problem : 
 Generated page comes with an error : 
 javax.servlet.ServletException: Cannot find bean under name 
 org.apache.struts.taglib.html.BEAN

Check your form bean and make sure it has getters/setters for each element in the 
html:form/html:form tag. If it is getting thrown during validation this may be 
what is causing your problem. 

-= J

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


-
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,15 € TTC/min)


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




RE: Help! StrutsL-EL error (HTML tag)

2002-12-11 Thread Karr, David
If that's the case, then I'll have to look at this closer tonight.  I
can only work on minor testing and changes during the day here.

 -Original Message-
 From: Brian Moseley [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 9:22 AM
 To: Struts Users Mailing List
 Subject: Re: Help! StrutsL-EL error (HTML tag)
 
 
 Karr, David wrote:
  I think I found the problem in the latest code base.  
 Adding styleId to html-el:image required one more change 
 that I didn't think of.  I had to uncomment the use of the 
 styleId attribute in the BeanInfo class.  I've submitted a 
 fix which will hopefully be in tonight's build (if the 
 problem with building of struts-el has been resolved).
 
 fwiw, i also did that, and i still go the no setter method 
 jsp error 
 mentioned earlier in the thread. hopefully you will nail the 
 issue tho. 
 thanks david!
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Struts design: All actions in one ActionClass

2002-12-11 Thread Jordan Thomas
Hi,

What is the best way to design my application? Is it better to

a) Put all my actions for a particluar area (i.e. creating, editing and
deleting user accounts) in one Action class

or

b) Use a seperate action class for every action in my application

or

c) Put all of the actions for a particular workflow in a single Action
class.

I am looking to have an application that is easy to maintain and flexible.
Suggestions/Advice would be most appreciated.

thanks

Jordan


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




Re: Design tools and Struts

2002-12-11 Thread Gemes Tibor
2002-12-11, sze keltezssel Moyer, Alan L ezt rta:
 I'm interested in finding what web design tools (Example: Dreamweaver) work
 well with Struts. With a good tool, the effort to go from web page design to
 JSP with struts tag libraries should be mimimized.
 

I was told that the Dreamweaver MX (or similar, I don't use such stuff)
supports the work w/ taglib.

Tib


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




RE: Struts design: All actions in one ActionClass

2002-12-11 Thread Nelson, Laird
 -Original Message-
 From: Jordan Thomas [mailto:[EMAIL PROTECTED]]
 What is the best way to design my application? Is it better to
 a) Put all my actions for a particluar area (i.e. creating, 
 editing and
 deleting user accounts) in one Action class
 
 or
 
 b) Use a seperate action class for every action in my application
 
 or
 
 c) Put all of the actions for a particular workflow in a single Action
 class.

(b) in general is the best choice.  Actions are basically like event
handlers in a GUI.

The drawback to (b) of course is that you:

  *  have a lot of classes
  *  have a lot of people potentially stepping on each other to add mappings
 to the configuration file

Occasionally, when (b) is really, really overkill I'll use (c), but I
usually regret it later.

Just one man's opinion.

Cheers,
Laird

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




Re: Struts design: All actions in one ActionClass

2002-12-11 Thread Patrice
For me, it's easy to maintain seperate actions.
If you want to group different actions in one Action class, you might use a
DispatchAction with a method for each process.

Hope it helps

Patrice

- Original Message -
From: Jordan Thomas [EMAIL PROTECTED]
To: Struts-User [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 7:05 PM
Subject: Struts design: All actions in one ActionClass


 Hi,

 What is the best way to design my application? Is it better to

 a) Put all my actions for a particluar area (i.e. creating, editing and
 deleting user accounts) in one Action class

 or

 b) Use a seperate action class for every action in my application

 or

 c) Put all of the actions for a particular workflow in a single Action
 class.

 I am looking to have an application that is easy to maintain and flexible.
 Suggestions/Advice would be most appreciated.

 thanks

 Jordan


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



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




Re: Struts design: All actions in one ActionClass

2002-12-11 Thread David Graham
Definitely b.  It will be far easier to maintain.  If you're worried about 
having a lot of actions you can look at DispatchAction or using DynaBeans.

David






From: Jordan Thomas [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts-User [EMAIL PROTECTED]
Subject: Struts design: All actions in one ActionClass
Date: Wed, 11 Dec 2002 19:05:36 +0100

Hi,

What is the best way to design my application? Is it better to

a) Put all my actions for a particluar area (i.e. creating, editing and
deleting user accounts) in one Action class

or

b) Use a seperate action class for every action in my application

or

c) Put all of the actions for a particular workflow in a single Action
class.

I am looking to have an application that is easy to maintain and flexible.
Suggestions/Advice would be most appreciated.

thanks

Jordan


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


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



RE: Struts design: All actions in one ActionClass

2002-12-11 Thread Chappell, Simon P
Abolutely go with option B.  We did this and if you keep all of your actual business 
logic outside of your actions (the only way to fly) then you end up with lots of small 
and easy to understand/maintain actions. This worked for us, so I'm not speaking from 
theory here. :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Jordan Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:06 PM
To: Struts-User
Subject: Struts design: All actions in one ActionClass


Hi,

What is the best way to design my application? Is it better to

a) Put all my actions for a particluar area (i.e. creating, editing and
deleting user accounts) in one Action class

or

b) Use a seperate action class for every action in my application

or

c) Put all of the actions for a particular workflow in a single Action
class.

I am looking to have an application that is easy to maintain 
and flexible.
Suggestions/Advice would be most appreciated.

thanks

Jordan


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



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




Re: tiles:insert page=?

2002-12-11 Thread ajTreece
Please disregard... I figured it out.

Thanks...


ajTreece wrote:

Folks...

I tried to search the archives, but for some reason any text search 
returns no data... Could just be me!

I have a tile def and in it I have the following code:

tiles:insert page=some-jsp/

The challenge is the some-jsp page to be inserted could be one of 
many. Is it possible to set the page name in a variable (request, 
session, etc.) then let the tiles:insert retrieve it form that variable?

I tried doing a request.setAttribute(link,xxx) in the action servlet 
and then doing a tiles:insert page=%=request.getAttribute('link')/
but that doesn't seem to work.

Are there any examples out there that do something g along these lines?

Later, ajTreece


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





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




RE: Struts design: All actions in one ActionClass

2002-12-11 Thread Ron Day
where do you do your business logic ?

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:52 PM
To: Struts Users Mailing List
Subject: RE: Struts design: All actions in one ActionClass


Abolutely go with option B.  We did this and if you keep all of your actual
business logic outside of your actions (the only way to fly) then you end up
with lots of small and easy to understand/maintain actions. This worked for
us, so I'm not speaking from theory here. :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Jordan Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:06 PM
To: Struts-User
Subject: Struts design: All actions in one ActionClass


Hi,

What is the best way to design my application? Is it better to

a) Put all my actions for a particluar area (i.e. creating, editing and
deleting user accounts) in one Action class

or

b) Use a seperate action class for every action in my application

or

c) Put all of the actions for a particular workflow in a single Action
class.

I am looking to have an application that is easy to maintain
and flexible.
Suggestions/Advice would be most appreciated.

thanks

Jordan


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



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


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




RE: Struts design: All actions in one ActionClass

2002-12-11 Thread Chappell, Simon P
In business logic classes completely outside of the Struts arena. Check out the 
PowerPoint presentation that I have on my website's Struts page.

http://simonpeter.com/techie/java/struts/index.html

This will explain some of the layering and separation that we put into our recent 
system.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 1:01 PM
To: Struts Users Mailing List
Subject: RE: Struts design: All actions in one ActionClass


where do you do your business logic ?

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:52 PM
To: Struts Users Mailing List
Subject: RE: Struts design: All actions in one ActionClass


Abolutely go with option B.  We did this and if you keep all 
of your actual
business logic outside of your actions (the only way to fly) 
then you end up
with lots of small and easy to understand/maintain actions. 
This worked for
us, so I'm not speaking from theory here. :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Jordan Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 12:06 PM
To: Struts-User
Subject: Struts design: All actions in one ActionClass


Hi,

What is the best way to design my application? Is it better to

a) Put all my actions for a particluar area (i.e. creating, 
editing and
deleting user accounts) in one Action class

or

b) Use a seperate action class for every action in my application

or

c) Put all of the actions for a particular workflow in a single Action
class.

I am looking to have an application that is easy to maintain
and flexible.
Suggestions/Advice would be most appreciated.

thanks

Jordan


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



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


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



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




Multiple submits in form with same display label

2002-12-11 Thread Viggio, Alex
The UI spec for a page I must implement in a Struts 1.0.2 app calls for
multiple submit buttons on the form all having the label Edit to indicate
a desire to modify specific sets of data for a large data object. Other than
the submit buttons, the page does not have any read/write form controls,
although I was planning on re-using an existing ActionForm for the many
display values on the page using bean:write.

Still being a Struts 1.0.2 newbie, I thought of two ways to accomplish this:

1. Assign different property attributes in each of these Edit buttons'
html:submit tags and handle this mess in the Action.

2. Specify multiple HTML forms in the page with different target actions
using DispatchAction or a similar approach (although I haven't tried using
multiple html:form tags on one page so I might end up using HTML form
tags if that works)

Is there a better way to accomplish this in 1.0.2?

Thanks,
- Alex

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




  1   2   >