Re: Action takes long time to complete

2002-11-13 Thread Andreas Langmann
if the tasks result is not important for fulfilling the request
make a separate process, so the action method can finish before.

Andreas

David Bolsover wrote:
> 
> Hi all
> 
> I have an action that takes a very long time to complete.
> 
> Advice please - how do I forward to a new page before the tasks the action has
> started have completed?
> 
> db
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
Dipl. Ing. (BA) Andreas Langmann
Software Developer

ISB AG 
Karlstr. 52-54   
76133 Karlsruhe

Telefon: +49 (0)721/82800-0
Telefax: +49 (0)721/82800-82

Email: [EMAIL PROTECTED]
Internet: http://www.isb-ag.de

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




Manage Results obtained from ResultSets

2002-11-13 Thread SANZ SANFRUCTUOSO, Manuel
Has anybody used the ResultSupport class?

I'd like to call a JavaBean to give me back a JSTL Result objet to be able
to process it as if I would have had it from a  action. I don`t
know how to get this object in my JSP and manage it.

There are some articles that say something about it, but none of them give
examples.

Can anybody help me?

Thanks.

Manuel Sanz.

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




Re: user manually changing local

2002-11-13 Thread Marcus Biel
that's just the way I did it, and it works nicely! :-)


[EMAIL PROTECTED] schrieb:
> 
> Marcus,
> 
> What datatype does getLocal() return?
> 
> I would likely write:
> 
> SetLocalForm myForm = (SetLocalForm)form
> 
> first and then:
> 
> String localString = myForm.getLocal();
> 
> or:
> 
> String localString = myForm.getLocal().toString();
> 
> It may not execute and differently, but it keeps the cast separate and
> clear.
> 
> HTH
> 
> Brian

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




Re: Error Page and Struts+Tiles

2002-11-13 Thread Gemes Tibor
2002. november 14. 03:12 dátummal atta ur-rehman ezt írtad:
> Dear all,
>
> It seems that "errorPage" page directive doesn't work if we have struts and
> tiles. Is it so? If yes, how do a get equivalent functionality. I always
> get an InvlaidStateException that says that server can't take me to error
> page 'cas some data has already been sent to client.

I think that you should use different errorpage depending on you have error on 
the tiles layout or a tile you want to insert into the layout. 

If an error occures in the layout itself the error page has to generate the 
whole  story however an error occuring in a tile should produce 
an error message in that very place, and let the layout to collect the other 
parts of the document.

hth,

Tib

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




RE: about html:error ( error handling )

2002-11-13 Thread Alex Almero
could you post a sample code tnx

aalmero

-Original Message-
From: wolfgang [mailto:wolfgang127jp@;ybb.ne.jp]
Sent: Wednesday, November 13, 2002 3:01 AM
To: Struts Users Mailing List
Subject: Re: about html:error ( error handling )


Hi there,

Finally, I figured it out.
Actually the way is just not to use struts tag libraries. ;(
Get the ActionErrors and search the key.
if there's an object corresponding to the key, write FF
if no, write FF

thank you.
wolfgang

-- 
wolfgang <[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Form validation

2002-11-13 Thread Alireza Fattahi
See the serverside.com

-Original Message-
From: Jordan Thomas [mailto:jordan@;vector7.com.au] 
Sent: Wednesday, November 13, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: Form validation

Hi,
 
I am wanting to do a step by step, wizard style interface. Does anyone
know of a good tutorial for this?
 
thanks
 
Jordan
 

Jordan Thomas
Fraunhofer-Institut fuer Produktionstechnik und Automatisierung
(FhG-IPA)

Nobelstrasse 12 
D-70569 Stuttgart

Tel.: +49 (0) 711-970-1187
Fax:  +49 (0) 711-970-97-1187
Handi:+49 (0) 150-554-76776

E-mail:   [EMAIL PROTECTED]
Web:    http://www.ipa.fhg.de
 

 

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




RE: struts concerns

2002-11-13 Thread Hari
One of the advantages is the form tag of struts is, it can contain locale
specific details, which is not present in standard HTML form tag

-Original Message-
From: Shalu Goel [mailto:shalu.goel@;mind-infotech.com]
Sent: Thursday, November 14, 2002 12:16 PM
To: Struts Users Mailing List
Subject: Re: struts concerns

Thanks Deepak for the imterest in my post.
Also if somebody could throw some light on my first concern i.e.

What is the advantage of using struts taglib to declare  Form and other
presentaion related tags over std. Html??

Thanks again...
shalu
- Original Message -
From: "Saini, Deepank" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 11:17 AM
Subject: RE: struts concerns


>
>
> second issue:
> 1)take a look at DispatchAction and LookupDispatchAction for a solution to
> this problem
> 2) if u have more than one form in your jsp, u could possibly associate
each
> form with a different action, i ahve not reied this but should be possible
>
> -Original Message-
> From: Shalu Goel [mailto:shalu.goel@;mind-infotech.com]
> Sent: Thursday, November 14, 2002 11:25 AM
> To: Struts Users Mailing List
> Subject: struts concerns
>
>
> Hello all,
>
> I am a new struts user...and exploring ... whether I can construct my web
> appliction around struts framework instead of using traditional JSP (logic
> and presentation combined) way of development??
>
> My first issue is :
>



>
> My 2nd issue is :
>
> Can we have multiple actions for the same jsp page in struts depending
upon
> what button the user has pressed??
>
> Then how do we define path and type in action mpping in struts-config and
> the jsp page itself??
>
> My 3rd issue is :
>
> Can we have HTML frameset/fram tag in struts?? where in the user response
to
> a hyperlink in one frame is represented in the other one?? How is it
useful
> to use thus provided struts taglib to define such html elements over plain
> html???
>
> Please throw some light???
>
> Thanks
>
> shalu
>
>
>
>
>
>_
>
>
>
> 
> This message contains information that may be privileged or confidential
and
> is the property of the Cap Gemini Ernst & Young Group. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorised to read, print, retain, copy,
disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
copies
> of this message.
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: email validator

2002-11-13 Thread Alireza Fattahi
You should write your own validation for email.

-Original Message-
From: Ricardo de Souza Moura [mailto:ricsouzamoura@;hotmail.com] 
Sent: Wednesday, November 13, 2002 4:31 PM
To: [EMAIL PROTECTED]
Subject: email validator

I am with a problem to validate email in StrutsValidator.
I perceived that emails with a character "-" are invalidate.
ex:  ricardo-rj.hotmail.com.br

If I try validate a field with this e-mail, it is invalidate...

How can I correct this error ?

Thanks !!

_
MSN Messenger: converse com os seus amigos online. 
http://messenger.msn.com.br


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: struts concerns

2002-11-13 Thread Shalu Goel
Thanks Deepak for the imterest in my post.
Also if somebody could throw some light on my first concern i.e.

What is the advantage of using struts taglib to declare  Form and other
presentaion related tags over std. Html??

Thanks again...
shalu
- Original Message -
From: "Saini, Deepank" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 11:17 AM
Subject: RE: struts concerns


>
>
> second issue:
> 1)take a look at DispatchAction and LookupDispatchAction for a solution to
> this problem
> 2) if u have more than one form in your jsp, u could possibly associate
each
> form with a different action, i ahve not reied this but should be possible
>
> -Original Message-
> From: Shalu Goel [mailto:shalu.goel@;mind-infotech.com]
> Sent: Thursday, November 14, 2002 11:25 AM
> To: Struts Users Mailing List
> Subject: struts concerns
>
>
> Hello all,
>
> I am a new struts user...and exploring ... whether I can construct my web
> appliction around struts framework instead of using traditional JSP (logic
> and presentation combined) way of development??
>
> My first issue is :
>



>
> My 2nd issue is :
>
> Can we have multiple actions for the same jsp page in struts depending
upon
> what button the user has pressed??
>
> Then how do we define path and type in action mpping in struts-config and
> the jsp page itself??
>
> My 3rd issue is :
>
> Can we have HTML frameset/fram tag in struts?? where in the user response
to
> a hyperlink in one frame is represented in the other one?? How is it
useful
> to use thus provided struts taglib to define such html elements over plain
> html???
>
> Please throw some light???
>
> Thanks
>
> shalu
>
>
>
>
>
>_
>
>
>
> 
> This message contains information that may be privileged or confidential
and
> is the property of the Cap Gemini Ernst & Young Group. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorised to read, print, retain, copy,
disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
copies
> of this message.
>


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




Re: struts concerns

2002-11-13 Thread C. Struts
there are three important reasons to move to struts: M, V & C -- read up on Model 2 at 
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html


  - Original Message - 
  From: Shalu Goel 
  To: Struts Users Mailing List 
  Sent: Thursday, November 14, 2002 12:54 AM
  Subject: struts concerns


  Hello all,

  I am a new struts user.and exploring . whether I can construct my web appliction 
around struts framework instead of using traditional JSP (logic and presentation 
combined) way of development??

  My first issue is :

  What is the advantage of using struts taglib to declare  Form and other presentaion 
related tags over std. Html?? 

  My 2nd issue is :

  Can we have multiple actions for the same jsp page in struts depending upon what 
button the user has pressed??

  Then how do we define path and type in action mpping in struts-config and the jsp 
page itself??

  My 3rd issue is :

  Can we have HTML frameset/fram tag in struts?? where in the user response to a 
hyperlink in one frame is represented in the other one?? How is it useful to use thus 
provided struts taglib to define such html elements over plain html???

  Please throw some light???

  Thanks 

  shalu





--



--


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


Re: test mail - please ignore

2002-11-13 Thread C. Struts
ha!

- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 12:45 AM
Subject: RE: test mail - please ignore


>
> I had a friend that used to for Ernst & Young.  They fired him because he
> read, printed, retained, copied, disseminated, and worsedistributed,
an
> email that was sent to him, but wasn't for him (or any part thereof).
>
>
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen
or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
> > -Original Message-
> > From: Andrew Hill [mailto:andrew.david.hill@;gridnode.com]
> > Sent: Thursday, November 14, 2002 12:43 AM
> > To: Struts Users Mailing List
> > Subject: RE: test mail - please ignore
> >
> >
> > 
> > If you are not the intended recipient, you are not authorised to read,
> > print, retain, copy, disseminate, distribute, or use this message or any
> > part thereof
> > 
> >
> > Uhhh does that include the "to" field and the legal discalaimer as well?
> > Oops. Sorry. Plese dont sue me.
> > rofl!
> >
> >
> >
> > -Original Message-
> > From: Saini, Deepank [mailto:deepank.saini@;cgey.com]
> > Sent: Thursday, November 14, 2002 13:33
> > To: '[EMAIL PROTECTED]'
> > Subject: test mail - please ignore
> >
> >
> >
> > 
> > This message contains information that may be privileged or
> > confidential and
> > is the property of the Cap Gemini Ernst & Young Group. It is intended
only
> > for the person to whom it is addressed. If you are not the intended
> > recipient, you are not authorised to read, print, retain, copy,
> > disseminate,
> > distribute, or use this message or any part thereof. If you receive this
> > message in error, please notify the sender immediately and delete
> > all copies
> > of this message.
> >
> > --
> > 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: struts concerns

2002-11-13 Thread Saini, Deepank
 
 
second issue:
1)take a look at DispatchAction and LookupDispatchAction for a solution to
this problem
2) if u have more than one form in your jsp, u could possibly associate each
form with a different action, i ahve not reied this but should be possible

-Original Message-
From: Shalu Goel [mailto:shalu.goel@;mind-infotech.com]
Sent: Thursday, November 14, 2002 11:25 AM
To: Struts Users Mailing List
Subject: struts concerns


Hello all,

I am a new struts user...and exploring ... whether I can construct my web
appliction around struts framework instead of using traditional JSP (logic
and presentation combined) way of development??

My first issue is :

What is the advantage of using struts taglib to declare  Form and other
presentaion related tags over std. Html?? 

My 2nd issue is :

Can we have multiple actions for the same jsp page in struts depending upon
what button the user has pressed??

Then how do we define path and type in action mpping in struts-config and
the jsp page itself??

My 3rd issue is :

Can we have HTML frameset/fram tag in struts?? where in the user response to
a hyperlink in one frame is represented in the other one?? How is it useful
to use thus provided struts taglib to define such html elements over plain
html???

Please throw some light???

Thanks 

shalu

 



   _  




This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.



RE: test mail - please ignore

2002-11-13 Thread James Mitchell

I had a friend that used to for Ernst & Young.  They fired him because he
read, printed, retained, copied, disseminated, and worsedistributed, an
email that was sent to him, but wasn't for him (or any part thereof).



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

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-
> From: Andrew Hill [mailto:andrew.david.hill@;gridnode.com]
> Sent: Thursday, November 14, 2002 12:43 AM
> To: Struts Users Mailing List
> Subject: RE: test mail - please ignore
>
>
> 
> If you are not the intended recipient, you are not authorised to read,
> print, retain, copy, disseminate, distribute, or use this message or any
> part thereof
> 
>
> Uhhh does that include the "to" field and the legal discalaimer as well?
> Oops. Sorry. Plese dont sue me.
> rofl!
>
>
>
> -Original Message-
> From: Saini, Deepank [mailto:deepank.saini@;cgey.com]
> Sent: Thursday, November 14, 2002 13:33
> To: '[EMAIL PROTECTED]'
> Subject: test mail - please ignore
>
>
>
> 
> This message contains information that may be privileged or
> confidential and
> is the property of the Cap Gemini Ernst & Young Group. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorised to read, print, retain, copy,
> disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete
> all copies
> of this message.
>
> --
> 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: 




struts concerns

2002-11-13 Thread Shalu Goel




Hello all,
I am a new struts user…and exploring … whether I can  
construct my web appliction around struts framework instead of using traditional 
JSP (logic and presentation combined) way of development??
My first issue is :
What is the advantage of using struts taglib to declare  Form and other presentaion related tags 
over std. Html?? 
My 2nd issue is :
Can we have multiple actions for the same jsp page in struts 
depending upon what button the user has pressed??
Then how do we define path and type in action mpping in 
struts-config and the jsp page itself??
My 3rd issue is :
Can we have HTML frameset/fram tag in struts?? where in the 
user response to a hyperlink in one frame is represented in the other one?? How 
is it useful to use thus provided struts taglib to define such html elements 
over plain html???
Please throw some light???
Thanks 
shalu
 



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


RE: test mail - please ignore

2002-11-13 Thread Andrew Hill

If you are not the intended recipient, you are not authorised to read,
print, retain, copy, disseminate, distribute, or use this message or any
part thereof


Uhhh does that include the "to" field and the legal discalaimer as well?
Oops. Sorry. Plese dont sue me.
rofl!



-Original Message-
From: Saini, Deepank [mailto:deepank.saini@;cgey.com]
Sent: Thursday, November 14, 2002 13:33
To: '[EMAIL PROTECTED]'
Subject: test mail - please ignore




This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Check log-in status

2002-11-13 Thread Andrew Hill
Best practice is to make used of the Container Managed Authentication
provided by your servlet container.

-Original Message-
From: Mohan Radhakrishnan [mailto:MohanR@;hclcomnet.co.in]
Sent: Thursday, November 14, 2002 13:23
To: 'Struts Users Mailing List'
Subject: Check log-in status


Hi,

Do you usually check if the user is logged-in in every action ?

I can think of two ways to do this

 1. Check the status in every action
 2. Block the /context/xxx.action where 'xxx' is anything but 'login'

 Am I right ?

Thanks,
Mohan

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




test mail - please ignore

2002-11-13 Thread Saini, Deepank


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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




Check log-in status

2002-11-13 Thread Mohan Radhakrishnan
Hi,

Do you usually check if the user is logged-in in every action ? 

I can think of two ways to do this

 1. Check the status in every action
 2. Block the /context/xxx.action where 'xxx' is anything but 'login'

 Am I right ?

Thanks,
Mohan

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




Re: Upgrading to STRUTS 1.1

2002-11-13 Thread Rob Leland
Savantraj, Chennamakal Subramanian wrote:


Hi,
I had written a small sample DB application with STRUTS1.0.
But when I tried to just copy the 1.1 STRUTS.jar and run the application,
I got the error servlet not found.
What should I do to make my application run?
Is there any place I can look for resources for upgrade?


Please recompile your program against the 1.1 jar file
and all the associated commons-*.jars included in it.
In most cases it should just recompile and run.
Also someone published a 'case study' of converting
over from Struts 1.0 -> 1.1 so search the mailing archive
for the word 'case study'.

-Rob


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




Upgrading to STRUTS 1.1

2002-11-13 Thread Savantraj, Chennamakal Subramanian
Hi,
I had written a small sample DB application with STRUTS1.0.
But when I tried to just copy the 1.1 STRUTS.jar and run the application,
I got the error servlet not found.
What should I do to make my application run? 
Is there any place I can look for resources for upgrade?

Rgds

---
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway. 
---


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




[ANNOUNCE] Tiles and Validator Support in ObjectAssembler 2.5

2002-11-13 Thread Bill Willis
ObjectAssembler 2.5 Pro is now available:

http://www.objectventure.com/objectassembler.html

New Struts features in this release:

 - Full support for Tiles definitions
 - Full support for Validator 1.0 configurations
 - Jump from any element in our visual editor to its associated XML
 - Two-way development. Changes made to XML are immediately reflected in
the visual editor and vice versa
 - Two additional component types: Struts Exception and Validator
(allows the implementation of Validator rules). For each of these
components that are created, their use is automated in the Struts,
Tiles, and Validator configuration editor
 - Updated all Struts support to the latest 1.1 builds.

ObjectAssembler doesn't just help you generate configuration files. It
is a component-based Struts development environment that assists you in
building both Struts components and configuration files. It also
automates the process of packaging them in a WAR and generating the WAR
itself.

ObjectAssembler is currently supported in Jbuilder, Netbeans, Sun ONE
Studio, and as a standalone IDE. We are working on the next supported
IDE (the most popular requests being IDEA and Eclipse).

I invite you to take ObjectAssembler for a spin. The User Manual, which
is provided with the installation, explains how to make use of
ObjectAssembler's Struts support. We also have some simple Struts
Viewlets available here if you aren't quite up to downloading yet:
http://www.objectventure.com/demos.html. If you have any
questions/problems/feedback, please contact me directly or join me here:
http://support.objectventure.net.

Thanks to all of you who have already done so and provided valuable
feedback!

Best Regards,
Bill Willis
ObjectVenture Inc.



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




Re: An example of dynabean !

2002-11-13 Thread Affan Qureshi
I want to build dynamic HTML forms whose fields are dependent on the data
from the Model. Is there a way I can specify the Dynabean properties at
runtime in action/request processor or somewhere?

I used to do this by using a naming convention on control names (e.g fld_<%=
propertyName%>) but there is no Struts here. I mean I can't benefit from the
ActionForm framework that Struts provides. Has anybody accomplished this
before using Struts?

Thanks.
Affan Q.
- Original Message -
From: "Huynh Ngoc Huy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 7:38 AM
Subject: An example of dynabean !


>   Dear group,
>   After extract the zip file, you must copy all libs
> of struts-1.1b2 (struts.jar, commons-*.jar) into the
> lib directory of the example.
>   Regard,
>   Huy



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




An example of dynabean !

2002-11-13 Thread Huynh Ngoc Huy
  Dear group,
  After extract the zip file, you must copy all libs
of struts-1.1b2 (struts.jar, commons-*.jar) into the
lib directory of the example.
  Regard,
  Huy


__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com


dynabean-example.zip
Description: dynabean-example.zip
--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Why is this code (drawing a box) extremely slow with netscape-4.79?

2002-11-13 Thread Andrew Hill
This is because Netscape is crap.
Without butchering your code and making your IE & Mozilla users suffer for
the sake of a small bunch of Netscrap lusers who dont deserve such
consideration theres not much you can do.

-Original Message-
From: Zsolt Koppany [mailto:zkoppany@;web.de]
Sent: Thursday, November 14, 2002 05:54
To: [EMAIL PROTECTED]
Subject: Why is this code (drawing a box) extremely slow with
netscape-4.79?


Hi,

the code below draws a box around a table. It works fine with IE, Mozilla
and
Netscape-4.79. However the code is extremely slow with netscape-4.79. Do you
know why and how can I fix it?

Zsolt
















 <%=request.getAttribute("box.footer")%>










--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




[Struts Tip] #14 Use optional forwarding to extend Actions

2002-11-13 Thread Ted Husted
Many times you will find that two Actions are very similar but 
need one small behavior to change. One good way to handle this is 
to subclass one Action from the other and change the behavior that 
way. Though, in the case of an Action, the behavior may buried in 
the perform (or execute) method. It may also not really seem worth 
a hotspot method of its own.

[more ... ]





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




Error Page and Struts+Tiles

2002-11-13 Thread atta ur-rehman
Dear all,

It seems that "errorPage" page directive doesn't work if we have struts and tiles. Is 
it so? If yes, how do a get equivalent functionality. I always get an 
InvlaidStateException that says that server can't take me to error page 'cas some data 
has already been sent to client.

TIA,

ATTA


Unicode in struts tag

2002-11-13 Thread Huynh Ngoc Huy
  I'm using struts version 1.1b2. The followings are
my snippet codes:

*  struts-config.xml *
  ...
  

  ...
  

  
  ...

*  anAction.java *
  ...
  String s = ;
  PropertyUtils.setSimpleProperty(form, "msg", s);
  ...
  return mapping.findForward("target");

*  index.jsp *
  <%@ taglib uri="/WEB-INF/struts-html.tld" 
  prefix="html" %>

go

*  result.jsp *
  <%@ taglib uri="/WEB-INF/struts-html.tld" 
  prefix="html" %>

  

  

*

  In the result.jsp, the textarea cannot display the
unicode-string correctly.
  Any help is appreciated !
  Thanks in advance,
  Huy


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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




Re: [OT] Where can I find a Struts / J2EE Jobs?

2002-11-13 Thread Peter A. J. Pilgrim
Haseltine, Celeste wrote:

Khalid, 

I am assuming by across the Atlantic you are referring to the United States.


All

Here in London, England it is really slow as well.
The needle is favours the employers right now rather than a typical
candidate. Unfortunately employers want 10 different criteria before
they call you up for interview plus another magic ability or so.
There aren't many people I think that going to fulfil an over-stringent
list of requirements.


The job market/outlook in the US for high tech/software/hardware is still
pretty poor.  There are some pockets where jobs can be found in the US, but
overall, our unemployment rate nationally is still sitting just under 7%,
with some harder hit local areas, such as Dallas, TX, sitting closer to 8%.
That doesn't sound high until you take into consideration before the high
tech job fallout in 2000, our unemployment rate was below 3%.



In England in the 1980's we reached 3 million unemployed, which is about 10%
from a population of 62 million with 30 million adults of employable age
working. The unemployment figure I think is much lower today, around 5%

I used to work for investment bank also in the city, and as you aware
a lot of the people who used to work for big banks are not or will not
claim any social security benefits. So the true figures are probably
higher especially in London.


Also, unless you are currently a green card holder or US citizen, you would
need to find an employer to sponsor you for an H1-B visa, which is the US
equivalent of a work permit.  It's not something you can obtain yourself,
you must have an employer who has agreed to hire you apply for you.  Right
now, few US employers are sponsoring H1-B visa applicants, due to both the
higher unemployment rate, and the legal requirements an employer is required
to comply with to demonstrate that no US citizen was qualified/available for
the position.  And that is not taking into account the heightened
sensitivity many companies have to bringing non-US citizens into the US
after the events of Sept 11, 2001. 

Ditto over here in this country. Except a lot of companies are doing
something nasty. There are relocating call centres to India, or bringest
India contractor over to England. I am sure people will have their
own view on this policy of saving exorbitant monies, but it remains
to seen if the number of professional developers is going down
in the long town. If the trend is the farm out software development
to third world countries then we are in trouble, some of us.

Another trend is wholesale outsourcing of IT division, I read today
www.efinancialnews.com that JP Morgan UK is out sourcing to
IBM Consulting UK and I think so is Deutsche Bank and Dresdner.



I guess things are pretty slow no matter where you reside now.  I understand
Japan's high tech area has also been hard hit, along with most of Europe.

Celeste 

-Original Message-
From: Khalid Aslan [mailto:sheik_ya_bootie@;yahoo.co.uk]

Hi y'all

My name is Khalid. I was made redundant a couple weeks
ago in London. I was working for a big
investment bank. I was kinda looking for leads
to work in London, or elsewhere in Europe maybe.


Have you tried the usual suspects?

Computer Weekly www.cwjobs.co.uk
Technojobs www.technojobs.co.uk
Monster www.monster.co.uk



rgds
/Khalid/


PS: Good luck to everyone

--
Peter Pilgrim
ServerSide Java Specialist

My on-line resume and for interview videos about myself, J2EE
Open Source, Struts and Expresso.
   ||
   \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''


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




Re: jsp:setProperty

2002-11-13 Thread Martin Cooper


On Wed, 13 Nov 2002, Kris Schneider wrote:

> Comment inline
>
> Craig R. McClanahan wrote:
> >
> > On Thu, 14 Nov 2002, Wendy Cameron wrote:
> >
> >
> >>Date: Thu, 14 Nov 2002 09:03:16 +1000
> >>From: Wendy Cameron <[EMAIL PROTECTED]>
> >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >>To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >>Subject: RE: jsp:setProperty
> >>
> >>I have been looking into this a little more last night, I decideded
> >>to look at the compiled jsp code when I user jsp:setProperty "*"
> >>
> >>And discovered that in the Code was JspRuntime.introspect(Object,
> >>request) Which is servlet code for jsp:setProperty "*", it now strikes
> >>me as odd there seems to three seperate implementations of populating a
> >>bean through introspect.  Each is independant (No package dependancy).
> >>So this means the Jakarta apache project has 3 seperate implementations
> >>of introspect, possibly inconsistant, it also strikes me that every
> >>vendor has a different implementation of it.  It seems to me this is
> >>candidate area for standardisation and forming a part of JDK, at least
> >>maybe as an interface, as it seems to be something you would want to do
> >>in a stack of places, eg populating bean fields from the a record in a
> >>record set.
> >>
> >
> >
> > Where do you see *three* implementations?  I can count two (the one built
> > in to the JSP environment and the one that Struts uses
> > (commons-beanutils).  Where is the third one?
> >
> >
> >>This interested me, because I am trying to write a simple example
> >>framework using MVC architecture as training materials.  I want to be
> >>able to avoid the complexities of struts and just demonstrate what MVC
> >>is and how to build MVC architecture.
> >>
> >
> >
> > I'd stick with the commons-beanutils implementation (that Struts also
> > happens to use).  Not only is it already separate and reusable (and, in
> > fact, used by quite a few other projects), it is deliberately *not*
> > compatible with the (stupid, IMHO) way that  deals with
> > zero-length Strings -- JSP implementations basically ignore them.
> >
> > You might want to look at how Struts actually uses BeanUtils.populate() to
> > copy request parameters into a form bean.  Specifically, look at the
> > processPopulate method of RequestProcessor (1.1) or ActionServlet (1.0).
> >
> > If you are running in a Servlet 2.3 or later environment, it's basically
> > as simple as:
> >
> >   Object formBean = ...;
> >   Map parameters = request.getParameterMap();
> >   BeanUtils.populate(formBean, parameters);
>
> I did a couple of quick experiments with TC 4.1.14 and
> ServletRequest.getParameterMap only seemed to work with HTTP GET, not
> HTTP POST. Is your expectation that it *should* work with POST?

Does it not work for *any* post, or does it just not work for multipart
posts? I would expect it not to work for multipart posts, because Struts
wraps the request, and that wrapper does not currently implement
getParameterMap(). However, if it doesn't work for posts at all, and in
particular doesn't work for url-encoded posts, then that would seem to be
a bug in Tomcat.

--
Martin Cooper


>
> >
> > In a Servlet 2.2 world, the only additional thing is to build the map of
> > parameters by hand (since getParameterMap is not available).
> >
> >
> >>Then the next phase in the course is to introduce Struts, by converting
> >>the same problem or system over to struts.  Reinforcing the MVC
> >>concepts, while introducing struts concepts and tablibs. (Is it possible
> >>to get an evaluation copy of Struts in Action)
> >>
> >>So I decided to use the JspRuntime.introspect(Object, request) despite
> >>its platform specific nature, only work with Tomcat, because the
> >>properties are fairly simple in nature.
> >>
> >
> >
> > Beyond locking you into Tomcat, you're also locked in to the JSP spec
> > interpretation of property population, which operates in some unexpected
> > manners.
> >
> >
> >>Regards Wendy
> >>
> >
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
>
> --
> Kris Schneider 
> D.O.Tech   
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




Re: jsp:setProperty

2002-11-13 Thread Craig R. McClanahan


On Wed, 13 Nov 2002, Kris Schneider wrote:

> [snip]
>
> I did a couple of quick experiments with TC 4.1.14 and
> ServletRequest.getParameterMap only seemed to work with HTTP GET, not
> HTTP POST. Is your expectation that it *should* work with POST?
>

It should definitely work on a POST, but only if your request meets all
the requirements so that the body content will be parsed by *any* of the
getParameter family of methods.  Specifically:

* Request protocol is "http" or "https"

* HTTP method is "POST"

* Content type is "application/x-www-form-urlencoded"

If your request looks like that, and you still don't get the parameter
values, please file a bug against Tomcat -- ideally with a test case
attached.

http://nagoya.apache.org/bugzilla/

Craig


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




RE: jsp:setProperty

2002-11-13 Thread Wendy Cameron
If Kris, is correct an getPropertyMap only works for the get method, then this seems 
to be a bit of problem as most form data comes via post.  And although I agree I think 
using the BeanUtils is more sensible than JspRuntimeLibray and can then be ported by 
simply copying to jars to other server or including them in the webapp. Hoever if it 
only works for get methods, then you still must write code to extract the parameters.  
This seems odd.

Regards Wendy

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




Re: jsp:setProperty

2002-11-13 Thread Kris Schneider
Comment inline

Craig R. McClanahan wrote:


On Thu, 14 Nov 2002, Wendy Cameron wrote:



Date: Thu, 14 Nov 2002 09:03:16 +1000
From: Wendy Cameron <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: RE: jsp:setProperty

I have been looking into this a little more last night, I decideded
to look at the compiled jsp code when I user jsp:setProperty "*"

And discovered that in the Code was JspRuntime.introspect(Object,
request) Which is servlet code for jsp:setProperty "*", it now strikes
me as odd there seems to three seperate implementations of populating a
bean through introspect.  Each is independant (No package dependancy).
So this means the Jakarta apache project has 3 seperate implementations
of introspect, possibly inconsistant, it also strikes me that every
vendor has a different implementation of it.  It seems to me this is
candidate area for standardisation and forming a part of JDK, at least
maybe as an interface, as it seems to be something you would want to do
in a stack of places, eg populating bean fields from the a record in a
record set.




Where do you see *three* implementations?  I can count two (the one built
in to the JSP environment and the one that Struts uses
(commons-beanutils).  Where is the third one?



This interested me, because I am trying to write a simple example
framework using MVC architecture as training materials.  I want to be
able to avoid the complexities of struts and just demonstrate what MVC
is and how to build MVC architecture.




I'd stick with the commons-beanutils implementation (that Struts also
happens to use).  Not only is it already separate and reusable (and, in
fact, used by quite a few other projects), it is deliberately *not*
compatible with the (stupid, IMHO) way that  deals with
zero-length Strings -- JSP implementations basically ignore them.

You might want to look at how Struts actually uses BeanUtils.populate() to
copy request parameters into a form bean.  Specifically, look at the
processPopulate method of RequestProcessor (1.1) or ActionServlet (1.0).

If you are running in a Servlet 2.3 or later environment, it's basically
as simple as:

  Object formBean = ...;
  Map parameters = request.getParameterMap();
  BeanUtils.populate(formBean, parameters);


I did a couple of quick experiments with TC 4.1.14 and 
ServletRequest.getParameterMap only seemed to work with HTTP GET, not 
HTTP POST. Is your expectation that it *should* work with POST?


In a Servlet 2.2 world, the only additional thing is to build the map of
parameters by hand (since getParameterMap is not available).



Then the next phase in the course is to introduce Struts, by converting
the same problem or system over to struts.  Reinforcing the MVC
concepts, while introducing struts concepts and tablibs. (Is it possible
to get an evaluation copy of Struts in Action)

So I decided to use the JspRuntime.introspect(Object, request) despite
its platform specific nature, only work with Tomcat, because the
properties are fairly simple in nature.




Beyond locking you into Tomcat, you're also locked in to the JSP spec
interpretation of property population, which operates in some unexpected
manners.



Regards Wendy




Craig


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


--
Kris Schneider 
D.O.Tech   


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




RE: jsp:setProperty

2002-11-13 Thread Wendy Cameron
You are completely right, I didnt take a detailed look at the code and missed the
call to bean utils at the very end.

Revision was $Revision: 1.52 $

Regards Wendy

> -Original Message-
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> Sent: Thursday, November 14, 2002 10:31 AM
> To: Struts Users Mailing List
> Subject: RE: jsp:setProperty
> 
> 
> 
> 
> On Thu, 14 Nov 2002, Wendy Cameron wrote:
> 
> > Date: Thu, 14 Nov 2002 10:16:43 +1000
> > From: Wendy Cameron <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: RE: jsp:setProperty
> >
> > The third implementation is the one suggested by Kris Schneider,
> >
> > RequestUtils.populate(Object bean, HttpServletRequest 
> request) which as
> > far as I can see from source code, does its own thing.  (Doesnt call
> > BeanUtils.populate())
> >
> 
> Which CVS version of RequestUtils.java are you looking at (from the
> $Revision$ line at the top)?
> 
> In both 1.0 and 1.1, it actually does call 
> BeanUtils.populate(), down near
> the bottom, to do the actual copying.  The extra complexity 
> above that is
> for handling file uploads and for grabbing the correct set of 
> parameters
> out of the request.
> 
> > Regards Wendy
> 
> Craig
> 
> 
> >
> > --
> > 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: jsp:setProperty

2002-11-13 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Wendy Cameron wrote:

> Date: Thu, 14 Nov 2002 10:16:43 +1000
> From: Wendy Cameron <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: jsp:setProperty
>
> The third implementation is the one suggested by Kris Schneider,
>
> RequestUtils.populate(Object bean, HttpServletRequest request) which as
> far as I can see from source code, does its own thing.  (Doesnt call
> BeanUtils.populate())
>

Which CVS version of RequestUtils.java are you looking at (from the
$Revision$ line at the top)?

In both 1.0 and 1.1, it actually does call BeanUtils.populate(), down near
the bottom, to do the actual copying.  The extra complexity above that is
for handling file uploads and for grabbing the correct set of parameters
out of the request.

> Regards Wendy

Craig


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


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




Re: Validation in Nightly Build 20021105

2002-11-13 Thread Robert Leland
This looks similar, but different, to a bug I tracked down because of a
change in the FastHashMap implementation.

The fix was in ValidatorResources:
   public void process() {
  hFormSets.setFast(true);
  hConstants.setFast(true);
  hActions.setFast(true);

  processForms();
   }
setting the setFast() to setFast(false),


Here is a link to the original bug report.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13472

So file the bug report with commons-validator

-Rob







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




Re: Validation in Nightly Build 20021105

2002-11-13 Thread Robert Leland
Ok, it looks like it isn't the same bug,
though the error is occuring in the iterator
of the FastHashMap.

I believe you said it was also happening in
the Struts example/struts-validator program.

Be sure to mention the application server
you're using.

I haven't had to worry about the locale being different
being a Yank, but would like to be able to test this.
How can I set the locale in my browser ?
Is it the same as setting the language in the Mozilla
preferences ?


-Rob




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




RE: jsp:setProperty

2002-11-13 Thread Wendy Cameron
The third implementation is the one suggested by Kris Schneider,

RequestUtils.populate(Object bean, HttpServletRequest request) which as far as I can 
see from source code, does its own thing.  (Doesnt call BeanUtils.populate())

Regards Wendy

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




RE: jsp:setProperty

2002-11-13 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Wendy Cameron wrote:

> Date: Thu, 14 Nov 2002 09:03:16 +1000
> From: Wendy Cameron <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: jsp:setProperty
>
> I have been looking into this a little more last night, I decideded
> to look at the compiled jsp code when I user jsp:setProperty "*"
>
> And discovered that in the Code was JspRuntime.introspect(Object,
> request) Which is servlet code for jsp:setProperty "*", it now strikes
> me as odd there seems to three seperate implementations of populating a
> bean through introspect.  Each is independant (No package dependancy).
> So this means the Jakarta apache project has 3 seperate implementations
> of introspect, possibly inconsistant, it also strikes me that every
> vendor has a different implementation of it.  It seems to me this is
> candidate area for standardisation and forming a part of JDK, at least
> maybe as an interface, as it seems to be something you would want to do
> in a stack of places, eg populating bean fields from the a record in a
> record set.
>

Where do you see *three* implementations?  I can count two (the one built
in to the JSP environment and the one that Struts uses
(commons-beanutils).  Where is the third one?

> This interested me, because I am trying to write a simple example
> framework using MVC architecture as training materials.  I want to be
> able to avoid the complexities of struts and just demonstrate what MVC
> is and how to build MVC architecture.
>

I'd stick with the commons-beanutils implementation (that Struts also
happens to use).  Not only is it already separate and reusable (and, in
fact, used by quite a few other projects), it is deliberately *not*
compatible with the (stupid, IMHO) way that  deals with
zero-length Strings -- JSP implementations basically ignore them.

You might want to look at how Struts actually uses BeanUtils.populate() to
copy request parameters into a form bean.  Specifically, look at the
processPopulate method of RequestProcessor (1.1) or ActionServlet (1.0).

If you are running in a Servlet 2.3 or later environment, it's basically
as simple as:

  Object formBean = ...;
  Map parameters = request.getParameterMap();
  BeanUtils.populate(formBean, parameters);

In a Servlet 2.2 world, the only additional thing is to build the map of
parameters by hand (since getParameterMap is not available).

> Then the next phase in the course is to introduce Struts, by converting
> the same problem or system over to struts.  Reinforcing the MVC
> concepts, while introducing struts concepts and tablibs. (Is it possible
> to get an evaluation copy of Struts in Action)
>
> So I decided to use the JspRuntime.introspect(Object, request) despite
> its platform specific nature, only work with Tomcat, because the
> properties are fairly simple in nature.
>

Beyond locking you into Tomcat, you're also locked in to the JSP spec
interpretation of property population, which operates in some unexpected
manners.

> Regards Wendy
>

Craig


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




page context

2002-11-13 Thread Manoj, Mathew
Hi
I am new to Struts.Can anyone please tell me what is page context.and what is the 
difference between page context and user context(session context).
My wesite has 8 pages and all the links are in the header, have all links go to 
Actions.I am trying to implement it in struts.So when user click on any link,I need to 
know from which page he is coming?( a simple state engine).I am thinking of setting a 
variable in the session and update it with each page?or go for a hidden field?Please 
give me a better idea..

Thanks
Matt

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




RE: 2D Collection and nested:iterate

2002-11-13 Thread EmailUser
> Thx Aaron.
  Arron? - Why? My dad was hilarious back in his day.  :P

> That solution works great for displaying the data.  However,
> Struts will not know how to populate the List back when the data is
> received from the user, since the Indices cannot be set in that access
> wrapper object. 

Well... the mechanism the tags use to display is the same as the mechanism 
the server uses to update, BeanUtils. So I'm guessing that it's the 
old "Struts can populate lists..." thing. Try it again while keeping the bean 
in the session scope. It "should" work.

To get it back out of session scope and into the request scope, you'll have 
to employ the technique of the LazyList stuff in the commons-collections 
project. Look for the LazyList docco in the 
org.apache.commons.collections.ListUtils class. This will allow you to wrap 
your ArrayList (without any real overhead), and allow it to grow 
automatically when all those indexed items come back in.


Arron.

* you've got rail!



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




1.1b2 - validate() form method gives blank screen when errors present

2002-11-13 Thread Mark Leonard
Greetings,

I am having a problem where a blank screen is presented instead of redirecting the 
user back to the "input" attribute if the validate() method returns errors.  If 
validate() finds no errors or if i set validate="false" for the action, processing is 
ok with successful redirection to the success page defined in my mapping.  The 
configuration for the action is shown below.

I have set up the "TestForm" to always add an error during my testing and the println 
shows that errors.size() is 1 on the console.  I am using tomcat 4.1.12 and there are 
no error messages appearing in the log files.

"error.dummy.testing" is defined in my properties file and errors are successfully 
displayed on another page in my app when the ActionErrors are set and saveErrors(...) 
is called in my Action subclass.

I'd appreciate any ideas as to what is going wrong with my configuration before i 
start nosing through the struts source code.

Thanks,

-Mark

TestForm snippet

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.dummy.testing"));
System.out.println("actionerrors size, " + errors.size());

return errors;

}

-
struts-config.xml snippet







  


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




Action takes long time to complete

2002-11-13 Thread Alex_Kotchnev
David, 

Well, does the content of the next page depend on the completion of the 
task ? If that is the case, probably the JavaScript page with some 
animation would probably be the solution. However, if it doesn't depend on 
it, I think that you could probably start a new thread to do the work and 
have the action forward to the next step. 

I am using something similar to what I mentioned above.. But my question 
is: if you have a longer job that you are processing (e.g. either in the 
Action or in a separate thread), if the user has to cancel the job, how 
can they do it... In other words, if they hit Esc, or hit the Stop button 
on the browser, that will let them go anywhere else they want, but the job 
on the server doesn't stop.. it keeps going... 

-Original Message-
From: David Bolsover [mailto:david@;bolsover.com] 
Sent: Wednesday, November 13, 2002 5:05 AM
To: [EMAIL PROTECTED]
Subject: Action takes long time to complete


Hi all

I have an action that takes a very long time to complete.

Advice please - how do I forward to a new page before the tasks the action
has started have completed?

db


Thanks,

Alex Kotchnev
Diversified Information Technologies


CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please 
immediately notify the sender by e-mail at the address shown.  This e-mail 
transmission may contain confidential information.  This information is 
intended only for the use of the individual(s) or entity to whom it is 
intended even if addressed incorrectly.  Please delete it from your files 
if you are not the intended recipient.  Thank you for your compliance.



RE: jsp:setProperty

2002-11-13 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Wendy Cameron wrote:

> Date: Thu, 14 Nov 2002 09:03:16 +1000
> From: Wendy Cameron <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: jsp:setProperty
>
> I have been looking into this a little more last night, I decideded
> to look at the compiled jsp code when I user jsp:setProperty "*"
>
> And discovered that in the Code was JspRuntime.introspect(Object,
> request) Which is servlet code for jsp:setProperty "*", it now strikes
> me as odd there seems to three seperate implementations of populating a
> bean through introspect.  Each is independant (No package dependancy).
> So this means the Jakarta apache project has 3 seperate implementations
> of introspect, possibly inconsistant, it also strikes me that every
> vendor has a different implementation of it.  It seems to me this is
> candidate area for standardisation and forming a part of JDK, at least
> maybe as an interface, as it seems to be something you would want to do
> in a stack of places, eg populating bean fields from the a record in a
> record set.
>
> This interested me, because I am trying to write a simple example framework using 
>MVC architecture as training materials.  I want to be able to avoid the complexities 
>of struts and just demonstrate what MVC is and how to build MVC architecture.
>
> Then the next phase in the course is to introduce Struts, by converting the same 
>problem or system over to struts.  Reinforcing the MVC concepts, while introducing 
>struts concepts and tablibs. (Is it possible to get an evaluation copy of Struts in 
>Action)
>
> So I decided to use the JspRuntime.introspect(Object, request) despite its platform 
>specific nature, only work with Tomcat, because the properties are fairly simple in 
>nature.
>
> Regards Wendy
>
> > -Original Message-
> > From: Kris Schneider [mailto:kris@;dotech.com]
> > Sent: Thursday, November 14, 2002 6:59 AM
> > To: Struts Users Mailing List
> > Subject: Re: jsp:setProperty
> >
> >
> > Wendy,
> >
> > If you're already playing around with this stuff, this may be
> > old news. Just
> > thought I'd add a couple of bits for posterity:
> >
> > ServletRequest.getParameterMap does not appear to work for
> > post requests (it
> > returns an empty Map), only get requests (at least with
> > Tomcat 4.1.14).
> >
> > RequestUtils.populate requires the bean to be an instance of
> > org.apache.struts.action.ActionForm for post requests. In
> > addition, it looks
> > like it requires that post requests pass through the Struts
> > servlet (otherwise
> > it throws an NPE).
> >
> > Quoting Kris Schneider <[EMAIL PROTECTED]>:
> >
> > > Right, BeanUtils.populate doesn't know anything about the
> > world of servlets,
> > > so
> > > it won't be of any help when parsing the request params.
> > >
> > > Just a note that Struts also works with Servlet 2.2
> > containers, which predate
> > >
> > > the availability of ServletRequest.getParameterMap.
> > >
> > > Quoting Wendy Cameron <[EMAIL PROTECTED]>:
> > >
> > > > Yes this is better, I was looking at much older JSP docs.
> > > >
> > > > I think the functionality differences between
> > > ServletRequest.getParameterMap
> > > > and RequestUtils.populate could be multipart form content and file
> > > > updloading.
> > > >
> > > > I had a look at the source and it seemed to handle
> > multipart requests as
> > > > well
> > > > as standard ones.
> > > >
> > > > I dont think bean utils would do this?
> > > >
> > > > Regards Wendy
> > > >
> > > > > -Original Message-
> > > > > From: Kris Schneider [mailto:kris@;dotech.com]
> > > > > Sent: Wednesday, November 13, 2002 3:21 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: jsp:setProperty
> > > > >
> > > > >
> > > > > Good call - but perhaps
> > javax.servlet.ServletRequest.getParameterMap
> > > > > would be better? HttpUtils is deprecated in Servlet 2.3. I'm
> > > > > not really
> > > > > sure what the functionality differences are betweem using
> > > > > ServletRequest.getParameterMap and RequestUtils.populate...
> > > > >
> > > > > Wendy Cameron wrote:
> > > > > > Isnt the conversion a simple matter of
> > > > > >
> > > > > > HashTable tbl =
> > > > > javax.servlet.http.HttpUtils.parsePostData(int len,
> > > > > ServletInputStream in)
> > > > > > Map map = new HashMap(tbl);
> > > > > >
> > > > > > Only thin i am unsure about is the length parameter.
> > > > > >
> > > > > > Regards Wendy
> > > > > >
> > > > > >
> > > > > >>-Original Message-
> > > > > >>From: Kris Schneider [mailto:kris@;dotech.com]
> > > > > >>Sent: Wednesday, November 13, 2002 1:40 PM
> > > > > >>To: Struts Users Mailing List
> > > > > >>Subject: Re: jsp:setProperty
> > > > > >>
> > > > > >>
> > > > > >>commons-beanutils.jar is part of the Struts 1.1 distribution.
> > > > > >>It's also
> > > > > >>an entirely independent Jakarta Commons component. I still
> > > > > think you
> > > > >

RE: indexed properties and form help needed

2002-11-13 Thread Andy Kriger
According to the docs for DynaActionForm, you indicate a property is indexed
by putting [] after the type name. What I think is going on is that the
property is not initalized when the iterator tries to access it, thus the
'No collection found'. But I don't know how to set this up so it works
correctly. Since Struts seems to handle just about everything else, it'd
surprise me if you couldn't iterate over a dynamic form property in order to
setup inputs.

thx

-Original Message-
From: Karr, David [mailto:david.karr@;attws.com]
Sent: Wednesday, November 13, 2002 18:02
To: Struts Users Mailing List
Subject: RE: indexed properties and form help needed


At end.

> -Original Message-
> From: Andy Kriger [mailto:akriger@;greaterthanone.com]
>
> I have a DynaActionForm collecting credit card info. A user
> can enter up to
> 3 credit cards on the form. I want to collect this info in
> the text fields
> and create new CreditCard objects automatically; ideally, I
> would get a
> CreditCard[3] once the form is submitted (optionally an
> ArrayList would be
> fine). I would like to use indexed properties (right now I'm
> using hard
> coded property names), but I cannot figure out how to set this up.
>
> I am getting either a 'No collection found' error or a
> 'Cannot iterate over
> collection' error (depending on how I mess with this).
>
> What follows is rough code of what I'm trying to do.
>
> A CreditCard object has 5 fields with get/set methods for
> each: type, name,
> number, expMonth, expYear.
>
> 
> 
>  name='registrationForm'
> length='3'>
>indexed='true'>
>   
>   
>indexed='true'>
>indexed='true'>
>indexed='true'>
>indexed='true'>
> 
> 
> 
>
> 
> 
>type='my.package.CreditCard[]'/>
> 

Note that I haven't compiled or run any of this.

I would first expect my loop to look more like this:


 
  
 
 
 
 
 


I would have accessors for "name", "number", "expMonth" and "expYear" in the
CreditCard class.

At that point, I scratch my head, because I don't know how to represent
indexed properties in DynaActionForms.  With a regular ActionForm, I would
have the following in my "registrationForm" bean:

public  CreditCard getCreditCard(int index) { return
(creditCards[index]); }
public  void  setCreditCard(int index, CreditCard creditCard) {
creditCard[index] = creditCard; }
public  CreditCard[] getCreditCards() { return (creditCards); }

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: jsp:setProperty

2002-11-13 Thread Wendy Cameron
I have been looking into this a little more last night, I decideded
to look at the compiled jsp code when I user jsp:setProperty "*"

And discovered that in the Code was JspRuntime.introspect(Object, request)
Which is servlet code for jsp:setProperty "*", it now strikes me as odd
there seems to three seperate implementations of populating a bean through
introspect.  Each is independant (No package dependancy).  So this means the Jakarta 
apache project has 3 seperate implementations of introspect, possibly inconsistant, it 
also strikes me that every vendor has a different implementation of it.  It seems to 
me this is candidate area for standardisation and forming a part of JDK, at least 
maybe as an interface, as it seems to be something you would want to do in a stack of 
places, eg populating bean fields from the a record in a record set. 

This interested me, because I am trying to write a simple example framework using MVC 
architecture as training materials.  I want to be able to avoid the complexities of 
struts and just demonstrate what MVC is and how to build MVC architecture.

Then the next phase in the course is to introduce Struts, by converting the same 
problem or system over to struts.  Reinforcing the MVC concepts, while introducing 
struts concepts and tablibs. (Is it possible to get an evaluation copy of Struts in 
Action)

So I decided to use the JspRuntime.introspect(Object, request) despite its platform 
specific nature, only work with Tomcat, because the properties are fairly simple in 
nature.

Regards Wendy

> -Original Message-
> From: Kris Schneider [mailto:kris@;dotech.com]
> Sent: Thursday, November 14, 2002 6:59 AM
> To: Struts Users Mailing List
> Subject: Re: jsp:setProperty
> 
> 
> Wendy,
> 
> If you're already playing around with this stuff, this may be 
> old news. Just 
> thought I'd add a couple of bits for posterity:
> 
> ServletRequest.getParameterMap does not appear to work for 
> post requests (it 
> returns an empty Map), only get requests (at least with 
> Tomcat 4.1.14).
> 
> RequestUtils.populate requires the bean to be an instance of 
> org.apache.struts.action.ActionForm for post requests. In 
> addition, it looks 
> like it requires that post requests pass through the Struts 
> servlet (otherwise 
> it throws an NPE).
> 
> Quoting Kris Schneider <[EMAIL PROTECTED]>:
> 
> > Right, BeanUtils.populate doesn't know anything about the 
> world of servlets,
> > so 
> > it won't be of any help when parsing the request params.
> > 
> > Just a note that Struts also works with Servlet 2.2 
> containers, which predate
> > 
> > the availability of ServletRequest.getParameterMap.
> > 
> > Quoting Wendy Cameron <[EMAIL PROTECTED]>:
> > 
> > > Yes this is better, I was looking at much older JSP docs.
> > > 
> > > I think the functionality differences between
> > ServletRequest.getParameterMap
> > > and RequestUtils.populate could be multipart form content and file
> > > updloading.
> > > 
> > > I had a look at the source and it seemed to handle 
> multipart requests as
> > > well
> > > as standard ones.
> > > 
> > > I dont think bean utils would do this?
> > > 
> > > Regards Wendy
> > > 
> > > > -Original Message-
> > > > From: Kris Schneider [mailto:kris@;dotech.com]
> > > > Sent: Wednesday, November 13, 2002 3:21 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: jsp:setProperty
> > > > 
> > > > 
> > > > Good call - but perhaps 
> javax.servlet.ServletRequest.getParameterMap 
> > > > would be better? HttpUtils is deprecated in Servlet 2.3. I'm 
> > > > not really 
> > > > sure what the functionality differences are betweem using 
> > > > ServletRequest.getParameterMap and RequestUtils.populate...
> > > > 
> > > > Wendy Cameron wrote:
> > > > > Isnt the conversion a simple matter of 
> > > > > 
> > > > > HashTable tbl = 
> > > > javax.servlet.http.HttpUtils.parsePostData(int len, 
> > > > ServletInputStream in)
> > > > > Map map = new HashMap(tbl);
> > > > > 
> > > > > Only thin i am unsure about is the length parameter.
> > > > > 
> > > > > Regards Wendy
> > > > > 
> > > > > 
> > > > >>-Original Message-
> > > > >>From: Kris Schneider [mailto:kris@;dotech.com]
> > > > >>Sent: Wednesday, November 13, 2002 1:40 PM
> > > > >>To: Struts Users Mailing List
> > > > >>Subject: Re: jsp:setProperty
> > > > >>
> > > > >>
> > > > >>commons-beanutils.jar is part of the Struts 1.1 distribution. 
> > > > >>It's also 
> > > > >>an entirely independent Jakarta Commons component. I still 
> > > > think you 
> > > > >>should really check out the 
> > > > >>org.apache.struts.util.RequestUtils.populate 
> > > > >>method. Otherwise, you'll have to do the work of converting 
> > > > >>the request 
> > > > >>params into a Map that can be used by BeanUtils.populate.
> > > > >>
> > > > >>Wendy Cameron wrote:
> > > > >>
> > > > >>>Sorry but just let me get this clear in my head.
> > > > >>>
> > > > >>>There are BeanUtils class in commons.beanutils package.
> > > 

RE: indexed properties and form help needed

2002-11-13 Thread Karr, David
At end.

> -Original Message-
> From: Andy Kriger [mailto:akriger@;greaterthanone.com]
> 
> I have a DynaActionForm collecting credit card info. A user 
> can enter up to
> 3 credit cards on the form. I want to collect this info in 
> the text fields
> and create new CreditCard objects automatically; ideally, I 
> would get a
> CreditCard[3] once the form is submitted (optionally an 
> ArrayList would be
> fine). I would like to use indexed properties (right now I'm 
> using hard
> coded property names), but I cannot figure out how to set this up.
> 
> I am getting either a 'No collection found' error or a 
> 'Cannot iterate over
> collection' error (depending on how I mess with this).
> 
> What follows is rough code of what I'm trying to do.
> 
> A CreditCard object has 5 fields with get/set methods for 
> each: type, name,
> number, expMonth, expYear.
> 
> 
> 
>  name='registrationForm'
> length='3'>
>indexed='true'>
>   
>   
>indexed='true'>
>indexed='true'>
>indexed='true'>
>indexed='true'>
> 
> 
> 
> 
> 
> 
>type='my.package.CreditCard[]'/>
> 

Note that I haven't compiled or run any of this.

I would first expect my loop to look more like this:


 
  
 
 
 
 
 


I would have accessors for "name", "number", "expMonth" and "expYear" in the 
CreditCard class.

At that point, I scratch my head, because I don't know how to represent indexed 
properties in DynaActionForms.  With a regular ActionForm, I would have the following 
in my "registrationForm" bean:

public  CreditCard getCreditCard(int index) { return (creditCards[index]); }
public  void  setCreditCard(int index, CreditCard creditCard) { creditCard[index] 
= creditCard; }
public  CreditCard[] getCreditCards() { return (creditCards); }

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




Re: Validation in Nightly Build 20021105

2002-11-13 Thread James Holmes
I would suggest entering a bug for this in Bugzilla:

http://nagoya.apache.org/bugzilla

This way it can be tracked and resolved.

Thanks,

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


--- Mike Wilcox <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> We recently upgraded from Struts 1.1b1 to the
> nightly build from 
> 20021105. After a couple of days, we realised that
> validation wasn't 
> working because of a format change to setting the
> properties in 
> struts-config.xml for the filenames.
> 
> Once we fixed this, validation *sometimes* didn't
> work.
> 
> The symptom is that in the output, where the
>  tag is 
> placed (with only a formName attribute), we now
> render a whole bunch of 
> Javascript - the static validation functions only,
> without the dynamic 
> part, or any start or end tags to hide it.
> 
> Now, Browser A (Mozilla 1.1, linux) works on server
> X, Browser B (IE6 on 
> winXP) fails. However, Browser A fails on server Y,
> yet Browser B works.
> 
> Checking the doStartTag() code showed me that these
> symptoms occur when 
> the formName definition can't be found in the config
> data, utilising 
> some locale info. Our logs show that the definition
> was found at 
> startup, and this definition used to work in the
> older version of struts.
> 
> Seeing a recent problem with a french locale, we
> checked. Browser A is 
> using the en_US locale, while Browser B uses en_GB.
> We then swapped the 
> locales used by the browsers, and the failure swaps
> round too. On 
> checking, server X is in locale en_US while server Y
> is in locale en_GB. 
> So... the browser/server combination worked when
> locales matched, and 
> failed otherwise.
> 
> We only have a single formset in the validation.xml,
> unqualified by 
> country or language. However, if we do try to
> specify country or 
> language, we get a NullPointerException in the
> commons-validator.
> 
> 2002-11-13 17:22:24,104 [   main] ERROR 
> he.struts.validator.ValidatorPlugIn  -
> java.lang.NullPointerException
> at 
>
org.apache.commons.validator.ValidatorResources.processForms(ValidatorResources.java:355)
> at 
>
org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:319)
> at 
>
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:234)
> at 
>
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:165)
> at 
>
org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.java:983)
> at
>
org.apache.struts.action.ActionServlet.init(ActionServlet.java:450)
> at
>
javax.servlet.GenericServlet.init(GenericServlet.java)
> at 
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
> 
> We have tried deploying the struts-validator example
> from the same 
> nightly build. At least it's more consistent - it
> fails in each 
> combination of browser & server.
> 
> Seems like a fault. Is this enough to help track it
> down? Anything else 
> we can do?
> 
> Cheers,
> 
> Mike
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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




Validation in Nightly Build 20021105

2002-11-13 Thread Mike Wilcox
Hi,

We recently upgraded from Struts 1.1b1 to the nightly build from 
20021105. After a couple of days, we realised that validation wasn't 
working because of a format change to setting the properties in 
struts-config.xml for the filenames.

Once we fixed this, validation *sometimes* didn't work.

The symptom is that in the output, where the  tag is 
placed (with only a formName attribute), we now render a whole bunch of 
Javascript - the static validation functions only, without the dynamic 
part, or any start or end tags to hide it.

Now, Browser A (Mozilla 1.1, linux) works on server X, Browser B (IE6 on 
winXP) fails. However, Browser A fails on server Y, yet Browser B works.

Checking the doStartTag() code showed me that these symptoms occur when 
the formName definition can't be found in the config data, utilising 
some locale info. Our logs show that the definition was found at 
startup, and this definition used to work in the older version of struts.

Seeing a recent problem with a french locale, we checked. Browser A is 
using the en_US locale, while Browser B uses en_GB. We then swapped the 
locales used by the browsers, and the failure swaps round too. On 
checking, server X is in locale en_US while server Y is in locale en_GB. 
So... the browser/server combination worked when locales matched, and 
failed otherwise.

We only have a single formset in the validation.xml, unqualified by 
country or language. However, if we do try to specify country or 
language, we get a NullPointerException in the commons-validator.

2002-11-13 17:22:24,104 [   main] ERROR 
he.struts.validator.ValidatorPlugIn  -
java.lang.NullPointerException
   at 
org.apache.commons.validator.ValidatorResources.processForms(ValidatorResources.java:355)
   at 
org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:319)
   at 
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:234)
   at 
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:165)
   at 
org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.java:983)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:450)
   at javax.servlet.GenericServlet.init(GenericServlet.java)
   at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)

We have tried deploying the struts-validator example from the same 
nightly build. At least it's more consistent - it fails in each 
combination of browser & server.

Seems like a fault. Is this enough to help track it down? Anything else 
we can do?

Cheers,

   Mike



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



RE: How to input

2002-11-13 Thread jzakarian
Susan,

Thank you for the quick reply. I will try this tonight.

Jack

-Original Message-
From: Susan Bradeen [mailto:SusanB@;softlanding.com] 
Sent: Wednesday, November 13, 2002 5:08 PM
To: Struts Users Mailing List
Subject: RE: How to input

Jack,

I'm not an expert on this, but I am working with WebSphere 4.0.2 and 
Struts (mostly) fine. I don't have access to anything one would consider

administrative (i.e. Admin Console, etc.), but to get Struts and the 
Struts-example app working, I am not sure you need it. I believe all you

have to do is create a project in WebSphere to import the example into. 

In WebSphere:
1. Select File, new, Project, web project, ... to create a new project.
2. Select File, Import, War file, ... to put the .war file into your new

project.

I have imported a number of sample examples, as well have recently 
upgraded to the latest build of Struts for my development without any 
trouble, and without the use of Admin Console. As I said, I am not an 
Administrator, and perhaps there is in fact more that needs to be done 
that I don't know about, in which case I apologize in advance, but
thought 
I'd let you know of my experience anyway.

Susan Bradeen





"jzakarian" <[EMAIL PROTECTED]>
11/13/2002 12:00 PM
Please respond to "Struts Users Mailing List"

 
To: "'Struts Users Mailing List'"
<[EMAIL PROTECTED]>
cc: 
Subject:RE: How to input


Hi Vicky,

I don't have an answer for your question but one of my own. I have just
started using WebSphere 4.0.x and want to use struts. I copy the
struts-example.war to the installableApps directory and then use the
Administrative Console to install it.  It says that it is installed and
started but I can't get the index.jsp to display in my browser. 

How are you installing struts?

Thanks,

Jack 

-Original Message-
From: Vicky Yue [mailto:piggynews@;hotmail.com] 
Sent: Wednesday, November 13, 2002 11:52 AM
To: [EMAIL PROTECTED]
Subject: How to input

Hi

I'm using WebSphere 4.0.x & Struts 1.0.2 for my development.
I want to input utf-8 characters from JSP and get the result from
server.
Anyone know how to configure WebSphere to accept correct characters?

Thanks,
Vicky



--
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: Dynamic redirect to external URL

2002-11-13 Thread David Graham
This is a known bug and will be fixed before 1.1 is released.

David







From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Dynamic redirect to external URL
Date: Wed, 13 Nov 2002 14:23:56 -0800

Is there a way to create a dynamic redirect to an external URL.

Something like the way I expected this to work:

public class MyAction extends Action {
  ...

 ActionForward fwd = new ActionForward("http://www.yahoo.com";, true);
 fwd.setContextRelative(false);
 return fwd;

  ...
}


The code in struts RequestProcessor ends up doing this:

String uri = RequestUtils.forwardURL(request, forward);
if (forward.getRedirect()) {
response.sendRedirect
(response.encodeRedirectURL(request.getContextPath() +
uri));
} else {
doForward(uri, request, response);
}


So context relative does not seem to be checked, and the url ends up being

http://myserver:myport/myapp/http://www.yahoo.com

Is there a standard way to do this?

Or should I just call something like response.setRedirect().

Brendan

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



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


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



indexed properties and form help needed

2002-11-13 Thread Andy Kriger
I know this question gets asked a lot but I've yet to see a comprehensive
coverage of how to make this work (the answers are always filling in the
blanks of a specific question). I'd be happy to start a tutorial on this
once I get my problem worked out.

I have a DynaActionForm collecting credit card info. A user can enter up to
3 credit cards on the form. I want to collect this info in the text fields
and create new CreditCard objects automatically; ideally, I would get a
CreditCard[3] once the form is submitted (optionally an ArrayList would be
fine). I would like to use indexed properties (right now I'm using hard
coded property names), but I cannot figure out how to set this up.

I am getting either a 'No collection found' error or a 'Cannot iterate over
collection' error (depending on how I mess with this).

What follows is rough code of what I'm trying to do.

A CreditCard object has 5 fields with get/set methods for each: type, name,
number, expMonth, expYear.






















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




export in frames

2002-11-13 Thread Chen, Dean (Zhun)
Hi,
I have 2 frames. One submits a query to be displayed in the 2nd.
In the 2nd frame, there's a button to export. The export apparently works,
however, after the user exports, queries that the user submits no longer
appear on the screen. He/she has to refresh the browser to submit more
queries.

Currently the export works by running the query again, and then in the JSP,
issuing HttpServletResponse.setContentType("application/octet-stream") and
setHeader("content-disposition", "attachment; filename=export.csv").

Anyone have any suggestions?

Thanks,

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




Dynamic redirect to external URL

2002-11-13 Thread Brendan . Johnston
Is there a way to create a dynamic redirect to an external URL.

Something like the way I expected this to work:

public class MyAction extends Action {
  ...

 ActionForward fwd = new ActionForward("http://www.yahoo.com";, true);
 fwd.setContextRelative(false);
 return fwd;

  ...
}


The code in struts RequestProcessor ends up doing this:

String uri = RequestUtils.forwardURL(request, forward);
if (forward.getRedirect()) {
response.sendRedirect
(response.encodeRedirectURL(request.getContextPath() +
uri));
} else {
doForward(uri, request, response);
}


So context relative does not seem to be checked, and the url ends up being

http://myserver:myport/myapp/http://www.yahoo.com

Is there a standard way to do this?

Or should I just call something like response.setRedirect().

Brendan

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




RE: How to input

2002-11-13 Thread Susan Bradeen
Jack,

I'm not an expert on this, but I am working with WebSphere 4.0.2 and 
Struts (mostly) fine. I don't have access to anything one would consider 
administrative (i.e. Admin Console, etc.), but to get Struts and the 
Struts-example app working, I am not sure you need it. I believe all you 
have to do is create a project in WebSphere to import the example into. 

In WebSphere:
1. Select File, new, Project, web project, ... to create a new project.
2. Select File, Import, War file, ... to put the .war file into your new 
project.

I have imported a number of sample examples, as well have recently 
upgraded to the latest build of Struts for my development without any 
trouble, and without the use of Admin Console. As I said, I am not an 
Administrator, and perhaps there is in fact more that needs to be done 
that I don't know about, in which case I apologize in advance, but thought 
I'd let you know of my experience anyway.

Susan Bradeen





"jzakarian" <[EMAIL PROTECTED]>
11/13/2002 12:00 PM
Please respond to "Struts Users Mailing List"

 
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc: 
Subject:RE: How to input


Hi Vicky,

I don't have an answer for your question but one of my own. I have just
started using WebSphere 4.0.x and want to use struts. I copy the
struts-example.war to the installableApps directory and then use the
Administrative Console to install it.  It says that it is installed and
started but I can't get the index.jsp to display in my browser. 

How are you installing struts?

Thanks,

Jack 

-Original Message-
From: Vicky Yue [mailto:piggynews@;hotmail.com] 
Sent: Wednesday, November 13, 2002 11:52 AM
To: [EMAIL PROTECTED]
Subject: How to input

Hi

I'm using WebSphere 4.0.x & Struts 1.0.2 for my development.
I want to input utf-8 characters from JSP and get the result from
server.
Anyone know how to configure WebSphere to accept correct characters?

Thanks,
Vicky



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





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




Re: Why is this code (drawing a box) extremely slow with netscape-4.79?

2002-11-13 Thread Kevin . Bedell



This is an issue in Netscape 4.x. It just renders nested tables slowly.
Another issue might be errors in the html - sometimes IE will blow through
mismatched tags with no issue while Netscape 4.x drags.

The latest Netscape - fortunately - doesn't seem to have these issues.

The only way to speed it up is to simplify the table structure and if
posible minimize the level of nesting.  Or making sure you don't have
mismatched tags or other html errors.

Instead of a table in a table in a table, can you get away with a table in
a table? :--)

Kevin

http://www.strutskickstart.com






Zsolt Koppany <[EMAIL PROTECTED]> on 11/13/2002 04:53:59 PM

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

To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Why is this code (drawing a box) extremely slow with
   netscape-4.79?


Hi,

the code below draws a box around a table. It works fine with IE, Mozilla
and
Netscape-4.79. However the code is extremely slow with netscape-4.79. Do
you
know why and how can I fix it?

Zsolt




 
 
  
  

   
  
  
   
  

  
    <%=request.getAttribute("box.footer")%>
  

  
 
 





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







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---



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




Why is this code (drawing a box) extremely slow with netscape-4.79?

2002-11-13 Thread Zsolt Koppany
Hi,

the code below draws a box around a table. It works fine with IE, Mozilla and 
Netscape-4.79. However the code is extremely slow with netscape-4.79. Do you 
know why and how can I fix it?

Zsolt
















 <%=request.getAttribute("box.footer")%>










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




Seeking multiple files upload action source

2002-11-13 Thread Dan Tran
Hi, I would like to write web page to upload multiples file to the server.
I think I known how to set upthe jsp and action form.  However, I have a
hard time accepting
the strutsupload action example from 1.1 distribution where it manualy read
binary data from the request


//write the file to the file specified

OutputStream bos = new FileOutputStream(theForm.getFilePath());

int bytesRead = 0;

byte[] buffer = new byte[8192];

while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {

bos.write(buffer, 0, bytesRead);

}

bos.close();

data = "The file has been written to \"" + theForm.getFilePath() + "\"";



Is there a better automation way?

Sorry if this question is trivial.

-Dan

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




Re: SSL and Struts

2002-11-13 Thread Laurie Dickinson
Thanks.

The problem was with the server configuration.  The sourceforge tag helped 
with the diagnosis.

At 01:41 PM 11/13/2002 -0500, Robert Leland wrote:
Laurie Dickinson wrote:


Dear All,

My first posting.  I'm having some difficulty using SSL with struts.
Here's some background (with dummy names):


There is a struts tag on sourceforge.net that lets you switch back and 
forth between ssl and no ssl.
Maybe it can give you some hints ?

-Rob



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


*--*
Laurie Dickinson
Only Connect
2104 Third St. N.E.
Minneapolis, MN 55418
(612) 987-4089
[EMAIL PROTECTED]
*--*


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




Problem with Global Forwards when using Scaffold FindForwardAction

2002-11-13 Thread Steve_Akins
Hi all,

Was wondering if anyone has used FindForwardAction successfully with global
forwards?

I can't see how the current version can work, even if the commented code is
uncommented.

Any ideas?


Steve Akins
Team Leader, Frameworks, J2EE Engineering
Development Centre
Financial Services Australia Technology


( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]


National Australia Bank Limited
4th Floor/ 500 Bourke St
Melbourne, Victoria 3000
__
The information contained in this email communication may be confidential.
You
should only read, disclose, re-transmit, copy, distribute, act in reliance
on or
commercialise the information if you are authorised to do so. If you are
not the
intended recipient of this email communication, please notify us
immediately by
email to [EMAIL PROTECTED] or reply by email direct to the sender
and then destroy any electronic or paper copy of this message.  Any views
expressed in this email communication are those of the individual sender,
except
where the sender specifically states them to be the views of a member of
the
National Australia Bank Group of companies.  The National Australia Bank
Group
of companies does not represent, warrant or guarantee that the integrity of
this
communication has been maintained nor that the communication is free of
errors,
virus or interference.


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




Re: two variables in an action

2002-11-13 Thread Robert
To remove your address from future mailings, click here 
 to send an 
email and unsubscribe


Nope, it would be:

/newBalanceSheetGroup.do?action=pre&type=TypeA

which is the standard HTTP format. The first parameter is prefixed with 
a '?' character and each succesive one by a '&' character

Robert

Gus Delgado wrote:

is this the right way to put to variables in the jsp in an action

/newBalanceSheetGroup.do?action=pre,?type=TypeA

thanks


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






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




Re: two variables in an action

2002-11-13 Thread David Graham
/newBalanceSheetGroup.do?action=pre&type=TypeA







From: Gus Delgado <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: two variables in an action
Date: Wed, 13 Nov 2002 15:56:17 -0500

is this the right way to put to variables in the jsp in an action

/newBalanceSheetGroup.do?action=pre,?type=TypeA

thanks


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



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


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



two variables in an action

2002-11-13 Thread Gus Delgado
is this the right way to put to variables in the jsp in an action

/newBalanceSheetGroup.do?action=pre,?type=TypeA

thanks


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




Re: jsp:setProperty

2002-11-13 Thread Kris Schneider
Wendy,

If you're already playing around with this stuff, this may be old news. Just 
thought I'd add a couple of bits for posterity:

ServletRequest.getParameterMap does not appear to work for post requests (it 
returns an empty Map), only get requests (at least with Tomcat 4.1.14).

RequestUtils.populate requires the bean to be an instance of 
org.apache.struts.action.ActionForm for post requests. In addition, it looks 
like it requires that post requests pass through the Struts servlet (otherwise 
it throws an NPE).

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> Right, BeanUtils.populate doesn't know anything about the world of servlets,
> so 
> it won't be of any help when parsing the request params.
> 
> Just a note that Struts also works with Servlet 2.2 containers, which predate
> 
> the availability of ServletRequest.getParameterMap.
> 
> Quoting Wendy Cameron <[EMAIL PROTECTED]>:
> 
> > Yes this is better, I was looking at much older JSP docs.
> > 
> > I think the functionality differences between
> ServletRequest.getParameterMap
> > and RequestUtils.populate could be multipart form content and file
> > updloading.
> > 
> > I had a look at the source and it seemed to handle multipart requests as
> > well
> > as standard ones.
> > 
> > I dont think bean utils would do this?
> > 
> > Regards Wendy
> > 
> > > -Original Message-
> > > From: Kris Schneider [mailto:kris@;dotech.com]
> > > Sent: Wednesday, November 13, 2002 3:21 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: jsp:setProperty
> > > 
> > > 
> > > Good call - but perhaps javax.servlet.ServletRequest.getParameterMap 
> > > would be better? HttpUtils is deprecated in Servlet 2.3. I'm 
> > > not really 
> > > sure what the functionality differences are betweem using 
> > > ServletRequest.getParameterMap and RequestUtils.populate...
> > > 
> > > Wendy Cameron wrote:
> > > > Isnt the conversion a simple matter of 
> > > > 
> > > > HashTable tbl = 
> > > javax.servlet.http.HttpUtils.parsePostData(int len, 
> > > ServletInputStream in)
> > > > Map map = new HashMap(tbl);
> > > > 
> > > > Only thin i am unsure about is the length parameter.
> > > > 
> > > > Regards Wendy
> > > > 
> > > > 
> > > >>-Original Message-
> > > >>From: Kris Schneider [mailto:kris@;dotech.com]
> > > >>Sent: Wednesday, November 13, 2002 1:40 PM
> > > >>To: Struts Users Mailing List
> > > >>Subject: Re: jsp:setProperty
> > > >>
> > > >>
> > > >>commons-beanutils.jar is part of the Struts 1.1 distribution. 
> > > >>It's also 
> > > >>an entirely independent Jakarta Commons component. I still 
> > > think you 
> > > >>should really check out the 
> > > >>org.apache.struts.util.RequestUtils.populate 
> > > >>method. Otherwise, you'll have to do the work of converting 
> > > >>the request 
> > > >>params into a Map that can be used by BeanUtils.populate.
> > > >>
> > > >>Wendy Cameron wrote:
> > > >>
> > > >>>Sorry but just let me get this clear in my head.
> > > >>>
> > > >>>There are BeanUtils class in commons.beanutils package.
> > > >>>This is not part of the struts distribution? Separate package?
> > > >>>So is it part of the latest tomcat distribution? (I think I 
> > > >>
> > > >>recall seeing
> > > >>
> > > >>>a commons jar file in the tomcat area)
> > > >>>
> > > >>>Regards Wendy
> > > >>>
> > > >>>
> > > -Original Message-
> > > From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> > > Sent: Wednesday, November 13, 2002 12:30 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: jsp:setProperty
> > > 
> > > 
> > > 
> > > 
> > > On Wed, 13 Nov 2002, Wendy Cameron wrote:
> > > 
> > > 
> > > 
> > > >Date: Wed, 13 Nov 2002 12:09:01 +1000
> > > >From: Wendy Cameron <[EMAIL PROTECTED]>
> > > >Reply-To: Struts Users Mailing List 
> > > 
> > > >><[EMAIL PROTECTED]>
> > > >>
> > > >To: "Struts Users Mailing List (E-mail)" 
> > > 
> > > <[EMAIL PROTECTED]>
> > > 
> > > >Subject: jsp:setProperty
> > > >
> > > >Hello All,
> > > >
> > > >This is probably not the best forum, but I was wondering if 
> > > 
> > > anyone new how to, do the equivalent of
> > > 
> > > 
> > > >jsp:setProperty "*" in a servlet
> > > >
> > > >Or is this not possible?
> > > >
> > > 
> > > Actually it is, and it's the basic reason that the BeanUtils 
> > > classes were
> > > created in the first place.  See the 
> > > BeanUtils.copyProperties() and
> > > BeanUtils.populate() methods -- Struts actually uses the 
> > > latter when it
> > > populates your form bean properties for you.  Javadocs are at:
> > > 
> > >  http://jakarta.apache.org/commons/beanutils/api/
> > > 
> > > 
> > > 
> > > >Regards Wendy
> > > >
> > > 
> > > Craig
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > > >>>
> > > >>>

Re: Getting corrupted files using multipart and FormFile .

2002-11-13 Thread Martin Cooper


On Wed, 13 Nov 2002, Hugo Villeneuve wrote:

>  Hello,
>
> I have some corrupted file problem with Struts, in upload and in download.
>
> 1- Upload :  I use the FormFile object and the  tag to import
> file from the client browser. Things works just fine with almost every files
> but I have hit some files ( like tiff and pdf) that get corrupted after the
> upload. The files are the same size but the checksum is different (tiff
> reader and Adobe can not read the files after upload). Why I say it is
> struts and not Tomcat : I did a test in the same Struts Action but using a
> packages form Oreilly to parse multipart request. The file gets uploaded
> correctly using Oreilly stuff. Any comments will be welcome.

These types of problems have been fixed for Struts 1.1, using a new file
upload implementation. I would strongly recommend that you pick up 1.1-b2
or a later nightly build.

 >
>
> 2- Dowload : I have a Struts Action that send files to the client browser.
> Avery thing works just fine but “once in a while” the client will get a
> corrupted PDF. We know the problem is not with the pdf but during the
> transfer of the file. It could be Struts, Tomcat or Adobe (I know the
> Acrobat Reader ActiveX is in charge of downloading the PDF on the client
> side). Can Struts be the problem ?

I think it's very unlikely that Struts is involved in this in any way.
Your action, remember, is what is sending the file to the client, not
Struts code. It's much more likely that your action has a problem, perhaps
related to using a writer which will transform the content, or specifying
an incorrect content type for the download.

--
Martin Cooper


>
> Any discussion will be welcome.
>
> My System:
> - Win NT
> - Tomcat 3.2
> - Struts 1.0
> - JDK 1.2
>
> Thank you.
> Hugo
>


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




Re: Re: user manually changing local

2002-11-13 Thread Brian Hickey
Marcus,

What datatype does getLocal() return?

I would likely write:

SetLocalForm myForm = (SetLocalForm)form

first and then:

String localString = myForm.getLocal();

or:

String localString = myForm.getLocal().toString();

It may not execute and differently, but it keeps the cast separate and
clear.

HTH

Brian


- Original Message -
From: "Marcus Biel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 6:25 AM
Subject: OT: Re: user manually changing local


> ARG! What the hell is wrong here ???
> import java.util.Locale;
> import java.lang.*;
> import java.sql.*;
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
>
> public class SetLocalAction extends Action {
> public ActionForward perform(ActionMapping mapping,
> ActionForm form, HttpServletRequest request, HttpServletResponse
> response){
>
>   String localString = (SetLocalForm)form.getLocal();
>
>   Locale local = new java.util.Local(localString, localString);
> request.getSession().setAttribute(Action.LOCALE_KEY, local);
> return mapping.findForward("setLocalActionDone");
>}
> }
>
> Got a SetLocalForm.class that has got the method getLocal() so it should
> be working.
>
> But when I try to compile the Action, I get:
>
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : class SetLocalForm
> location: class SetLocalAction
>   String localString = (SetLocalForm)form.getLocal();
> ^
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : method getLocal  ()
> location: class org.apache.struts.action.ActionForm
>   String localString = (SetLocalForm)form.getLocal();
>  ^
> SetLocalAction.java:14: cannot resolve symbol
> symbol  : class Local
> location: package util
>   Locale local = new java.util.Local(localString, localString);
>   ^
> 3 errors
>
>
> Damn! Thats frustrating!
>
> marcus
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: OT: Re: user manually changing local

2002-11-13 Thread Gemes Tibor
2002-11-13, sze keltezéssel Marcus Biel ezt írta:
> ARG! What the hell is wrong here ???
> import java.util.Locale;
> import java.lang.*;
> import java.sql.*;
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
> 
> public class SetLocalAction extends Action {
>   public ActionForward perform(ActionMapping mapping,
>   ActionForm form, HttpServletRequest request, HttpServletResponse
> response){
> 
>   String localString = (SetLocalForm)form.getLocal();

String localString = ((full.package.to.SetLocalForm)form).getLocal();

> 
>   Locale local = new java.util.Local(localString, localString);

Locale local = new Locale(localString, localString);

>   request.getSession().setAttribute(Action.LOCALE_KEY, local);
>   return mapping.findForward("setLocalActionDone");
>}
> }

Maybe you should try some java IDE, as they would highlight the classes
not imported, mistyped, and support you with popups with the method
names. 

Hth,

Tib


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




RE: Re: user manually changing local

2002-11-13 Thread Karr, David
You have several problems, none of which have anything to do with
Struts.

First, your "SetLocalForm" class appears to be not defined.  I would
guess it's not in the same package as your "SetLocalAction" class.

Second, you can't do:

  String localString = (SetLocalForm)form.getLocal();

Because the "ActionForm" class does not have a "getLocal()" method.

Most likely, you would have something like this:

  SetLocalForm setLocalForm = (SetLocalForm) form;
  String localString = setLocalForm.getLocal();

Third, there is no "java.util.Local" class.  Are all of these "Local"s
supposed to be "Locale"s?  If so, you have several name changes you need
to make.

> -Original Message-
> From: Marcus Biel [mailto:Marcus.Biel@;bmw.de]
> Sent: Wednesday, November 13, 2002 3:26 AM
> To: [EMAIL PROTECTED]
> Subject: OT: Re: user manually changing local
> 
> 
> ARG! What the hell is wrong here ???
> import java.util.Locale;
> import java.lang.*;
> import java.sql.*;
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
> 
> public class SetLocalAction extends Action {
>   public ActionForward perform(ActionMapping mapping,
>   ActionForm form, HttpServletRequest request, HttpServletResponse
> response){
> 
>   String localString = (SetLocalForm)form.getLocal();
> 
>   Locale local = new java.util.Local(localString, localString);
>   request.getSession().setAttribute(Action.LOCALE_KEY, local);
>   return mapping.findForward("setLocalActionDone");
>}
> }
> 
> Got a SetLocalForm.class that has got the method getLocal() 
> so it should
> be working.
> 
> But when I try to compile the Action, I get:
> 
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : class SetLocalForm
> location: class SetLocalAction
>   String localString = (SetLocalForm)form.getLocal();
> ^
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : method getLocal  ()
> location: class org.apache.struts.action.ActionForm
>   String localString = (SetLocalForm)form.getLocal();
>  ^
> SetLocalAction.java:14: cannot resolve symbol
> symbol  : class Local
> location: package util
>   Locale local = new java.util.Local(localString, localString);
>   ^
> 3 errors
> 
> 
> Damn! Thats frustrating!
> 
> marcus
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




RE: user manually changing local

2002-11-13 Thread Sri Sankaran
Intermixed...

> -Original Message-
> From: Marcus Biel [mailto:Marcus.Biel@;bmw.de] 
> Sent: Wednesday, November 13, 2002 6:26 AM
> To: [EMAIL PROTECTED]
> Subject: OT: user manually changing local
> 
> 
> ARG! What the hell is wrong here ???
> import java.util.Locale;
> import java.lang.*;
> import java.sql.*;
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
> 
> public class SetLocalAction extends Action {
>   public ActionForward perform(ActionMapping mapping,
>   ActionForm form, HttpServletRequest request, 
> HttpServletResponse response){
> 
>   String localString = (SetLocalForm)form.getLocal();

Should be 
  String localString = ((SetLocalForm)form).getLocal();

> 
>   Locale local = new java.util.Local(localString, localString);
>   request.getSession().setAttribute(Action.LOCALE_KEY, local);
>   return mapping.findForward("setLocalActionDone");
>}
> }
> 
> Got a SetLocalForm.class that has got the method getLocal() 
> so it should be working.
> 
> But when I try to compile the Action, I get:
> 
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : class SetLocalForm
> location: class SetLocalAction
>   String localString = (SetLocalForm)form.getLocal();
> ^

Is the SetLocalForm class visitble to SetLocalAction; is it in the same package or do 
you have the appropriate import statement?


> SetLocalAction.java:12: cannot resolve symbol
> symbol  : method getLocal  ()
> location: class org.apache.struts.action.ActionForm
>   String localString = (SetLocalForm)form.getLocal();
> 

See above code fix.
 ^
> SetLocalAction.java:14: cannot resolve symbol
> symbol  : class Local
> location: package util
>   Locale local = new java.util.Local(localString, localString);

Should be 
  Locale local = new java.util.Locale(localString, localString);

Note the 'e' in Locale.
>   ^
> 3 errors
> 
> 
> Damn! Thats frustrating!
> 
> marcus

Sri

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

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




Re: OT: Re: user manually changing local

2002-11-13 Thread David Graham
You have mispelled Locale.  Any IDE will pick up this error for you.

David







From: Marcus Biel <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: OT: Re: user manually changing local
Date: Wed, 13 Nov 2002 12:25:44 +0100

ARG! What the hell is wrong here ???
import java.util.Locale;
import java.lang.*;
import java.sql.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;

public class SetLocalAction extends Action {
	public ActionForward perform(ActionMapping mapping,
	ActionForm form, HttpServletRequest request, HttpServletResponse
response){

  String localString = (SetLocalForm)form.getLocal();

  Locale local = new java.util.Local(localString, localString);
	request.getSession().setAttribute(Action.LOCALE_KEY, local);
	return mapping.findForward("setLocalActionDone");
   }
}

Got a SetLocalForm.class that has got the method getLocal() so it should
be working.

But when I try to compile the Action, I get:

SetLocalAction.java:12: cannot resolve symbol
symbol  : class SetLocalForm
location: class SetLocalAction
  String localString = (SetLocalForm)form.getLocal();
^
SetLocalAction.java:12: cannot resolve symbol
symbol  : method getLocal  ()
location: class org.apache.struts.action.ActionForm
  String localString = (SetLocalForm)form.getLocal();
 ^
SetLocalAction.java:14: cannot resolve symbol
symbol  : class Local
location: package util
  Locale local = new java.util.Local(localString, localString);
  ^
3 errors


Damn! Thats frustrating!

marcus

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



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


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



OT: Re: user manually changing local

2002-11-13 Thread Marcus Biel
ARG! What the hell is wrong here ???
import java.util.Locale;
import java.lang.*;
import java.sql.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;

public class SetLocalAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response){

  String localString = (SetLocalForm)form.getLocal();

  Locale local = new java.util.Local(localString, localString);
request.getSession().setAttribute(Action.LOCALE_KEY, local);
return mapping.findForward("setLocalActionDone");
   }
}

Got a SetLocalForm.class that has got the method getLocal() so it should
be working.

But when I try to compile the Action, I get:

SetLocalAction.java:12: cannot resolve symbol
symbol  : class SetLocalForm
location: class SetLocalAction
  String localString = (SetLocalForm)form.getLocal();
^
SetLocalAction.java:12: cannot resolve symbol
symbol  : method getLocal  ()
location: class org.apache.struts.action.ActionForm
  String localString = (SetLocalForm)form.getLocal();
 ^
SetLocalAction.java:14: cannot resolve symbol
symbol  : class Local
location: package util
  Locale local = new java.util.Local(localString, localString);
  ^
3 errors


Damn! Thats frustrating!

marcus

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




Getting corrupted files using multipart and FormFile .

2002-11-13 Thread Hugo Villeneuve
 Hello,

I have some corrupted file problem with Struts, in upload and in download.

1- Upload :  I use the FormFile object and the  tag to import
file from the client browser. Things works just fine with almost every files
but I have hit some files ( like tiff and pdf) that get corrupted after the
upload. The files are the same size but the checksum is different (tiff
reader and Adobe can not read the files after upload). Why I say it is
struts and not Tomcat : I did a test in the same Struts Action but using a
packages form Oreilly to parse multipart request. The file gets uploaded
correctly using Oreilly stuff. Any comments will be welcome.


2- Dowload : I have a Struts Action that send files to the client browser.
Avery thing works just fine but “once in a while” the client will get a
corrupted PDF. We know the problem is not with the pdf but during the
transfer of the file. It could be Struts, Tomcat or Adobe (I know the
Acrobat Reader ActiveX is in charge of downloading the PDF on the client
side). Can Struts be the problem ?

Any discussion will be welcome.

My System:
- Win NT
- Tomcat 3.2
- Struts 1.0
- JDK 1.2

Thank you.
Hugo



RE: [OT] Where can I find a Struts / J2EE Jobs?

2002-11-13 Thread Haseltine, Celeste
Khalid, 

I am assuming by across the Atlantic you are referring to the United States.

The job market/outlook in the US for high tech/software/hardware is still
pretty poor.  There are some pockets where jobs can be found in the US, but
overall, our unemployment rate nationally is still sitting just under 7%,
with some harder hit local areas, such as Dallas, TX, sitting closer to 8%.
That doesn't sound high until you take into consideration before the high
tech job fallout in 2000, our unemployment rate was below 3%.

Also, unless you are currently a green card holder or US citizen, you would
need to find an employer to sponsor you for an H1-B visa, which is the US
equivalent of a work permit.  It's not something you can obtain yourself,
you must have an employer who has agreed to hire you apply for you.  Right
now, few US employers are sponsoring H1-B visa applicants, due to both the
higher unemployment rate, and the legal requirements an employer is required
to comply with to demonstrate that no US citizen was qualified/available for
the position.  And that is not taking into account the heightened
sensitivity many companies have to bringing non-US citizens into the US
after the events of Sept 11, 2001. 

I guess things are pretty slow no matter where you reside now.  I understand
Japan's high tech area has also been hard hit, along with most of Europe.

Celeste 

-Original Message-
From: Khalid Aslan [mailto:sheik_ya_bootie@;yahoo.co.uk]
Sent: Wednesday, November 13, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: [OT] Where can I find a Struts / J2EE Jobs?


Hi y'all

My name is Khalid. I was made redundant a couple weeks
ago in London. I was working for a big
investment bank. I was kinda looking for leads
to work in London, or elsewhere in Europe maybe.

I did so me Struts development several months ago
for a client and want to get back to server side
Java work. I had being working with Swing 
client side work. It is really pretty slow in
the UK right now, it is not a great look, but
I'm still hanging out here hoping on a rope.

How is the Struts Job market holding up in
across the atlantic? Is Cali still in the bottom 
slopes? Or is the East Coast the best place to be?

rgds
/Khalid/


__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Problem with using Vector?

2002-11-13 Thread shakeel . mahate


Hi Jana,

The iterate tag gets one element from your collection and id is used to
uniquely name that element

Change your iterate tag id="viewListingElement"

-Shakeel




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




Re: Problem with using Vector?

2002-11-13 Thread Brian Hickey
Jana,

I think I see part of the problem. Here is some further info:



-- When you use type="com.ViewListingBean"... do you have a class named
ViewListingBean that has a 'package com' directive at the top? If so - good.
If not - that needs to be corrected.

-- The "id" in the usebean tag refers to the exact name of the bean your
action class placed into request/session scope.

-- The logic:iterate should look like..


-- Then you can use tags nested in the iterate as:



You are correct - JSP/Struts will not allow redefinition of beans with the
same name in the same page/template/tile.

HTH

Brian



- Original Message -
From: "Jana Navaneethan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:20 PM
Subject: Re: Problem with  using Vector?


> Hi Brian,
>Thanks for your help I appreciate it. Actually I have a
> ViewListingBean which represents the Object in the listingsSummary Vector.
> In my JSP, I have already defined bean like this
> 
>
> When I try to use same id "viewListing" in my iterate tag it complains
about
> the id been already defined?
> I need to use the "viewListing" bean id for displaying some other
properties
> in my JSP page. Now how do I define my id in iterate tag? which
reperesents
> the same bean.
>
> Actual error message is
> No bean found under attribute key viewListingBean
>
> Thanks,
> Jana.
>
> - Original Message -
> From: "Brian Hickey" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 12:45 PM
> Subject: Re: Problem with  using Vector?
>
>
> > Jana,
> >
> > It would help to see the actual error.
> >
> > More below...
> > > Hi,
> > >I have a Vector in my form bean which contains multiple
Objects,
> I
> > > want to loop through the contents of this Vector in my JSP page, I
have
> a
> > > getListingsSummary() method in my form bean which is viewListingForm,
> But
> > > for some reason when I call my JSP it throws some exception like
> > > No bean found under attribute key viewListingBean
> > >
> > > Here is my iterate tag
> > >  > > property="listingsSummary">
> >
> > This says you have a bean named "ViewListingForm" that has some scope
> > (request/session) in your JSP. Also that you will refer to that items in
> the
> > property collection in "listingsSummary" by the scripting variable
> > "ViewListingBean". The property accesses the collection (List/Vector)
you
> > want by calling the form getter for "listingsSummary".
> >
> > To be thorough, you will need to include the "type" attribute to
identify
> > the object type that will be found in the collection "listingsSummary".
It
> > looks like type="java.util.Vector".
> >
> > >
> > > Here is my form Bean
> > >
> > >public Vector getListingsSummary()
> > >{
> > >   return(this.listingsSummary);
> > >}
> > >
> > > public void setListingsSummary(Vector listingsSummary)
> > >{
> > >   this.listingsSummary = listingsSummary;
> > >}
> > >
> >
> > The getter will be called by the iterate tag for "listingsSummary" and
you
> > have the case correct.
> >
> > >
> > > My Action class sets the form bean before forwarding to the JSP page..
> > >
> > > ViewListingForm listingform = (ViewListingForm) form;
> > > listingform.setListingsSummary(listingsSummary);
> > >
> > >
> > > BTW what is this id means in the iterate tag? Any help would be
greatly
> > > appreciated!
> >
> > Always check the Javadoc (start at: http://jakarta.apache.org/struts/ ).
> The
> > "id" attribute names the scripting variable you will use within the
> iterate
> > tag. In other words, each object contained in the Vector
"listingsSummary"
> > will be referred to as "ViewListingBean".
> >
> > So you can now use ViewListingBean to access the individual properties
of
> > the objects in your listingsSummary. For example  > name="ViewListingBean" property="someProperty"/>
> >
> > >
> > > Thanks in advance,
> > > Jana.
> > >
> > >
> > >
> > > --
> > > 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: 




Dynamic html:img parameters

2002-11-13 Thread Alex Vollmer
I know that this question has come up on the list
(http://www.mail-archive.com/struts-user@;jakarta.apache.org/msg33402.html), but I 
didn't see a very good answer for it.

What I want to do is build a template that has an image in it. The URL
for the image needs to be dynamically defined by another page. The
problem is that I can't figure out how to get both the context-sensitive
URL rewriting that the  tag uses with the attribute access
power of the 'tiles' tags. Any ideas?

Consider this brief (and contrived) example:


<%@ taglib prefix="tiles" uri="/WEB-INF/tiles.tld"%>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"%>

 <%-- What do I put here? --%>




<%@ taglib prefix="tiles" uri="/WEB-INF/tiles.tld"%>

Hello










I saw the follow-up
(http://www.mail-archive.com/struts-user@;jakarta.apache.org/msg33601.html) to the 
original posting suggesting doing something like:



The problem is that if I do this I've lost the URL re-writing power that I would 
get with the  tag. Is there a way that I can compute the context-sensitive
URL in the client page and pass that value as a template attribute?

Thanks in advance!

-- 
Alex Vollmer <[EMAIL PROTECTED]>
Logical


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




RE: 2D Collection and nested:iterate

2002-11-13 Thread Louis Leung
Thx Aaron.  That solution works great for displaying the data.  However,
Struts will not know how to populate the List back when the data is
received from the user, since the Indices cannot be set in that access
wrapper object. 



-Original Message-
From: Arron Bates [mailto:struts-user@;keyboardmonkey.com] 
Sent: Wednesday, November 13, 2002 7:31 AM
To: Struts Users Mailing List
Subject: RE: 2D Collection and nested:iterate

> Thanks for the reply, appreciate it.  From what I understand, I have
to
> do something like :
> 
> firstList  --eachElementIs-->  simpleBean  --contains-->  secondList
> 
> In other words, wrap the 2nd list inside a bean.  However, if that's
the
> cast, I would imagine it will drag down the performance of our
> application by quite a bit due to Objects instantiation.  (the 2D
> collection get used a lot and the collections are quite large).  Is
> there anyway around it so that I can still use the original data
> structure ?
> 
> Again, thanks for the input.  :)


If performance is that much of an issue, I'd square up the use of the
lists. If it's all random acces (like accessing through the BeanUtils
system) then ArrayLists are sweet, but if your processing is running
through linearly then the LinkedList is the better bet. Just thought I'd
mention it.


As for the problem at hand... there's not all that much you can do
really. One option, if you know that the model is thread safe (like,
only one user will be on it at a time ie: request scope/everything but
application scope), then you can "fake" it by making a bean that turns
in on itself. By this I mean to make a bean that holds these
multi-dimensioned arrays and takes note of the indexes requested.
When the child array is sought after, return a reference to itself
noting the index. The child index will come in, do the same, store the
index and then return the same object. Throw in an extra stage (using
the nested:property tag to put in a "fake" level). We know that when
this is called it needs a real object, from which you can offer up the
multi-dimmed object.

eg:...


private int parentIndex;
private int childIndex;
private ArrayList myData;

public Object getParentList(int i) {
  this.parentIndex = i;
  return this;
}

public Object getChildList(int i) {
  this.childIndex = i;
  return this;
}

public Object getFakeProperty() {
  return ((ArrayList)myData.get(parentIndex)).get(childIndex);
}



...catch my drift?

I've done a fake properties like this, and they work sweet. I haven't
done it for two sequential lists, but the theory is sound. It's the fake
property brings it all back together telling the object that it has to
pull its finger out and actually fetch the object you're after.
The above will remove the overhead of all the object creation.

It has to be thread safe because if another thread gets in there
inbetween a thread reading the first index and the second, it'll all be
out of whack. If the list is build for a particular user, there
shouldn't be any issues.

...explanation fuzzy at all?...

outside of this, there's no option that comes to mind.
Note: if you want to access a property of the object of the first list
(the bean theoretically holding the other list), you'll have to make
another fake property to identify you want that object.

eg:

public Object getFirstLevelFake() {
  return (ArrayList)myData.get(parentIndex);
}


...outside of all the stuff spieled on above, ie: once you've broken
through that second list or have reference to the parent list object,
you can keep nesting as usual.

Hopefully I've said all that clear enough for you to move forward :)


Arron.


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Parameter

2002-11-13 Thread Gemes Tibor
2002-11-13, sze keltezéssel Cohan, Sean ezt írta:
> Right now, I trying request.setAttribute("method",
> "getChangesSinceLastCertified") just before forwarding, but I'm getting a 
> "HTTP Status 400 - Request[/recertify] does not contain handler parameter
> named method".  

You can get it with request.getAttribute("method") in the other action. 

Hth,

Tib


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




Re: Problem with using Vector?

2002-11-13 Thread Brian Hickey
Jana,

It would help to see the actual error.

More below...
> Hi,
>I have a Vector in my form bean which contains multiple Objects, I
> want to loop through the contents of this Vector in my JSP page, I have a
> getListingsSummary() method in my form bean which is viewListingForm, But
> for some reason when I call my JSP it throws some exception like
> No bean found under attribute key viewListingBean
>
> Here is my iterate tag
>  property="listingsSummary">

This says you have a bean named "ViewListingForm" that has some scope
(request/session) in your JSP. Also that you will refer to that items in the
property collection in "listingsSummary" by the scripting variable
"ViewListingBean". The property accesses the collection (List/Vector) you
want by calling the form getter for "listingsSummary".

To be thorough, you will need to include the "type" attribute to identify
the object type that will be found in the collection "listingsSummary". It
looks like type="java.util.Vector".

>
> Here is my form Bean
>
>public Vector getListingsSummary()
>{
>   return(this.listingsSummary);
>}
>
> public void setListingsSummary(Vector listingsSummary)
>{
>   this.listingsSummary = listingsSummary;
>}
>

The getter will be called by the iterate tag for "listingsSummary" and you
have the case correct.

>
> My Action class sets the form bean before forwarding to the JSP page..
>
> ViewListingForm listingform = (ViewListingForm) form;
> listingform.setListingsSummary(listingsSummary);
>
>
> BTW what is this id means in the iterate tag? Any help would be greatly
> appreciated!

Always check the Javadoc (start at: http://jakarta.apache.org/struts/ ). The
"id" attribute names the scripting variable you will use within the iterate
tag. In other words, each object contained in the Vector "listingsSummary"
will be referred to as "ViewListingBean".

So you can now use ViewListingBean to access the individual properties of
the objects in your listingsSummary. For example 

>
> Thanks in advance,
> Jana.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Parameter

2002-11-13 Thread Cohan, Sean
I'm in one action class and I'm want to forward to another DispatchAction
class.  The second DispatchAction class requires a 'method' parameter which
is used to determine which method to call within the DispatchAction.  How
can I set the method parameter in the first action class so it can be used
by the DispatchAction?  

Right now, I trying request.setAttribute("method",
"getChangesSinceLastCertified") just before forwarding, but I'm getting a 
"HTTP Status 400 - Request[/recertify] does not contain handler parameter
named method".  

Thanks.


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




RE: Problem with using Vector?

2002-11-13 Thread Sri Sankaran
Make sure that your action is persisting the form bean in the manner that it is 
expected on the calling page (this is defined by the action mapping).  

Pay close attention to the name under which you save it.  If your action mapping names 
the bean 'fooBean' and it is under request scope, you must have

  request.setAttribute("fooBean", listingform)

In your case, your JSP is referring to the form bean under the name 'viewListingForm'; 
make sure that this jives with config settings.

The id attribute has a reference to the current item in the iteration.  For more 
details on the logic:iterate please look at 
http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate


Finally, 
Sri 

-Original Message-
From: Jana Navaneethan [mailto:jana.navaneethan@;labs.gte.com] 
Sent: Wednesday, November 13, 2002 11:55 AM
To: [EMAIL PROTECTED]
Subject: Problem with  using Vector?


Hi,
   I have a Vector in my form bean which contains multiple Objects, I want to loop 
through the contents of this Vector in my JSP page, I have a
getListingsSummary() method in my form bean which is viewListingForm, But for some 
reason when I call my JSP it throws some exception like No bean found under attribute 
key viewListingBean

Here is my iterate tag


Here is my form Bean

   public Vector getListingsSummary()
   {
  return(this.listingsSummary);
   }

public void setListingsSummary(Vector listingsSummary)
   {
  this.listingsSummary = listingsSummary;
   }


My Action class sets the form bean before forwarding to the JSP page..

ViewListingForm listingform = (ViewListingForm) form; 
listingform.setListingsSummary(listingsSummary);


BTW what is this id means in the iterate tag? Any help would be greatly appreciated!

Thanks in advance,
Jana.



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


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




SSL and Struts

2002-11-13 Thread Laurie Dickinson
Dear All,

My first posting.  I'm having some difficulty using SSL with 
struts.  Here's some background (with dummy names):

Running tomcat4.1 integrated with apache on a Linux box
Regular server = tcs.xxx.com
Secure server = secure.xxx.com
These are the same server, just different names.
When I go to https://secure.xxx.com/appname/filename.jsp the secure 
connection works just fine.
When I go to https://secure.xxx.com/appname/actionname.do I get a 404 error.
When I go to http://secure.xxx.com/appname/actionname.do it works just 
fine.  (Alternately, http://tcs.xxx.com/appname/actionname.do works also.)

From what little I've read, ssl should work "transparently."  I'm not sure 
if I'm just doing something wrong or if this is a configuration error.

Thanks for any help.

Best,

Laurie


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



Re: Problem with using Vector?

2002-11-13 Thread C. Struts
id is the name of the localized object.  In the example below localName is
yourBean.yourVector which you'll use inside the iterate tags.


  
  
  ...


-c

- Original Message -
From: "Jana Navaneethan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 11:55 AM
Subject: Problem with  using Vector?


> Hi,
>I have a Vector in my form bean which contains multiple Objects, I
> want to loop through the contents of this Vector in my JSP page, I have a
> getListingsSummary() method in my form bean which is viewListingForm, But
> for some reason when I call my JSP it throws some exception like
> No bean found under attribute key viewListingBean
>
> Here is my iterate tag
>  property="listingsSummary">
>
> Here is my form Bean
>
>public Vector getListingsSummary()
>{
>   return(this.listingsSummary);
>}
>
> public void setListingsSummary(Vector listingsSummary)
>{
>   this.listingsSummary = listingsSummary;
>}
>
>
> My Action class sets the form bean before forwarding to the JSP page..
>
> ViewListingForm listingform = (ViewListingForm) form;
> listingform.setListingsSummary(listingsSummary);
>
>
> BTW what is this id means in the iterate tag? Any help would be greatly
> appreciated!
>
> Thanks in advance,
> Jana.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: StrutsTestCase & Struts Initialization

2002-11-13 Thread Kevin . Bedell




> Hi All,
>
> I now have my StrutsTestCase's running. But I want to decorate them using
> JUnitPerf. The problem is that each time I invoke the StrutsTestCase
> perforAction() method Struts appears to re-initialize. This overhead
> detracts from the value of the load/stress tests performed by JUnitPerf.
>
> Is it possible to tell StrutsTestCase to initialize Struts once only?
>

No. This is due to the underlying JUnit design goal of having each test be
completely isolated. StrutsTestCase creates all mock objects from scratch
in the setUp() that is run from each test - this cannot be overriden in an
elegant way.

There were a couple messages on this yesterday. They addressed some ideas
for designing tests that invoke multiple Actions in a single test - search
the mail archives for strutstestcase using yesterday's date and you'll see
them.

Here's a link to an article on JUnit 'best practices'. In it, there is some
discussion on the value in keeping all tests isolated from each other. Look
for the section titled: "Avoid writing test cases with side effects".

  http://www.javaworld.com/javaworld/jw-12-2000/jw-1221-junit.html

Best of luck,

Kevin

http://www.strutskickstart.com




---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---



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




RE: How to input

2002-11-13 Thread jzakarian
Hi Vicky,

I don't have an answer for your question but one of my own. I have just
started using WebSphere 4.0.x and want to use struts. I copy the
struts-example.war to the installableApps directory and then use the
Administrative Console to install it.  It says that it is installed and
started but I can't get the index.jsp to display in my browser.  

How are you installing struts?

Thanks,

Jack 

-Original Message-
From: Vicky Yue [mailto:piggynews@;hotmail.com] 
Sent: Wednesday, November 13, 2002 11:52 AM
To: [EMAIL PROTECTED]
Subject: How to input

Hi

I'm using WebSphere 4.0.x & Struts 1.0.2 for my development.
I want to input utf-8 characters from JSP and get the result from
server.
Anyone know how to configure WebSphere to accept correct characters?

Thanks,
Vicky



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




Problem with using Vector?

2002-11-13 Thread Jana Navaneethan
Hi,
   I have a Vector in my form bean which contains multiple Objects, I
want to loop through the contents of this Vector in my JSP page, I have a
getListingsSummary() method in my form bean which is viewListingForm, But
for some reason when I call my JSP it throws some exception like
No bean found under attribute key viewListingBean

Here is my iterate tag


Here is my form Bean

   public Vector getListingsSummary()
   {
  return(this.listingsSummary);
   }

public void setListingsSummary(Vector listingsSummary)
   {
  this.listingsSummary = listingsSummary;
   }


My Action class sets the form bean before forwarding to the JSP page..

ViewListingForm listingform = (ViewListingForm) form;
listingform.setListingsSummary(listingsSummary);


BTW what is this id means in the iterate tag? Any help would be greatly
appreciated!

Thanks in advance,
Jana.



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




StrutsTestCase & Struts Initialization

2002-11-13 Thread Jon.Ridgway
Hi All,

I now have my StrutsTestCase's running. But I want to decorate them using
JUnitPerf. The problem is that each time I invoke the StrutsTestCase
perforAction() method Struts appears to re-initialize. This overhead
detracts from the value of the load/stress tests performed by JUnitPerf.

Is it possible to tell StrutsTestCase to initialize Struts once only?

Jon Ridgway




The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

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




How to input

2002-11-13 Thread Vicky Yue
Hi

I'm using WebSphere 4.0.x & Struts 1.0.2 for my development.
I want to input utf-8 characters from JSP and get the result from server.
Anyone know how to configure WebSphere to accept correct characters?

Thanks,
Vicky



RE: Action takes long time to complete

2002-11-13 Thread Trieu, Danny
Have your action forward to a JSP page that in the end of the JSP it render
a JavaScript that will do the submit to the action that take long time to
finish.  Usually the JSP that render the javaScript will have some sort
flash images that the user look at while waiting for the action complete it
processing...

-Original Message-
From: David Bolsover [mailto:david@;bolsover.com] 
Sent: Wednesday, November 13, 2002 5:05 AM
To: [EMAIL PROTECTED]
Subject: Action takes long time to complete


Hi all

I have an action that takes a very long time to complete.

Advice please - how do I forward to a new page before the tasks the action
has started have completed?

db


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Help: validation and dyna beans, data disappears

2002-11-13 Thread Drew Zimber

All,

Hello.  Im currently working on a small application where I am researching
the use of the DynaBeans and XML Validation functionality within struts 1.1.
Both technologies are quite impressive and I have them working well with one
caveat;  allow me to explain via senario:


Right now, my test dyna form contains a few collections of static data (for
combo boxes) and a few fields.  One of the fields is set up for the
"required" and "integer" validations.

Everything appears to be configured properly and it on error it works as it
should, except for the fact that the form resets to the default values and
hence, the static data disappears.

Yes, I am aware that Collections are techinically not supported by dyna
beans.  Alternatively, I was putting the Collections directly into the
request as well, and logically they also disappear.


So:  I guess what im looking for advice/suggestions/takes on this delimna
before I revert back to traditional forms.  Thank you for your time!!!


Regards,
Drew Zimber


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




RE: Map iterate problem

2002-11-13 Thread Sukhenko, Mikhail (Contr)
your MultiMap class does not have getKey() method which  translates to.



-Original Message-
From: Mark Ayad [mailto:mark@;javamark.com]
Sent: Tuesday, November 12, 2002 10:18 AM
To: Struts Users Mailing List
Subject: Map iterate problem


I have a Map which I place into the Application Context using the following
line in a plugin init:

servlet.getServletContext().setAttribute("mm", new MultiMap());

The map is:

public class MultiMap
{
 public Map values = new HashMap();
 
public void setValue(String key, Object value) {
values.put(key, value);
}

public Object getValue(String key) {
return values.get(key);
}

public MultiMap()
{   
 values.put("foo","bar");
 
 values.put("you","me");
}

public Map getMap()
{
 return values ;
}
}

In the JSP I try to iterate over this map using (which doesn't throw any
exceptions):

 
 

However When I try to use 



I get:

javax.servlet.jsp.JspException: No getter method for property key of bean
mm

What am I missing ?




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




Re: Some thing like

2002-11-13 Thread Gemes Tibor
2002. november 13. 15:59 dátummal Reza Aliakbari ezt írtad:
> Hi,
>  
> I need a class that get my form object and another object and then set
> similar property of the form
> Object to the second object.
> This what mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: 




Some thing like

2002-11-13 Thread Reza Aliakbari
Hi,
 
I need a class that get my form object and another object and then set
similar property of the form
Object to the second object.
This what 


Re: user manually changing local

2002-11-13 Thread David Graham
I posted a tag that does this to bugzilla here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12648

I think the source is in the jar so feel free to hack it to suit your needs.

David







From: Marcus Biel <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: user manually changing local
Date: Wed, 13 Nov 2002 10:31:32 +0100

I want to give the user the ability to manually change the language of
the aplication by selecting a local value from a selectbox.

Has someone got an appropiate example to achieve this ?


thx in advance,

marcus

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



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


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



Re: Form validation

2002-11-13 Thread matthew yee-king
this page has links to several tutorials:

http://jakarta.apache.org/struts/resources/tutorials.html

cheers

matthew

On Wed, 13 Nov 2002 14:07:52 +0100
"Jordan Thomas" <[EMAIL PROTECTED]> wrote:

> Hi,
>  
> I am wanting to do a step by step, wizard style interface. Does anyone
> know of a good tutorial for this?
>  
> thanks
>  
> Jordan
>  
> 
> Jordan Thomas
> Fraunhofer-Institut fuer Produktionstechnik und Automatisierung
> (FhG-IPA)
> 
> Nobelstrasse 12 
> D-70569 Stuttgart
> 
> Tel.: +49 (0) 711-970-1187
> Fax:  +49 (0) 711-970-97-1187
> Handi:+49 (0) 150-554-76776
> 
> E-mail:   [EMAIL PROTECTED]
> Web:    http://www.ipa.fhg.de
>  
> 
>  
> 


-- 

Unix is user friendly. It's just very particular about who it's friends
are.

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




Action takes long time to complete

2002-11-13 Thread David Bolsover
Hi all

I have an action that takes a very long time to complete.

Advice please - how do I forward to a new page before the tasks the action has
started have completed?

db


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




Re: Validator Problem

2002-11-13 Thread Andreas Langmann
> dynamicJavascript="false"

generates dynamic javascript specially for a specified formName
!this generated code needs the general javascript

> staticJavascript="true"

generates general javascript (functions for the generated code)

so you can generate in every page the dynamic code and the general code
only in one page.
(dont forget to include the general code - jsp-page into every page.

-- 
Dipl. Ing. (BA) Andreas Langmann
Software Developer

ISB AG 
Karlstr. 52-54   
76133 Karlsruhe

Telefon: +49 (0)721/82800-0
Telefax: +49 (0)721/82800-82

Email: [EMAIL PROTECTED]
Internet: http://www.isb-ag.de

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




Form validation

2002-11-13 Thread Jordan Thomas
Hi,
 
I am wanting to do a step by step, wizard style interface. Does anyone
know of a good tutorial for this?
 
thanks
 
Jordan
 

Jordan Thomas
Fraunhofer-Institut fuer Produktionstechnik und Automatisierung
(FhG-IPA)

Nobelstrasse 12 
D-70569 Stuttgart

Tel.: +49 (0) 711-970-1187
Fax:  +49 (0) 711-970-97-1187
Handi:+49 (0) 150-554-76776

E-mail:   [EMAIL PROTECTED]
Web:    http://www.ipa.fhg.de
 

 



Re: user manually changing local

2002-11-13 Thread Marcus Biel
Thanks everyone!
Finally it works!

marcus

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




Re: Simulating Client field prompting

2002-11-13 Thread Susan Bradeen
Hi Jon, thanks for your reply. Please see below ...

On 11/13/2002 05:06:50 AM "Jon Ferguson" wrote:

> Hi Susan,
> 
> I've got a similar situation and originally wanted to minimise 
JavaScript..
> I do it 2 ways:
> 1) Ed Hill's display tag (kewl) will easily allow pagination of long
> lists so I built a tile.. and inserted my list into the same page.. I 
can

I am also using the Display tags in this app. Do you mean "tile" as in 
Struts Tiles?
I was told just yesterday to start looking into using Tiles.

> then use his decorators to create selection links in the resulting table 
to
> select any item to insert into my selected list.. again on the same 
page..
> again using the Display tag.
> 2) I also use state management to enable me to swap back and forth
> between a long list and a detail of an item on that list.. I just 
create
> the appropriate buttons on each page to jump back and forth and manage 
state
> in my server.  I don't use popups at all..  Now Because I'm dealing with 
a

Inexperience talking here ... how do you manage state in the server? Is 
this saving form values in the session? 

> database search here.. it's possible to get really long lists... and
> dragging all that back is not scalable.  Soo.. I've recently gone back 
to
> using the pager-tag and yet more state-management (and the LIMIT tag on 
the
> database) to allow me to set up all the page numbers but only drag back 
the
> data for the current page.. as the user traverses through the pages.. 
each
> gets cached so going back is much quicker - and I believe the whole 
thing
> becomes scalable.
> 
> Having said all this.. I'm finding that it's really hard to write a
> compelling web-app without some Java-Script.  So I'm planning on just
> supporting the main 2 browsers.

Yes, I think JavaScript is basically unavoidable in a lot of cases.

> 
> Hope this helps.

Helps a lot.

> 
> Jon
> 
> Architect/Developer Omega Software Ltd.

Thanks again.
Susan

> 
> - Original Message -
> From: "Susan Bradeen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 12, 2002 7:23 PM
> Subject: Simulating Client field prompting
> 
> 
> > I have a few fields in some JSPs that will need to provide 
"client/server
> > type field prompting" (user double-clicks on a field to open a 
selection
> > window). In reviewing the Struts docs and archives, it appears that 
there
> > is no "Struts-specific" functionality for this, and I noticed that 
other
> > people have used JavaScript pop-up windows in similar situations. 
Although
> > I've used pop-ups before, I am not confident they *will* be 
cross-browser
> > compatible, which is important in this application, so I am shying 
away
> > from using them this time. Unfortunately, I cannot use Struts
> > selection/drop boxes for these fields, since my list of selections is
> > quite large (user name lists, etc).
> >
> > I am wondering ... has anyone has come up with a different (less
> > JavaScript) approach to making a field value selection from another 
list?
> >
> > Thanks for any ideas,
> > Susan Bradeen
> >
> > --
> > 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: Client-side Caching???

2002-11-13 Thread eelco . klaver

Hi Jon,

I implemented similar functionality with Struts 1.0.2 (i.e. without tiles).
For all tabs together, each containing their own html form fields, I used
one form object that was stored in the session. Furthermore, I created an
action to which the currently visible html form was posted when changing
tabs. This way, it is also possible to validate the input of the current
tab when switching tabs and if the validation doesn't succeed, refuse to
switch to the next tab. The action will furthermore only cause the form
fields in the session form object to be updated, without really applying
the changes (e.g. update to the database). Finally, one apply button, will
apply the changes on the form object at once.

The most important difference with your setup, is that changing tabs causes
the visible tab to be submitted to a ChangeTab action.

Regards, Eelco



   

  "Jon Ferguson"   

  <[EMAIL PROTECTED]>  To:  "Struts Users Mailing List" 
<[EMAIL PROTECTED]>   
   cc: 

  13-11-2002 10:48 Subject: Re: Client-side Caching??? 

  Please respond to "Jon   

  Ferguson"

   

   




Hi Eelco,

I'm using tiles to create tabbed panes: | A | B  C | etc...

The user can select any pane to view other aspects of the application..
much
like you would do in swing.  SO the traversing IS inside the application.
Also I put an Apply button on each page then store the page state in a
session on the server.  So the following works flawlessly:

1)user edits A
2)user applies A (changes are viewed)
3)user selects the B tab - showing the B page
4)user selects the A tab - showing the changed A page.

But because nothing happens on the server without the apply.. the scenario
does Not work if you leave out step 2.

A software engineer wouldn't expect it too.. but a user would - especially
coming from using a GUI app.

The nature of the program requires as few clicks as possible.. and a lot of
information.. It's not really a workflow that I can see cause It's not
sequential..

The only way I can see solving this is to use JavaScript to capture edited
but un-applied form data behind the scenes.  Or reworking the application
in
someway to enforce the apply.

The former feels like an enhancement on the Struts form tags.. which I'm
willing to investigate if I'm not barking up the wrong tree!

Cheers,
Jon
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 9:06 AM
Subject: RE: Client-side Caching???


>
> Jon,
>
> How does the client jump to page B? If this is done outside the scope of
> your application (e.g. by selecting a bookmark) there is really not much
> that can be done about it (I wouldn't speak about an HTML limitation, but
> rather about a user limitation). If it's done inside the scope of your
> application (e.g. a button, tab or link you provided), you could easily
> submit the form to the server (without really applying the changes) and
> keep the form in your session, for the next time the client selects page
A.
>
> Regards, Eelco
>
>
>
>
>
>   "James Mitchell"
>   <[EMAIL PROTECTED]>  To:  "Jon Ferguson"
<[EMAIL PROTECTED]>
>cc:  "Struts Users
Mailing List" <[EMAIL PROTECTED]>
>   11-11-2002 13:19 Subject: RE: Client-side
Caching???
>   Please respond to
>   "Struts Users Mailing
>   List"
>
>
>
>
>
> Hi Jon,
>
> This really belongs on the struts-users mailing list.  If you are not
> already subscribed, you should do so.  I'm sending a copy there for
further
> discussion.
>
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen
> or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
> > -Original Message-
> > From: Jon Ferguson [mailto:ferguson@;ieee.org]
> > Sent: Monday, November 11, 2002 6:46 AM
> > T

  1   2   >