Re: AW: Question about (again)

2003-02-27 Thread Peng Tuck Kwok
Hey Bernhard thanks.

Here it goes.

Hirschmann, Bernhard wrote:
Hey Pen,

if you could post the JSP code, maybe I could give you a hint.

Regards,
Bernhard
-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 27. Februar 2003 10:21
An: Struts Users Mailing List
Betreff: Question about  (again)
I've been able to display a collection of beans using the  
tag in conjunction with with the  tag but I am 
stuck with a problem. I get complains from struts that it has a type 
mismatch when it tries to set my attribute for the  field.

I have public ArrayList getSelection() and public void 
setSelection(ArrayList input) . It seems the problem is at setSelection.
Does anyone know how to make this work?  I'm a little confused by this 
and I'm sorry if it doesn't make sense in the first read. THanks

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



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

Question about (again)

2003-02-27 Thread Peng Tuck Kwok
I've been able to display a collection of beans using the  
tag in conjunction with with the  tag but I am 
stuck with a problem. I get complains from struts that it has a type 
mismatch when it tries to set my attribute for the  field.

I have public ArrayList getSelection() and public void 
setSelection(ArrayList input) . It seems the problem is at setSelection.
Does anyone know how to make this work?  I'm a little confused by this 
and I'm sorry if it doesn't make sense in the first read. THanks

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


Re: Help with optionsCollection error

2003-02-26 Thread Peng Tuck Kwok
Ok here goes :
The original method for the attribute recipients was :
public void setRecipients(Vector input)
That caused the errors of the type mismatch ,
So I tried changing it to take to array of strings, like this
	public void setRecipients(String [] one, String [] two)
It doesn't complain about anything, but it doesn't pass any values to it 
as I have tried putting in a few println statements in there.



Ian Hunter wrote:
I don't understand the question -- if your example is working, the setter
method is getting called and it's storing whatever got passed to it.  Can
you ask the question a different way?
- Original Message -----
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 12:25 AM
Subject: Re: Help with optionsCollection error


Another question Ian, since I changed it, what values would be passed
into the two inputs ? I tried doing a System.out.println to see what's
in there but apparently the output does not come out.
Ian Hunter wrote:

Lowly me?  Contribute to the FAQ?  hee hee.  Glad to help.

(Hey, who's in charge of the FAQ around here?)

- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 11:39 PM
Subject: Re: Help with optionsCollection error



Hi Ian, your tip worked like a charm and I substituted it with the
setRecipient(String key, String value) method. Hmm now I need to see
what exactly I put in there.
Ian ever thought of adding this as a faq in Struts ?

Peng Tuck Kwok wrote:


Will try that and post results. Thanks.

Ian Hunter wrote:



I think so -- whichever setter method within your ActionForm applies
to the
field named in your  tag has to be the ONLY setter method
named
whatever it's named.
That's contradictory to normal bean conventions where you would
normally


have

public void setValues(Vector values)
and
public void setValues(String key, String value)
for instance.  The introspection done by Struts can't tell the
difference so
you get an error thrown by BeanUtils.populate where it tries to call
setValues(String key, String value) with only one value.
There has been a fair amount of debate about this recently, but if you
have
overloaded setter methods, comment all but the one that suits the type
of


value you're really using, and see if it works.

I had to go from having
public void setIds(String ids[])
and
public void setIds(int i; String ids[])
to having

public void setIds(String ids[])
and
public void setId(int i; String ids[])
see the difference?  The "s" is gone in the case of the indexed
property.


See if that applies to your situation.

- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 10:56 PM
Subject: Re: Help with optionsCollection error




I'm currently implementing the recipients as a vector of beans and I
do


provide method setRecipients which takes in a vector and sets the
recipients vector to it. Is that the setter method you are referring
to ?
Thanks.


Ian Hunter wrote:



The ActionForm descendant.



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


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



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



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


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



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


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



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


Re: Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
Another question Ian, since I changed it, what values would be passed 
into the two inputs ? I tried doing a System.out.println to see what's 
in there but apparently the output does not come out.

Ian Hunter wrote:
Lowly me?  Contribute to the FAQ?  hee hee.  Glad to help.

(Hey, who's in charge of the FAQ around here?)

- Original Message -----
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 11:39 PM
Subject: Re: Help with optionsCollection error


Hi Ian, your tip worked like a charm and I substituted it with the
setRecipient(String key, String value) method. Hmm now I need to see
what exactly I put in there.
Ian ever thought of adding this as a faq in Struts ?

Peng Tuck Kwok wrote:

Will try that and post results. Thanks.

Ian Hunter wrote:


I think so -- whichever setter method within your ActionForm applies
to the
field named in your  tag has to be the ONLY setter method
named
whatever it's named.
That's contradictory to normal bean conventions where you would
normally

have

public void setValues(Vector values)
and
public void setValues(String key, String value)
for instance.  The introspection done by Struts can't tell the
difference so
you get an error thrown by BeanUtils.populate where it tries to call
setValues(String key, String value) with only one value.
There has been a fair amount of debate about this recently, but if you
have
overloaded setter methods, comment all but the one that suits the type
of

value you're really using, and see if it works.

I had to go from having
public void setIds(String ids[])
and
public void setIds(int i; String ids[])
to having

public void setIds(String ids[])
and
public void setId(int i; String ids[])
see the difference?  The "s" is gone in the case of the indexed
property.

See if that applies to your situation.

- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 10:56 PM
Subject: Re: Help with optionsCollection error



I'm currently implementing the recipients as a vector of beans and I
do

provide method setRecipients which takes in a vector and sets the
recipients vector to it. Is that the setter method you are referring
to ?
Thanks.


Ian Hunter wrote:


The ActionForm descendant.



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


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



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



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


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



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


Re: Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
Hi Ian, your tip worked like a charm and I substituted it with the 
setRecipient(String key, String value) method. Hmm now I need to see 
what exactly I put in there.

Ian ever thought of adding this as a faq in Struts ?

Peng Tuck Kwok wrote:
Will try that and post results. Thanks.

Ian Hunter wrote:

I think so -- whichever setter method within your ActionForm applies 
to the
field named in your  tag has to be the ONLY setter method 
named
whatever it's named.

That's contradictory to normal bean conventions where you would normally
have
public void setValues(Vector values)
and
public void setValues(String key, String value)
for instance.  The introspection done by Struts can't tell the 
difference so
you get an error thrown by BeanUtils.populate where it tries to call
setValues(String key, String value) with only one value.

There has been a fair amount of debate about this recently, but if you 
have
overloaded setter methods, comment all but the one that suits the type of
value you're really using, and see if it works.

I had to go from having
public void setIds(String ids[])
and
public void setIds(int i; String ids[])
to having

public void setIds(String ids[])
and
public void setId(int i; String ids[])
see the difference?  The "s" is gone in the case of the indexed property.

See if that applies to your situation.

- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 10:56 PM
Subject: Re: Help with optionsCollection error


I'm currently implementing the recipients as a vector of beans and I do
provide method setRecipients which takes in a vector and sets the
recipients vector to it. Is that the setter method you are referring 
to ?
Thanks.



Ian Hunter wrote:

The ActionForm descendant.



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


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



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



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


Re: Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
Will try that and post results. Thanks.

Ian Hunter wrote:
I think so -- whichever setter method within your ActionForm applies to the
field named in your  tag has to be the ONLY setter method named
whatever it's named.
That's contradictory to normal bean conventions where you would normally
have
public void setValues(Vector values)
and
public void setValues(String key, String value)
for instance.  The introspection done by Struts can't tell the difference so
you get an error thrown by BeanUtils.populate where it tries to call
setValues(String key, String value) with only one value.
There has been a fair amount of debate about this recently, but if you have
overloaded setter methods, comment all but the one that suits the type of
value you're really using, and see if it works.
I had to go from having
public void setIds(String ids[])
and
public void setIds(int i; String ids[])
to having

public void setIds(String ids[])
and
public void setId(int i; String ids[])
see the difference?  The "s" is gone in the case of the indexed property.

See if that applies to your situation.

- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 10:56 PM
Subject: Re: Help with optionsCollection error


I'm currently implementing the recipients as a vector of beans and I do
provide method setRecipients which takes in a vector and sets the
recipients vector to it. Is that the setter method you are referring to ?
Thanks.


Ian Hunter wrote:

The ActionForm descendant.



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


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



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


Re: Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
I'm currently implementing the recipients as a vector of beans and I do 
provide method setRecipients which takes in a vector and sets the 
recipients vector to it. Is that the setter method you are referring to ?
Thanks.



Ian Hunter wrote:
The ActionForm descendant.



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


Re: Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
You say :
My guess is the BeanUtils.populate error is because you wrote an indexed
setter method
Which bean would that be? The form bean or the collections of beans that 
 the property refers to ?

and overloaded the String[] or Collection setter method.
Don't do that.


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


Help with optionsCollection error

2003-02-25 Thread Peng Tuck Kwok
I've sucessfully managed to display a multiple options in 
but when I click on submit I get errors.
One condition is when I don't click on any of the options , this error
would be failed to obtain specified collection when ever I try to access
the bean attribute that contains the values. The bean attribute is a
vector FYI.
The second condition is when I click on one or more of the options and
click submit I get a beanutils.populate error, type mismatch.
 

   
The form name is compose and recipients is a vector.

Does anyone have a idea where I'm going wrong?

TIA



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


Re: handoff to ActionServlet question

2003-02-23 Thread Peng Tuck Kwok
Dan Allen wrote:
So I guess my question is, when a *.jsp file is requested, at what
point does the ActionServlet reliquish control to the view when it
realizes this is not a *.do and no Action is associated with it?
Hey Dan, doesn't the *.do bit get handled by the servlet mapping bit in 
web.xml ? Like here :


action
*.do








I know it definitely doesn't get as far as the RequestProcessor, but
I just can't seem to locate where it gives up.  Obviously after the
MessageResources object has been read in, but where after I cannot
discern.
Trust me when I say I have been down into the source code and I see
exactly how data is stored in the ServletContext and in the request
variable using the Globals keys.
Dan



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


Re: AW: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Thanks for the tip eddie. Much appreciated.

[EMAIL PROTECTED] wrote:

Peng Tuck,

Below is a working example. You need to populate the eventTypeAll in 
your
action class.

FOr JSP:


labelProperty="code"  />


For Action class:
request.setAttribute("eventTypeAll", new ArrayList("your 
array
list"));

Ed.

----- Original Message -
From: "Peng Tuck Kwok" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 5:13 PM
Subject: Re: AW: Populating a html select in struts.



Thanks Bernhard for replying, I do know I can do that but my question
was more along the lines of how to get  to work
properly. I can't seem to find good examples for this on the struts
website. Do you have or know of any ?

Hirschmann, Bernhard wrote:


You can pre-populate your form in an action, which you have to call


before


showing the JSP. You then forward to the JSP from your action.

Calling a action is done using "...yoururl.com/actionName.do" in the


browser


url.

Bernhard

-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Februar 2003 09:36
An: Struts Users Mailing List
Betreff: Populating a html select in struts.


How does one pre-populate a form field in struts which uses the 

multiple


select ? I've tried it but I don't see anything being filled out in 

the


select box, I've also created the necessary form beans for it to 

work.


Help with this would be nice, thanks.





-


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




-


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






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






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






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




Re: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Ok back to the action class and form beans to restructure some stuff. 
Wish me luck :) Nicolas and thanks.


Nicolas De Loof wrote:


Hmm...
I have this currently :

   String recipients [] ;
public String []  getRecipients() {
return this.recipients ;
   }
I am using the , which tells me the corresponding property
has to be a array of any supported data type, then if you use the
to render the options one has to use a
collection of beans ? Am I on the right track ?




Right,  can be use two ways :

- with a collection attribute: the collection must contain beans that have
two properties, declared by "property" and "labelproperty" tag attribute.
This property will be used to render the HTML option value and label.

- Without collection attribute. Depending if "property" and/or
"labelproperty" are set, tag will look for collection(s) in scope or a
formBean property that will contain values (and label) for HTML option to
render

see http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options

Nico.


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






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




Re: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Hmm...
I have this currently :
	
   	String recipients [] ;
	public String []  getRecipients() {
return this.recipients ;
	}
I am using the , which tells me the corresponding property 
has to be a array of any supported data type, then if you use the 
to render the options one has to use a 
collection of beans ? Am I on the right track ?


Nicolas De Loof wrote:
Having your formBean prepopulated in some scope (by a previous action),
let's say you use "foo" property whith "multiple" getters :

pulic String[] getFoo()
pulic String getFoo(int index)

You just need a  with  (or ) in your
JSP - NOT  or  that are HTML and struts will not use for
pre-selecting value.




Value1
Value2
Value3




Nico.




How does one pre-populate a form field in struts which uses the multiple
select ? I've tried it but I don't see anything being filled out in the
select box, I've also created the necessary form beans for it to work.
Help with this would be nice, thanks.


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




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






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




Re: AW: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Thanks Bernhard for replying, I do know I can do that but my question 
was more along the lines of how to get  to work 
properly. I can't seem to find good examples for this on the struts 
website. Do you have or know of any ?

Hirschmann, Bernhard wrote:
You can pre-populate your form in an action, which you have to call before
showing the JSP. You then forward to the JSP from your action.

Calling a action is done using "...yoururl.com/actionName.do" in the browser
url.

Bernhard

-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Februar 2003 09:36
An: Struts Users Mailing List
Betreff: Populating a html select in struts.


How does one pre-populate a form field in struts which uses the multiple 
select ? I've tried it but I don't see anything being filled out in the 
select box, I've also created the necessary form beans for it to work. 
Help with this would be nice, thanks.


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

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





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




Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
How does one pre-populate a form field in struts which uses the multiple 
select ? I've tried it but I don't see anything being filled out in the 
select box, I've also created the necessary form beans for it to work. 
Help with this would be nice, thanks.


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



Struts form question

2003-02-20 Thread Peng Tuck Kwok
I have a login page which has form called logonForm which will be 
validated, I need this form data to presist and the traditional way 
would be to put into the session. In the struts-config I set the scope 
of the form to session but that actually results in the form not being 
able to validate properly , regardless of whether the form on the page 
was filled out. With this I keep getting validation errors and the 
errors would snowball on the page. If I set the scope in the 
struts-config to request then things are ok. Can anyone help ?


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



Submitting more than one form through a request.

2003-02-20 Thread Peng Tuck Kwok
If I have say a logonform bean being passed around from page a to b
and b has another form in the page( which has not been initialized) is 
it possible to submit the logonform bean and the second form on the page 
to another actionform ?


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



[TEST: IGNORE]

2003-02-13 Thread Peng Tuck Kwok
Testing, pls ignore.


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




Re: Some questions about struts

2003-02-10 Thread Peng Tuck Kwok
Yes, I did notice that they used struts which was also the reason I 
poked around there in the first place hoping to learn a thing or two :) .

Craig R. McClanahan wrote:



The server.xml file is read by the org.apache.catalina.startup.Catalina
class - see the createStartDigester() method for where it sets up all the
processing rules.  This is invoked before any of the webapps are actually
enabled.  The web.xml file for a particular web application (along with
the default configuration file $CATALINA_HOME/conf/web.xml) is read in
the org.apache.catalina.startup.ContextConfig class -- see the
defaultConfig() and applicationConfig() methods.  The Digester rules are
set up in createWebDigester().  This happens at one of several times:
* At startup time, when a  element is found in web.xml
* At startup time, when a directory, WAR file, or XML file is
  found in the "webapps" directory
* While Tomcat is running, if a new WAR or directory is added
  to the "webapps" directory
* While Tomcat is running, if you use the Manager webapp's
  "install" or "deploy" commands.

The Tomcat admin webapp knows how to write back out to server.xml, but it
doesn't actually *read* that file.  Instead, it uses an API called Java
Management Extensions (JMX) to manage the configuration of all the
internal components of Tomcat itself.  In Tomcat 4.1, the JMX layer is
basically added on top of the existing Catalina architecture, so about the
only thing it does is manipulate the configuration in response to admin
webapp changes.  In Tomcat 5, JMX will be used much more aggressively --
not only for configuration management, but also for things like statistics
gathering.  It should be straightforward for JMX-enabled management tools
to easily configure and manage one or more Tomcat 5 installations.

If you look at the sources for the admin webapp, you will also note, of
course, that the developers were pretty smart -- they used Struts to build
this app :-).

Craig

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






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




Re: Some questions about struts

2003-02-10 Thread Peng Tuck Kwok
Craig R. McClanahan wrote:



Digester is pretty cool (if I do say so myself :-).  It's what Struts uses
to process struts-config.xml files, and what Tomcat uses to read web.xml
and server.xml files.

Yes it is very cool and nice to use :) . I've done some simple things 
with it based on a tutorial I followed from the site. One question 
though, I've been poking around the admin webapp source in tomcat, which 
file actually reads the server.xml? Or is the contents of server.xml 
already made available to the webapp?

I will check out the commons digester api in further detail.


The Javadocs are also available online:

  http://jakarta.apache.org/commons/digester/api/

In particular, read the "Package Description" which has a good overview of
how Digester can be used.

Finally, the COMMONS-USER mailing list is a good place for general
questions on Digester that aren't Struts related.

Craig

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






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




Re: Some questions about struts

2003-02-10 Thread Peng Tuck Kwok
Jacob Hookom wrote:

As a side note, look at Commons Digester in reading your XML file and
bringing it in as Objects so you can work with ActionForms and other
business logic (if that's what you want to do).



Yes I do intend to use the Commons Digester. Thanks Jacob.


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




Re: Problem with empty file upload field

2003-02-10 Thread Peng Tuck Kwok
Does it affect other browsers like ie ?
Joey Ebright wrote:

I found that my problem stemmed from a bug in Mozilla 0.99.  Once I 
upgraded my Mozilla browser to version 1.2.1 the problem went away.  You 
can find details on this bug here: 
http://bugzilla.mozilla.org/show_bug.cgi?id=132069

Thanks for all who offered feedback!!!

Joey Ebright wrote:

I too have the same problem - whenever the user does not supply a file 
to upload I get an exception.  I have tried the 1.1-b3 release of 
struts and the 1.6 release of the commons and recieve the same error 
from BeanUtils.populate - IllegalArgumentException...

Have you made any progress on this front?

-Joey



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






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






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




Re: Some questions about struts

2003-02-10 Thread Peng Tuck Kwok
Thanks for the prompt reply Jacob.
I do need the xml data to persist, one xml which contains a bunch of 
users who can log in & the other xml contains a list of numbers that 
belong to the bunch of users.
Since I need the application to read these xml files on startup, does 
that mean I need to create a class which extends ActionServlet and
populate the servlet context like this ? :
	 getServletContext().setAttribute(LOCALES_KEY, locales);






Jacob Hookom wrote:
You can have the ActionServlet determine where the source XML is coming
from.  Then, either forward to a JSP and use JSTL to handle the rendering,
or use a transformer and write directly to the OutputStream within the
ActionServlet, and return null instead of an ActionForward.

-Jacob

| -Original Message-
| From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 11, 2003 12:06 AM
| To: Struts Users Mailing List S
| Subject: Some questions about struts
| 
| I have a few questions I need to ask about struts. First of I've done
| some simple examples that allow my struts example to access the database
| and validate fields passed by an action form. All is good and well.
| 
| Now I want my application to read say two xml files and when a page is
| requested, the page would display the data from the xml.
| My question is when I pre-process the xml file on startup, how do I make
| the xml data available to struts on startup? Should I use a
| ActionServlet to do this ? Or am I barking up the wrong tree here?
| 
| 
| 
| 
| -
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]


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





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




Some questions about struts

2003-02-10 Thread Peng Tuck Kwok
I have a few questions I need to ask about struts. First of I've done 
some simple examples that allow my struts example to access the database 
and validate fields passed by an action form. All is good and well.

Now I want my application to read say two xml files and when a page is 
requested, the page would display the data from the xml.
My question is when I pre-process the xml file on startup, how do I make 
the xml data available to struts on startup? Should I use a 
ActionServlet to do this ? Or am I barking up the wrong tree here?




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



Re: Hi

2003-01-28 Thread Peng Tuck Kwok
Just curious, but wouldn't it be easier if the preference for the user 
was stored in a database ?

Uday wrote:
Hi,

I have a requirement like this.
When the user enters into some jsp pae, he can selecte some checkboxes.
The data related to these checkboxes i have to store in a file. So that next
time when he visited (logoff and logon) this page, he can see the checkboxes
what he previously selected.
I want to write this information to a text file, so that it can be read for
later.




Have a nice day

Regards,
Uday

-Original Message-
From: Míguel Ángel Mulero Martínez
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 1:17 PM
To: Struts Users Mailing List
Subject: RE: Hi


In what file? If I'm not wrong, you must read the file in an Action, and
then process it (if needed) and put the result in the request for the JSP.

Regards,
Miguel

-Mensaje original-
De: Uday [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 28 de enero de 2003 8:35
Para: [EMAIL PROTECTED]
Asunto: Hi

Hi,


I want to read and write from/into the file using strtus (struts-taglibs).
Can you tell me how to do it.

It is very urgent. Tell me is there any code available on the net.


Have a nice day

Regards,
Uday

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




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






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




Re: Multiple rows from a result set.

2003-01-22 Thread Peng Tuck Kwok
Thanks ed, was thinking in that direction, but was a bit uncertain about 
it.

Ed Robbins wrote:
Create a bean representing each row returned, put them in a collection
in the form bean and then use the  tag to populate the
page.


Ed
On Wed, 2003-01-22 at 20:56, Peng Tuck Kwok wrote:


How do I present multiple rows from a sql query in struts ? Let's say I 
have a list of customers from that table and I want to display it on the 
page. Does the action form have to return a collection of beans for 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]>




Multiple rows from a result set.

2003-01-22 Thread Peng Tuck Kwok
How do I present multiple rows from a sql query in struts ? Let's say I 
have a list of customers from that table and I want to display it on the 
page. Does the action form have to return a collection of beans for this ?


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



Re: [OT] Eclipse IDE

2003-01-20 Thread Peng Tuck Kwok
David Graham wrote:

You're not likely to get many unbiased opinions on this topic.  I will 
tell you that my brief experience with Netbeans has been terrible (even 
on latest versions).  I'm a big fan of Eclipse even though it doesn't 
have the JSP editor yet.  Netbeans also has a gui builder but I don't 
know how good the code it generates is.
The gui builder is passable, although I wouldn't recommend building 
something large with it.


I don't recommend that your report mandate one IDE over another.  
Everyone on the project should be allowed to use what they like and are 
most productive in.  I just found NetBeans very difficult to work with.

David
That's very true, one should evaluate the respective ide's and determine 
if it is suitable to do the job.









From: "Daniel H. F. e Silva" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [OT] Eclipse IDE
Date: Mon, 20 Jan 2003 17:35:08 -0800 (PST)

Hi all,
 I know that it is very possible that this subject was already 
discussed here, but i couldn't
search on archives (why is this resource disabled?).
 I'm beginning to design a software development process specification 
as a job task. It will
include, for instance, a list of all tools, software, frameworks, etc, 
necessary to develop
Web-based solutions in J2EE platform.
 And after doing a lot of research, i've found that open-source world 
has two leading IDEs:
Netbeans and Eclipse.
 I'd like to hear about experiences with both of them. In my 
preliminary tests i guess it was
difficult to work with Eclipse with focus on Web development. For 
instance, it doesn't have a cool
JSP editor like Netbeans. I've tried an Eclipse plugin, but its 
features are inferior than
Netbeans offered features.
 But i liked Eclipse's plugins feature. And it has a better aproach to 
manage code quality than
Netbeans.
 So, opinions?

Best regards,
 Daniel.

PS: Sorry for possible language mistakes. English is not my native 
language.

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

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






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




Re: [OT] mail List

2003-01-20 Thread Peng Tuck Kwok
David Bolsover wrote:

Hmm..  Problem...

Seems like ezmlm is unix only - I don't have unix - W2K server only.


Yes, it seems that they rely heavily on qmail.


Would be nice to lave java based list manager - is there one?


Yes that would be very nice, The JAMES project under jakarta has some 
basic list functionality and it does run in java. Check it out there.

db



-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: 20 January 2003 10:05
To: Struts Users Mailing List
Subject: Re: [OT] mail List


I think it is the ezmlm program. That's what is says on the welcome 
message.

David Bolsover wrote:

Hi

Sorry about off topic - but this seems like a good place to ask.

Does anyone know what software is used to manage this mail list?

Is it open source? - can I get a copy? etc..

Thx

David Bolsover

--
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: [OT] mail List

2003-01-20 Thread Peng Tuck Kwok
I think it is the ezmlm program. That's what is says on the welcome 
message.

David Bolsover wrote:
Hi

Sorry about off topic - but this seems like a good place to ask.

Does anyone know what software is used to manage this mail list?

Is it open source? - can I get a copy? etc..

Thx

David Bolsover

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






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




Re: Size of struts beta 1.1

2003-01-07 Thread Peng Tuck Kwok
No problem, just that the previous version was smaller :) .


Craig R. McClanahan wrote:


On Wed, 8 Jan 2003, Peng Tuck Kwok wrote:



Date: Wed, 08 Jan 2003 11:27:08 +0800
From: Peng Tuck Kwok <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Size of struts beta 1.1

Is the size of the beta correct at this location ?

http://www.apache.org/dist/jakarta/struts/binaries/
.



Roughly 17mb is right (a lot of docco has been added, including some
images to walk you through the use of some IDEs).  What's the problem?

Craig


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




Size of struts beta 1.1

2003-01-07 Thread Peng Tuck Kwok
Is the size of the beta correct at this location ?

http://www.apache.org/dist/jakarta/struts/binaries/
.


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




Re: Chart products

2003-01-06 Thread Peng Tuck Kwok
I'd assume you would want a system that could dynamically generate 
charts for a given input through the web, so maybe you would want to 
have a look at this one,

http://cewolf.sourceforge.net/

Comes with taglibs and builds upon another library to generate the charts.

Cathy King wrote:
cts to monitor the system? Could you
recommend some chart products to me? I really appreciated your help and
suggestions.

Thank you very much.
Regards

Cathy


__ 
Post your free ad now! http://personals.yahoo.ca

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





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




Re: Trying to get struts working.

2002-12-20 Thread Peng Tuck Kwok
Can you elaborate a bit more on that ? Much appreciated.

[EMAIL PROTECTED] wrote:

Make sure  the bean  getter / setter property corresponds to teh control
name on your jsp  page.
Hope this helps
Sangeetha Nagarjunan
IT Solutions India Pvt. Ltd.
Bangalore
080 - 6655122 X 2119



   
Peng Tuck Kwok 

al.net>  cc:   
 Subject: Trying to get struts working.
12/20/02 03:39 
PM 
Please respond 
to "Struts 
Users Mailing  
List"  
   
   




I'm trying to get a test page up with the struts-blank.war going.
So far I have a html page and I'm trying to validate it using the struts
validator. So far all I'm getting is  :

org.apache.jasper.JasperException: No getter method for property action
of bean org.apache.struts.taglib.html.BEAN

I've tried following the example in the struts-validator.war but to no
avail. Does anyone have any idea ?


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




Trying to get struts working.

2002-12-20 Thread Peng Tuck Kwok
I'm trying to get a test page up with the struts-blank.war going.
So far I have a html page and I'm trying to validate it using the struts 
validator. So far all I'm getting is  :

org.apache.jasper.JasperException: No getter method for property action 
of bean org.apache.struts.taglib.html.BEAN

I've tried following the example in the struts-validator.war but to no 
avail. Does anyone have any idea ?


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



ValidatorForm

2002-12-19 Thread Peng Tuck Kwok
I'm having trouble with my ValidatorForm bean. I'm getting this message 
'No getter method for property action of 
beanorg.apache.struts.taglib.html.BEAN '
Is my ValidatorForm bean being written properly ? I'd appreciate some 
comments. Here's my code below:

package com.makmal.struts.forms;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.LabelValueBean;
import org.apache.struts.validator.ValidatorForm;


public class LoginForm extends ValidatorForm implements 
java.io.Serializable {


private String loginName;
private String passwordValue;

public LoginForm() {
}

public String getLoginName() {
return loginName ;
}
public void setLoginName(String login_value) {
loginName = login_value ;
}

public String getPasswordValue() {
return passwordValue ;
}
public void setPasswordValue(String password_value) {
passwordValue = password_value ;
}

public void reset(ActionMapping mapping, HttpServletRequest 
request)  {
loginName = null ;
passwordValue = null ;
}



}



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



Error with bean

2002-12-19 Thread Peng Tuck Kwok
I'm trying to get my first form working with the validator and I seem to 
have a problem creating my LoginForm bean, it says that it can 
instantiate the LoginForm bean, is there a problem in the bean ?
/*
 * LoginForm.java
 *
 * Created on December 19, 2002, 11:42 AM
 */

package com.makmal.struts.forms;

import java.beans.*;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.LabelValueBean;
import org.apache.struts.validator.ValidatorForm;

/**
 *
 * @author  Administrator
 */

public class LoginForm extends ValidatorForm implements java.io.Serializable {

//private static final String PROP_SAMPLE_PROPERTY = "SampleProperty";

//private String sampleProperty;

//private PropertyChangeSupport propertySupport;

private String loginName; 
private String passwordValue;

/** Creates new LoginForm */
public LoginForm() {
//propertySupport = new PropertyChangeSupport( this );
}

public String getLoginName() { 
return loginName ;
}
public void setLoginName(String login_value) {
loginName = login_value ;
}

public String getPasswordValue() {
return passwordValue ;
}
public void setPasswordValue(String password_value) {
passwordValue = password_value ;
}

public void reset(ActionMapping mapping, HttpServletRequest request) {
loginName = null ;
passwordValue = null ;
}

/**public String getSampleProperty() {
return sampleProperty;
}

public void setSampleProperty(String value) {
String oldValue = sampleProperty;
sampleProperty = value;
propertySupport.firePropertyChange(PROP_SAMPLE_PROPERTY, oldValue, 
sampleProperty);
}


public void addPropertyChangeListener(PropertyChangeListener listener) {
propertySupport.addPropertyChangeListener(listener);
}

public void removePropertyChangeListener(PropertyChangeListener listener) {
propertySupport.removePropertyChangeListener(listener);
}*/

}


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


Re: Marcomedia Dreamweaver Ultradev4 - Struts - Tiles

2002-12-18 Thread Peng Tuck Kwok
Could you give more info on how is that you intend to use Dreamweaver 
and struts?
I understand that Dreamweaver is mainly a html design tool. Perhaps what 
you are looking for is something more like a java ide that works well 
with struts ?

Heligon Sandra wrote:
I really find this remark not constructive. I do not seek somebody who hates
this tool but on the contrary, somebody which uses it with Struts(voir
Tiles) and with which I can have exchanges. 
Marcomedia and Struts are not incompatible. 

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 10:25
To: 'Struts Users Mailing List'
Subject: RE: Marcomedia Dreamweaver Ultradev4 - Struts - Tiles



	I will wish to know if somebody uses Marcomedia Dreamweaver
Ultradev4 to develop JSP by using  Struts tags + 	
	Tiles components. 
	I use Tomcat4.0.1 with JSP1.2 and Servlet2.3 and I can 
not define a
site. 
	Thanks in advance
	Sandra


What about asking to Macromedia support?
After all, proprietary software is supposed to have 
a SO BETTER support!

Ah Ah !!!

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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





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