Another problem about unicode in struts

2002-11-12 Thread Huynh Ngoc Huy
  Hi all,
  I can't display the unicode-string correctly in
 tag. In the  tag, if I
didn't set filter to false, it was also been in the
same problem. But the  has no filter
property, so what should I do to solve this problem?
  Any solution, please!
  Thanks in advanced
  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: How to to a OR with logic tags

2002-11-12 Thread Richard Yee
Charles,
I'd suggest checking out the conditional tags in the JSTL to do the OR 
operation rather than using the Struts logic tag. You will find that the 
JSTL expression capability and if, choose, when, and otherwise tags make it 
easier to do complex logic than the struts conditional tags do.

Regards,

Richard

At 11:01 AM 11/13/2002 -0800, you wrote:
Hi I'm still quite new with Struts. I want to do a OR comparison using the
tags. Does anyone has any idea how this can be done? -- To unsubscribe, 
e-mail: For additional commands, e-mail:



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




RE: How to find whether the file dowload is successful?

2002-11-12 Thread Xu Haojun-a18535
Hello,

I figure out the reason: the servlet does not return actually, but blocks there!
When the browser side ((IE) cancels the download,  it doesnt close the TCP 
connection. Because the servletoutputstream.write is done by 
socket.getOutputStream().write(), so for some reason(probably socket io 
implementation), the calling thread blocks there, feels like it doesnt know the client 
has stopped accepting any more data.   Only after I close the browser,  write() throws 
an IOException . Then I catch that, then my code goes on.

   To solve this, I know it is possible to create a new class combining a 
servletoutputStream and a timer, and provide a new method like 
write(byte[] bytes, int timeout),  so that I count the timeout myself. But I dont 
think it is a good idea.
   Does anybody have other ideas?

  Thanks

Haojun
   
  




-Original Message-
From: Xu Haojun-a18535 
Sent: Tuesday, November 12, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: How to find whether the file dowload is successful?


Hello,

Typically, the download code is like:  
" ServletOutputStream out = response.getXXX(); 
  byte[] binArray = readFileToBinaryArray(fileName); 
  response.setXXX(...); 
   ... 
  out.write(binArray); 
  out.flush(); "

But how can I know if the user has downloaded the file 
successfully, since he may cancel the download before it
is finished? For example, by clicking the "cancel" button 
in the download progress window at browser side. 

I have tried  
" try { 
   out.write(binArray); 
   out.flush(); 
  } catch (IOException ie) {
    
  } 

But it doesnt work! When I click "cancel" in the browser 
side, it seems the whole servlet just returns, it doenst even go 
foward to excute the remaining code! And nothing is thrown
either! I dont know if this is a bug or I did something wrong.

I am now using Tomcat4.X

Any help is appreicated!
Haojun

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




Upload more than one file in a form

2002-11-12 Thread Alireza Fattahi
Hi,

There is a form which has more than one file for upload. We have a Form bean
associated with the html form. It has : 

  protected FormFile tenderFile[];


 public void setTenderFile(FormFile[] tenderFile) {
   this.tenderFile = tenderFile;
}

But we get the error from BeanUtils.populate. It works when we use only one
file upload and remove the FormFile array
 
Alireza.

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




RE: jsp:setProperty

2002-11-12 Thread Wendy Cameron
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:   
> >>>
> >>>
> >>>For additional commands, e-mail: 
> >>
> > 
> > 
> >>
> >>--
> >>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: How do I split struts-config.xml without using subapps

2002-11-12 Thread Christopher Cheng
Thanks, let me try it out.

- Original Message -
From: "Derek Lin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
"Christopher Cheng" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 3:35 AM
Subject: Re: How do I split struts-config.xml without using subapps


> I am doing exactly that:
>
>"-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";[
> 
> 
> ]>
> 
> 
>   &datasources;
> 
> 
>
> The key is to use the  tag. " "struts-datasources-config.xml">"
>
> Hope this helps.
>
> -- Derek
>
> - Original Message -
> From: "Christopher Cheng" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 12, 2002 11:31 AM
> Subject: How do I split struts-config.xml without using subapps
>
>
> My struts-config.xml is getting very long. Is it possible to split that
into
> multiple files without using subapps?
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Re: How do I split struts-config.xml without using subapps

2002-11-12 Thread Christopher Cheng
Hopefully 1.1 release or 1.2 would have it

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 4:51 AM
Subject: Re: How do I split struts-config.xml without using subapps


> There was some discussion about possibly implementing this so that all
> configs worked the same (you can do this for tiles/validator).  Nothing
> has been implemented yet though (that I am aware of).  ... and they are
> called modules :-)  We sent many emails over the dev list to standardize
> on that one ;-)  Modules :-)
>
> Christopher Cheng wrote:
>
> >My struts-config.xml is getting very long. Is it possible to split that
into multiple files without using subapps?
> >
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Re: How do I split struts-config.xml without using subapps

2002-11-12 Thread Christopher Cheng
I am already using Struts Console from James Holmes. Still, I think it is
painful to manage a xml file of 3000 lines long.

- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 3:36 AM
Subject: RE: How do I split struts-config.xml without using subapps


I don't believe so.  One approach that might help is to use the Struts
Console application, which lets you get the "big picture" without having to
see the entire file at once.

> -Original Message-
> From: Christopher Cheng [mailto:mailing-list@;chrisshare.net]
>
> My struts-config.xml is getting very long. Is it possible to
> split that into multiple files without using subapps?
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: jsp:setProperty

2002-11-12 Thread Kris Schneider
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:   


For additional commands, e-mail: 






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





--
Kris Schneider 
D.O.Tech   


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




Change the validation in the action bean

2002-11-12 Thread Alireza Fattahi
Hi,

We use the validation frame work and set all form validations in
validation.xml. We want to know if we can change the "depends" value in the
action form.

Here is validation.xml:

  
  


   pattern
   /MM/dd
 
  

We want to change the "depends" value from "DateValidation" to some thing
else.
I think that the struts loads the validation.xml into memory and use it. How
can I access and change this object? 

Alireza



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




Re: special character

2002-11-12 Thread Amit Badheka
Thank u all for reply.
It works fine.

- Original Message -
From: "Xavier Combelle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 6:30 PM
Subject: RE: special character


> just set the filter atttribute of bean:write tag at false
> as it is explained at the address
> http://jakarta.apache.org/struts/userGuide/struts-bean.html#write
>
> Xavier
>
>
> > -Message d'origine-
> > De : Amit Badheka [mailto:amit@;direct2s.com]
> > Envoyé : mardi 12 novembre 2002 13:49
> > À : Struts Users Mailing List
> > Objet : special character
> >
> >
> > I want to show the currency symbols, I am using bean:write but it
> > is not displaying symbol.
> >
> > I have bean:write as -
> >
> > 
> >
> > the value store in DB is " € "  when we put this string
> > directly it gets converted, but when I puts bean:write it prints
> > the value as it is.
> > (in view source it looks like "€ ")
> >
> > please help.
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




RE: jsp:setProperty

2002-11-12 Thread Wendy Cameron
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:   
> > 
> > 
> > For additional commands, e-mail: 

> 
> 
> --
> 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-12 Thread Kris Schneider
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:   


For additional commands, e-mail: 


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


--
Kris Schneider 
D.O.Tech   


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




How to to a OR with logic tags

2002-11-12 Thread Charles
Hi I'm still quite new with Struts. I want to do a OR comparison using the
 tags. Does anyone has any idea how this can be done?



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




RE: jsp:setProperty

2002-11-12 Thread Wendy Cameron
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:   

For additional commands, e-mail: 


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




Re: jsp:setProperty

2002-11-12 Thread Craig R. McClanahan


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:   
For additional commands, e-mail: 




Re: jsp:setProperty

2002-11-12 Thread Kris Schneider
RequestUtils.populate(Object bean, HttpServletRequest request)

Wendy Cameron wrote:

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?

Regards Wendy

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


--
Kris Schneider 
D.O.Tech   


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




jsp:setProperty

2002-11-12 Thread Wendy Cameron
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?

Regards Wendy

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




Re: Validator and nightly build

2002-11-12 Thread Martin Cooper


On Tue, 12 Nov 2002, Fabrice BLANQUART wrote:

> Hi ,
>
> I try to work with the last nightly build (2002) and validator.
>
> Having some problems getting the dtd from the web I try to get it locally.
>
> Then I discover a strange thing.
>
> In the commons-validator.jar , the dtd "validator_1_0.dtd" is in the path 
>"/org/apache/commons/validator/resources"
> and in the source code of "ValidatorResourcesInitializer.java" , the register path 
>is "/org/apache/commons/resources/validator_1_0.dtd".
>
> I found a Workaround in generating another commons-validator.jar with the correct 
>path.
>
> May be a bug ?

Yes, this is a bug. I just checked in the fix, so it should be available
in tonight's nightly build.

FYI, since Validator is a Commons component, it would be better to use
the commons-dev or commons-user mailing list for Validator issues.

--
Martin Cooper


>
> Fabrice BLANQUART
>
>
>
>
> *---*
> * Cet e-mail et toutes les pièces jointes sont destinés aux *
> * seules personnes auxquelles ils sont spécifiquement adressés  *
> * et n'engagent que le signataire de ces documents et non la*
> * structure dont il dépend. *
> * Leur existence et leur contenu ont un caractère confidentiel. *
> * Toute utilisation ou diffusion non autorisée est interdite.   *
> * Si vous avez reçu cet  e-mail ou si vous détenez sans en être *
> * le destinataire, nous vous demandons de bien vouloir nous en  *
> * informer immédiatement.   *
> * Cette note assure que mimesweeper a vérifié que ce message*
> * ne comprenait aucun virus connu à ce jour, néanmoins tout *
> * message électronique est susceptible d'altération.*
> * Nous déclinons toute responsabilité au titre de ce message*
> * s'il a étéaltéré, déformé ou falsifié.*
> *---*
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




Re: example of dyna.....

2002-11-12 Thread Huynh Ngoc Huy
  You can find it at:
"http://www.scioworks.com/camino_doc/manual/Tutorial/HoroscopeIIExample/index.html";
  Bye,
  Huy
--- Sarath Chandra M <[EMAIL PROTECTED]>
wrote:
> Dear group,
> Is there any good resource or site etc., where I can
> find atleast
> 1 proper complete example of the usage of
> DynaActionForm, DynaBean.
> 
> TIA
> sarath
> 
> 
> --
> 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: 




RE: ClientSide Validation Javascript Password field

2002-11-12 Thread Chen, Gin
Following this.. then your validation shouldnt even have a max length.
You should allow unlimited length (albeit unpractical) and require:
min length > 3
at least 1 number/special char
case sensitivity.
or better yet.. dont add password validation and post what you just wrote on
the help. ;)
-Tim

-Original Message-
From: Mark Ayad [mailto:mark@;javamark.com]
Sent: Tuesday, November 12, 2002 8:22 PM
To: Struts Users Mailing List
Subject: Re: ClientSide Validation Javascript Password field


However if you have a min of 10 and a max of 15 then you ensure a key of
length 10-15,

Thinking about it, unless you script alerts the hacker that the password
lenght min is 3 and max is 5 then there not much you can do. Its better to
put the limits higher such a min of 10 and a max of 15, and enforce upper /
lower [strong] .

Anyhow  slightly off-topic:

Key length

In general, the longer the key, the more reliable is the password. Having a
password with 2 characters is as good as using no password. Assuming that
the key space consists of only lowercase alphabets, there are only 26^2
combinations of possible passwords. Therefore, by increasing the number of
characters in a password, it becomes more secure.

Key space

While having a longer password improves security, the quantity of the
character set used is also important. A 10 characters password with its key
space consisting only of lowercase alphabets is less secure than a similar
length password with a key space consisting of both upper and lower case
alphabets.

Therefore, by improving the key space to that consisting of uppercase
alphabets, lowercase alphabets, numeric digits, punctuations and other
symbols, the security of the password increased. The number of possible
passwords is thus Keyspace^Keylength.

How do I make my password more secure?

In general, your password is effective if your make it more expensive in
terms of time and cost a hacker need to spend than the benefits obtainable
from breaking your password. This will definitely discourage attempts to
break your password. General suggestions for a good password are:

Longer length password with 8 or more characters.
Use a good mix of letters, numbers, punctuations and other symbols.
Use both upper and lower case letters.
Don't use popular names or words from any dictionary.
Change your password often and don't reuse old passwords.


Mark

- Original Message -
From: "Mark Ayad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 2:11 AM
Subject: Re: ClientSide Validation Javascript Password field


> Ahh but all it takes is for a crafty hacker to creating their record
you're
> just going to give him the min-max here. So infact you can't keep this a
> secret so whats the point then ?
>
> The problem is just a moving target is it not ?
>
> Mark
>
> - Original Message -
> From: "Karr, David" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 1:56 AM
> Subject: RE: ClientSide Validation Javascript Password field
>
>
> You don't do any formatting validation when they are attempting to
> authenticate, only when they are creating their record.  It's at that
point
> that you enforce password constraints, and you should do that on the
server
> side.
>
> > -Original Message-
> > From: Mark Ayad [mailto:mark@;javamark.com]
> > Sent: Tuesday, November 12, 2002 4:56 PM
> > To: Struts Users Mailing List
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > Martin
> >
> > That being said then the serverside validation shows you what
> > the clientside
> > doesn't
> >
> > But now there is a problem, if you're not validate on min /
> > max length for a
> > password field at all how are we going to enforce strong passwords ?
> >
> > Surely you have to define the keyspace somehow to enforce it ?
> >
> > Mark
> >
> >
> >
> > - Original Message -
> > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 13, 2002 1:34 AM
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > >
> > >
> > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > >
> > > > Well is that expected behaviour is logical ??
> > >
> > > Yes. Did you read the explanation in the bug report I referenced?
> > >
> > > --
> > > Martin Cooper
> > >
> > >
> > > >
> > > > Enforcing length of a password field ?
> > > >
> > > > Or is it that this is best left to be serverside validation ?
> > > >
> > > > Mark
> > > >
> > > > - Original Message -
> > > > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, November 13, 2002 1:25 AM
> > > > Subject: Re: ClientSide Validation Javascript Password field
> > > >
> > > >
> > > > >
> > > > >
> > > > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > > > >
> > > > > > I've noticed that th

Stopping an action

2002-11-12 Thread Alex_Kotchnev
This is not necessarily a Struts problem, but since I am using Struts for 
this.. I was wondering if anyone could give me a hand.. 

How would I stop an action that has already started executing ? In other 
words, say the user started an action, which is fairly long and processor 
intensive. In order to make the app more responsive I just start a 
separate thread to do the work. However, I wonder, how can the user stop 
the thread that was started from executing ? For example, the user selects 
an action, its starts executing (as I mentioned it is quite i/o + 
processor intensive), and the user suddenly realizes that he/she has 
selected the wrong thing... It is not like it is a regular application, 
where they could kill the process on their local machine... 
I was thinking of putting together something like a monitor, that would 
enable the user to kill the job, but it seems kinda crude... Does anyone 
know a good approach to this ? Any hints would be greatly appreciated...

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: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
However if you have a min of 10 and a max of 15 then you ensure a key of
length 10-15,

Thinking about it, unless you script alerts the hacker that the password
lenght min is 3 and max is 5 then there not much you can do. Its better to
put the limits higher such a min of 10 and a max of 15, and enforce upper /
lower [strong] .

Anyhow  slightly off-topic:

Key length

In general, the longer the key, the more reliable is the password. Having a
password with 2 characters is as good as using no password. Assuming that
the key space consists of only lowercase alphabets, there are only 26^2
combinations of possible passwords. Therefore, by increasing the number of
characters in a password, it becomes more secure.

Key space

While having a longer password improves security, the quantity of the
character set used is also important. A 10 characters password with its key
space consisting only of lowercase alphabets is less secure than a similar
length password with a key space consisting of both upper and lower case
alphabets.

Therefore, by improving the key space to that consisting of uppercase
alphabets, lowercase alphabets, numeric digits, punctuations and other
symbols, the security of the password increased. The number of possible
passwords is thus Keyspace^Keylength.

How do I make my password more secure?

In general, your password is effective if your make it more expensive in
terms of time and cost a hacker need to spend than the benefits obtainable
from breaking your password. This will definitely discourage attempts to
break your password. General suggestions for a good password are:

Longer length password with 8 or more characters.
Use a good mix of letters, numbers, punctuations and other symbols.
Use both upper and lower case letters.
Don't use popular names or words from any dictionary.
Change your password often and don't reuse old passwords.


Mark

- Original Message -
From: "Mark Ayad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 2:11 AM
Subject: Re: ClientSide Validation Javascript Password field


> Ahh but all it takes is for a crafty hacker to creating their record
you're
> just going to give him the min-max here. So infact you can't keep this a
> secret so whats the point then ?
>
> The problem is just a moving target is it not ?
>
> Mark
>
> - Original Message -
> From: "Karr, David" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 1:56 AM
> Subject: RE: ClientSide Validation Javascript Password field
>
>
> You don't do any formatting validation when they are attempting to
> authenticate, only when they are creating their record.  It's at that
point
> that you enforce password constraints, and you should do that on the
server
> side.
>
> > -Original Message-
> > From: Mark Ayad [mailto:mark@;javamark.com]
> > Sent: Tuesday, November 12, 2002 4:56 PM
> > To: Struts Users Mailing List
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > Martin
> >
> > That being said then the serverside validation shows you what
> > the clientside
> > doesn't
> >
> > But now there is a problem, if you're not validate on min /
> > max length for a
> > password field at all how are we going to enforce strong passwords ?
> >
> > Surely you have to define the keyspace somehow to enforce it ?
> >
> > Mark
> >
> >
> >
> > - Original Message -
> > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 13, 2002 1:34 AM
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > >
> > >
> > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > >
> > > > Well is that expected behaviour is logical ??
> > >
> > > Yes. Did you read the explanation in the bug report I referenced?
> > >
> > > --
> > > Martin Cooper
> > >
> > >
> > > >
> > > > Enforcing length of a password field ?
> > > >
> > > > Or is it that this is best left to be serverside validation ?
> > > >
> > > > Mark
> > > >
> > > > - Original Message -
> > > > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, November 13, 2002 1:25 AM
> > > > Subject: Re: ClientSide Validation Javascript Password field
> > > >
> > > >
> > > > >
> > > > >
> > > > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > > > >
> > > > > > I've noticed that the alertbox for clientside
> > validation of a simple
> > > > usename / password **never** shows alers for the password field.
> > > > > >
> > > > > > Is this a known issue, or expected behaviour ?
> > > > >
> > > > > It's expected behaviour. See:
> > > > >
> > > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> > > > >
> > > > > --
> > > > > Martin Cooper
> > > > >
> > > > >
> > > > > >
> > > > > > Mark
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > 

Re: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
Ahh but all it takes is for a crafty hacker to creating their record you're
just going to give him the min-max here. So infact you can't keep this a
secret so whats the point then ?

The problem is just a moving target is it not ?

Mark

- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:56 AM
Subject: RE: ClientSide Validation Javascript Password field


You don't do any formatting validation when they are attempting to
authenticate, only when they are creating their record.  It's at that point
that you enforce password constraints, and you should do that on the server
side.

> -Original Message-
> From: Mark Ayad [mailto:mark@;javamark.com]
> Sent: Tuesday, November 12, 2002 4:56 PM
> To: Struts Users Mailing List
> Subject: Re: ClientSide Validation Javascript Password field
>
>
> Martin
>
> That being said then the serverside validation shows you what
> the clientside
> doesn't
>
> But now there is a problem, if you're not validate on min /
> max length for a
> password field at all how are we going to enforce strong passwords ?
>
> Surely you have to define the keyspace somehow to enforce it ?
>
> Mark
>
>
>
> - Original Message -
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 1:34 AM
> Subject: Re: ClientSide Validation Javascript Password field
>
>
> >
> >
> > On Wed, 13 Nov 2002, Mark Ayad wrote:
> >
> > > Well is that expected behaviour is logical ??
> >
> > Yes. Did you read the explanation in the bug report I referenced?
> >
> > --
> > Martin Cooper
> >
> >
> > >
> > > Enforcing length of a password field ?
> > >
> > > Or is it that this is best left to be serverside validation ?
> > >
> > > Mark
> > >
> > > - Original Message -
> > > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, November 13, 2002 1:25 AM
> > > Subject: Re: ClientSide Validation Javascript Password field
> > >
> > >
> > > >
> > > >
> > > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > > >
> > > > > I've noticed that the alertbox for clientside
> validation of a simple
> > > usename / password **never** shows alers for the password field.
> > > > >
> > > > > Is this a known issue, or expected behaviour ?
> > > >
> > > > It's expected behaviour. See:
> > > >
> > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> > > >
> > > > --
> > > > Martin Cooper
> > > >
> > > >
> > > > >
> > > > > Mark
> > > > >
> > > >
> > > >
> > > > --
> > > > 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:


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: File Upload : Progress Bar

2002-11-12 Thread John Jones
You might just want to use a small applet(I believe the graphics code is
already out there somewhere) and set up a servlet or jsp to check the file
size against the Content-Length of the multipart POST (this may be a little
off) and return the percentage to the applet so it can move the progress bar
accordingly.

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 8:45 AM
Subject: Re: File Upload : Progress Bar


> I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)
>
> Going to try it...
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




DBCP borrowObject failed

2002-11-12 Thread Axel Stahlhut
Hi.
I'm having a problem with the Commons-Pool. Using Struts NightlyBuild from
2002-11-11, I have a DataSource configured in my struts-config:

 
   
   
   
   
   
   
   
   
  

I am able to access 3 times, update a result set. After that I get the
following exception:

java.lang.NullPointerException
   at com.mysql.jdbc.Connection.execSQL(Unknown Source)
   at com.mysql.jdbc.Connection.execSQL(Unknown Source)
   at com.mysql.jdbc.Connection.setAutoCommit(Unknown Source)
   at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:237)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.activateObject(PoolableCon
nectionFactory.java:273)
   at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown
Source)
   at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:117)
...

On the commandline i have the following output: DBCP borrowObject failed
Does anybody know, what is happening? Any help is appreciated.

Axel





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




RE: ClientSide Validation Javascript Password field

2002-11-12 Thread Karr, David
You don't do any formatting validation when they are attempting to authenticate, only 
when they are creating their record.  It's at that point that you enforce password 
constraints, and you should do that on the server side.

> -Original Message-
> From: Mark Ayad [mailto:mark@;javamark.com]
> Sent: Tuesday, November 12, 2002 4:56 PM
> To: Struts Users Mailing List
> Subject: Re: ClientSide Validation Javascript Password field
> 
> 
> Martin
> 
> That being said then the serverside validation shows you what 
> the clientside
> doesn't
> 
> But now there is a problem, if you're not validate on min / 
> max length for a
> password field at all how are we going to enforce strong passwords ?
> 
> Surely you have to define the keyspace somehow to enforce it ?
> 
> Mark
> 
> 
> 
> - Original Message -
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 1:34 AM
> Subject: Re: ClientSide Validation Javascript Password field
> 
> 
> >
> >
> > On Wed, 13 Nov 2002, Mark Ayad wrote:
> >
> > > Well is that expected behaviour is logical ??
> >
> > Yes. Did you read the explanation in the bug report I referenced?
> >
> > --
> > Martin Cooper
> >
> >
> > >
> > > Enforcing length of a password field ?
> > >
> > > Or is it that this is best left to be serverside validation ?
> > >
> > > Mark
> > >
> > > - Original Message -
> > > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, November 13, 2002 1:25 AM
> > > Subject: Re: ClientSide Validation Javascript Password field
> > >
> > >
> > > >
> > > >
> > > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > > >
> > > > > I've noticed that the alertbox for clientside 
> validation of a simple
> > > usename / password **never** shows alers for the password field.
> > > > >
> > > > > Is this a known issue, or expected behaviour ?
> > > >
> > > > It's expected behaviour. See:
> > > >
> > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> > > >
> > > > --
> > > > Martin Cooper
> > > >
> > > >
> > > > >
> > > > > Mark
> > > > >
> > > >
> > > >
> > > > --
> > > > 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: 

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




Re: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
Martin

That being said then the serverside validation shows you what the clientside
doesn't

But now there is a problem, if you're not validate on min / max length for a
password field at all how are we going to enforce strong passwords ?

Surely you have to define the keyspace somehow to enforce it ?

Mark



- Original Message -
From: "Martin Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:34 AM
Subject: Re: ClientSide Validation Javascript Password field


>
>
> On Wed, 13 Nov 2002, Mark Ayad wrote:
>
> > Well is that expected behaviour is logical ??
>
> Yes. Did you read the explanation in the bug report I referenced?
>
> --
> Martin Cooper
>
>
> >
> > Enforcing length of a password field ?
> >
> > Or is it that this is best left to be serverside validation ?
> >
> > Mark
> >
> > - Original Message -
> > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 13, 2002 1:25 AM
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > >
> > >
> > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > >
> > > > I've noticed that the alertbox for clientside validation of a simple
> > usename / password **never** shows alers for the password field.
> > > >
> > > > Is this a known issue, or expected behaviour ?
> > >
> > > It's expected behaviour. See:
> > >
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> > >
> > > --
> > > Martin Cooper
> > >
> > >
> > > >
> > > > Mark
> > > >
> > >
> > >
> > > --
> > > 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: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
Oh I didn't see that far down - Yep I see the reason for this. Crystal
Clear.

It's 1:45 am in Paris.

Thanks Martin

I'll un-patch my file now. Still at least I could follow the logic of the
javascript.

- Original Message -
From: "Martin Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:34 AM
Subject: Re: ClientSide Validation Javascript Password field


>
>
> On Wed, 13 Nov 2002, Mark Ayad wrote:
>
> > Well is that expected behaviour is logical ??
>
> Yes. Did you read the explanation in the bug report I referenced?
>
> --
> Martin Cooper
>
>
> >
> > Enforcing length of a password field ?
> >
> > Or is it that this is best left to be serverside validation ?
> >
> > Mark
> >
> > - Original Message -
> > From: "Martin Cooper" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 13, 2002 1:25 AM
> > Subject: Re: ClientSide Validation Javascript Password field
> >
> >
> > >
> > >
> > > On Wed, 13 Nov 2002, Mark Ayad wrote:
> > >
> > > > I've noticed that the alertbox for clientside validation of a simple
> > usename / password **never** shows alers for the password field.
> > > >
> > > > Is this a known issue, or expected behaviour ?
> > >
> > > It's expected behaviour. See:
> > >
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> > >
> > > --
> > > Martin Cooper
> > >
> > >
> > > >
> > > > Mark
> > > >
> > >
> > >
> > > --
> > > 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: ClientSide Validation Javascript Password field

2002-11-12 Thread Martin Cooper


On Wed, 13 Nov 2002, Mark Ayad wrote:

> Well is that expected behaviour is logical ??

Yes. Did you read the explanation in the bug report I referenced?

--
Martin Cooper


>
> Enforcing length of a password field ?
>
> Or is it that this is best left to be serverside validation ?
>
> Mark
>
> - Original Message -
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 1:25 AM
> Subject: Re: ClientSide Validation Javascript Password field
>
>
> >
> >
> > On Wed, 13 Nov 2002, Mark Ayad wrote:
> >
> > > I've noticed that the alertbox for clientside validation of a simple
> usename / password **never** shows alers for the password field.
> > >
> > > Is this a known issue, or expected behaviour ?
> >
> > It's expected behaviour. See:
> >
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
> >
> > --
> > Martin Cooper
> >
> >
> > >
> > > Mark
> > >
> >
> >
> > --
> > 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: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
Well is that expected behaviour is logical ??

Enforcing length of a password field ?

Or is it that this is best left to be serverside validation ?

Mark

- Original Message -
From: "Martin Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:25 AM
Subject: Re: ClientSide Validation Javascript Password field


>
>
> On Wed, 13 Nov 2002, Mark Ayad wrote:
>
> > I've noticed that the alertbox for clientside validation of a simple
usename / password **never** shows alers for the password field.
> >
> > Is this a known issue, or expected behaviour ?
>
> It's expected behaviour. See:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=12473
>
> --
> Martin Cooper
>
>
> >
> > Mark
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: ClientSide Validation Javascript Password field

2002-11-12 Thread Martin Cooper


On Wed, 13 Nov 2002, Mark Ayad wrote:

> I've noticed that the alertbox for clientside validation of a simple usename / 
>password **never** shows alers for the password field.
>
> Is this a known issue, or expected behaviour ?

It's expected behaviour. See:

http://issues.apache.org/bugzilla/show_bug.cgi?id=12473

--
Martin Cooper


>
> Mark
>


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




RE: ClientSide Validation Javascript Password field

2002-11-12 Thread Karr, David
I suggest you submit a bug report for this, and attach your patch to the report.

> -Original Message-
> From: Mark Ayad [mailto:mark@;javamark.com]
> Sent: Tuesday, November 12, 2002 4:08 PM
> To: Struts Users Mailing List
> Subject: Re: ClientSide Validation Javascript Password field
> 
> 
> If you turn:
> 
>  maxlength="18"/> password
> 
> into a normal text field then you get a clientside Javascript Alert,
> otherwise for the password type no alert is shown.
> 
>  maxlength="18"/> password
> 
> Ideas ?
> 
> - Original Message -
> From: "Mark Ayad" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 12:49 AM
> Subject: ClientSide Validation Javascript Password field
> 
> 
> I've noticed that the alertbox for clientside validation of a 
> simple usename
> / password **never** shows alers for the password field.
> 
> Is this a known issue, or expected behaviour ?
> 
> Mark
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 

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




Re: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
Solved by adding two lines to the

validator-rules.xml () from the struts-20021112 nightly build.

Added the following line to function validateMinLength

form[oMinLength[x][0]].type == 'password' ||

and also

Added the following line to function validateMaxLength

form[oMaxLength[x][0]].type == 'password' ||



 
 

  


  

 
 

  


- Original Message -
From: "Mark Ayad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:07 AM
Subject: Re: ClientSide Validation Javascript Password field


> If you turn:
>
>  password
>
> into a normal text field then you get a clientside Javascript Alert,
> otherwise for the password type no alert is shown.
>
>  password
>
> Ideas ?
>
> - Original Message -
> From: "Mark Ayad" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 13, 2002 12:49 AM
> Subject: ClientSide Validation Javascript Password field
>
>
> I've noticed that the alertbox for clientside validation of a simple
usename
> / password **never** shows alers for the password field.
>
> Is this a known issue, or expected behaviour ?
>
> Mark
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>
>





   

  

 
 

  

  
  

  

 
 

  


  

 
 

  


  

 
 

  


  

 
 

  


  

 
 

  


  

 
 

  


  


  

 
 

  


  


  

 
 

  


  

 
 

  

  

 
 

  

  

 
 

  

  

 
 

  


  

 
 

  

   




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


Empty Form Beans and Actions

2002-11-12 Thread Max Kremer
Hi,

   How can you tell if an action is called with an empty form bean? For instance, if 
the action is called by entering the URL directly instead of submitting a form then 
the associated form bean should be empty... I think the form bean should even be null 
because it need not be instantiated unless the request for the action comes from the 
appropriate form. When I check in the action if myFormBean == null ... it never is, so 
I'm assuming the Controller servlet always instantiates a formBean when its associated 
action is called... So how can I tell if the formBean is empty? Without having to 
check each parameter of course...

Thanks

Regards,

Max 




Re: ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
If you turn:

 password

into a normal text field then you get a clientside Javascript Alert,
otherwise for the password type no alert is shown.

 password

Ideas ?

- Original Message -
From: "Mark Ayad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 12:49 AM
Subject: ClientSide Validation Javascript Password field


I've noticed that the alertbox for clientside validation of a simple usename
/ password **never** shows alers for the password field.

Is this a known issue, or expected behaviour ?

Mark



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




ClientSide Validation Javascript Password field

2002-11-12 Thread Mark Ayad
I've noticed that the alertbox for clientside validation of a simple usename / 
password **never** shows alers for the password field.

Is this a known issue, or expected behaviour ?

Mark



Re: [OT] posting via news.basebean.com

2002-11-12 Thread Dan Tran
My guess here is news.basebean.com does not forward the news posting to this
mailing list. It only retreived the list for readonly purpose.

So inorder to to do any posting, I have to subscribe to this list again

-Dan

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




Re: [OT] posting via news.basebean.com

2002-11-12 Thread V. Cekvenich
It should work 2 ways and it has been. It is R/W!
But now and then I have technical issues, so now I will check.

.V

Eddie Bush wrote:

Is that forum read/write or read-only?  There is no Struts newsgroup, so 
I'd imagine that's some convenience that Vic has setup for folks.  My 
guess is that the newsgroup is read-only.

Dan Tran wrote:

Hi, I posted some struts questions using usenet forum with
basebean.com  and have no reply from any expert
( and I cant find my question in the archive either)

is basebean.com posting working?

-Dan






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




[ANNOUNCEMENT] Easy Struts 0.6.1 Eclipse plugin

2002-11-12 Thread Emmanuel Boudrant
Hi,

Easy Struts 0.6.1 was just released, all the wizard was refactored, a Struts view was
added and Struts 1.1 modules are supported.


Easy Struts Features :

- Easy Struts plugin can be used with most popular J2EE plugin like
  Sysdeo TomcatResin, Lomboz... (or simply a Java project).

- Provide Struts configuration editor for Struts 1.0 and Struts 1.1 files.

- Now use XSLT generation.

- Provide a global tree view of any Java project with Easy Struts support.

- Full support for Struts 1.1 modules (with 1 last nightly build).

- Tool tips extracted from Struts DTD.

- Input helper (chooser dialog and validation).

- Compatible with IBM WSAD 5


> Install it from update manager : http://easystruts.sourceforge.net/update.html
  or 
> Download it : http://easystruts.sourceforge.net

Enjoy,
-emmanuel


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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




Re: control over the

2002-11-12 Thread Mark Ayad
Logic Development boys I was right ! and I didn't even need to RTFM.

Mark

- Original Message -
From: "Mark Ayad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 12:00 AM
Subject: control over the 


In stead of using  as a bulk tag is it possible to 'place'
individual error messages relating to the property.

 ?


Just a though while I search the tag sytax docs

Mark



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




control over the

2002-11-12 Thread Mark Ayad
In stead of using  as a bulk tag is it possible to 'place' individual 
error messages relating to the property.

 ?


Just a though while I search the tag sytax docs

Mark



RE: 2D Collection and nested:iterate

2002-11-12 Thread Louis Leung
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.  :)



-Original Message-
From: Arron Bates [mailto:struts-user@;keyboardmonkey.com] 
Sent: Tuesday, November 12, 2002 4:51 PM
To: Struts Users Mailing List
Subject: Re: 2D Collection and nested:iterate

The problem is the use of "this/" as the property of the second iterate.
Basically, it's basically saying "don't append anything more to the
property reference, my parent's reference will do".

ie:
you're probably after "myProperty[5][6]"
but the "this/" is telling it to leave it at "myProperty[5]" never
getting that next index.

Truly multi-dimensional workings to the property constructors isn't an
ability of BeanUtils as yet. It's interesting and may work its way into
things in the future, but for now it's not there.

So... what you'll have to do now is make the simplest of beans hold onto
the second ArrayList and access it via a property so it has the full...

firstList[5].secondList[6]

..nested property. The bean doesn't have to do anything special, just
hold onto that array list so BeanUtils can get at the nested bean
properly.


Arron.

On Wed, 2002-11-13 at 08:20, Louis Leung wrote:
> Hi all,
> 
>  
> 
> In my action form there is a 2D collection, both used ArrayList.
(i.e.
> An ArrayList whose elements are ArrayList also)  I want to retrieve
data
> (which are all String) from the 2nd layer of the 2D collection using
>  tag so that it can populate the value back
> automatically.  However, it is not working.
> 
>  
> 
> Code in jsp : 
> 
>  
> 
> 
> 
>  
> 
> 
> 
> 
> 
>  
> 
>  
> 
> <% System.out.println(column); %>
> 
>   indexed="yes"/>   result abit-->
> 
>  
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
> Result (assume a 2X2 collection with elements A1, A2, B1, B2 in them
> already)
> 
>  
> 
> 4 textboxes, the top 2 with [A1, A2] for both, and bottom 2 with [B1,
> B2]
> 
> System.out prints out A1, A2, B1, B2 separately
> 
>  
> 
>  
> 
> It seems like the 2nd iterate tag is indeed iterating thru the 2nd
layer
> of the collection from the System.out statement.  But the  .../> tag is not retrieving each element of the 2nd layer collection.
> Rather, it is using the whole of the 2nd collection itself.
> 
>  
> 
> Anyone has any idea why and possibly solution ?  I would really like
to
> use the  tag so that the values can be automatically
> populated back by Struts after the user input.
> 
>  
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Louis
> 
>  
> 
>  
> 



--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Need scriptlet to substitute bean:message result to a custom tag param value

2002-11-12 Thread Dan Tran
Hi Karr,

It works!!! Thanks

-Dan
- Original Message -
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 1:47 PM
Subject: RE: Need scriptlet to substitute bean:message result to a custom
tag param value


Blank?  I'm surprised it got that far.

You might try something like this (untested):


  
   
  
  
  


> -Original Message-
> From: Dan Tran [mailto:danttran@;hotmail.com]
>
> Hi I try to substitute a result of a bean:message value to
> a tag's param value, but have no luck
>
> Here is  the snippet
>
> 
>   " />  < this returns blank,
> how do I correct
> this?
>   
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Session scope and multiple windows

2002-11-12 Thread Christoph Kulla
Hi,

what happens when the users starts a workflow multiple times in 
different browser windows? For example starting a search process 
multiple times (choosing "Open link in new window"). When you save 
worklfow data in the session the requests will overwrite the data from 
each other.

How do you handle such a situation? Does it make any sense to store 
workflow data directly into the session? Is there a way in struts to 
associate workflow data with a window (for example passing a context id 
between subsequent requests)? As long as one is using forms you could 
use a hidden field to pass a context id. But what about html links?

Regards

Christoph




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



Re: Struts Installation

2002-11-12 Thread Eric Gignac
Thanks. It will help me !


- Original Message -
From: "Ian Vellosa" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 4:59 PM
Subject: RE: Struts Installation


> Hmmm lets see, would this be of any use?
>
> http://jakarta.apache.org/struts/resources/tutorials.html
>
> theserverside.com have just put up an artice too entitled "Fast Track to
> Struts" at:
>
> http://www2.theserverside.com/resources/article.jsp?l=StrutsFastTrack
>
> Have fun boys and girls!
> IV
>
>
>
>
> -Original Message-
> From: Eric Gignac [mailto:egignac@;licef.teluq.uquebec.ca]
> Sent: 12 November 2002 22:46
> To: Struts Users Mailing List
> Subject: Struts Installation
>
>
> Hi
>
> I'm looking for a good tutorial for the installation of Struts.  Any links
?
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: nested:hidden body to set value?

2002-11-12 Thread Arron Bates
This is one of those fun times where I get to say "it's not in the
original tag, therefore it's not in the nested one"... :)

"should the tag body be the value?... yes, probably. But I doubt such
additions will be made to the tags before the next Struts release.


El nested tags... apparently it's a simple addition to the original tags
like the nested addition, only problem would be that it's yet another
library, unless we just leave the functionality in there as a default.

Spare cycles of clustered dead brain cells are also trying to get around
the ability to get a general use of the nesting concept so it can get
into  JSTL or whatever, but it's hard to see a general application.
Anyways, that's another story...


Arron.


On Wed, 2002-11-13 at 06:45, Phase Web and Multimedia wrote:
> I just recently tried to set up a nested:hidden form element (as an
> experiment) to use its body to specify the value of the form element. Of
> course it failed, i assume because this is not possible. Here is an example
> code:
> 
> tag sample:
> It would be cool if this would be the form
> value
> 
> output sample:
> 
> 
> My inquiry is... why isn't this possible? It would be very convenient.
> Especially if i want to populate the value with a dynamic value produced by
> a jstl tag like . Either that or when are nested tags going to be el
> (expression language) enabled. Nested Tags have made my coding dreams come
> true. But el enabled nested tags would be blissful. But please don't forget
> my first question of "Shoudn't the tag body be the form value?".
> 
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



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




Re: StrutsTestCase and sessions

2002-11-12 Thread Chris Winters
On Tue, 2002-11-12 at 16:44, [EMAIL PROTECTED] wrote:
> Gee. I thought I was s smart. Looks like I read it wrong.

I read it that way the first time too, but a little frustrating
experience mixed in with lots trial-and-error goes a long way :-)
 
> Looking things over, I'm sure that the docs are incorrect and not the
> implementation. It's pretty clear that the intent is to reset everything in
> setUp(). It seems like I've read other places that the idea of having each
> test start with a clean slate is one of the design goals behind JUnit.

Me too, but I figured that with fudging statefulness in web applications
I could fudge this too...
 
> One alternative may be to:
> 
>  - create a series of non-test, private methods in the test class.
>  - Have these methods perform each incremental step in the test process.
>  - set up your test methods to then incrementally call one more of the
> private methods.
>
> (nice example snipped)

This seems like a good idea, if a little circuitous. Fortunately every
Action doesn't require this: usually it's only actions that encompass a
multi-step process that requires an ActionForm to live in the session.
And since what goes into the session should be well-defined anyway we
should be able to break it down into steps like you outlined.

> Sorry I couldn't help more!

Pshaw! This has been very helpful. Thanks.

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Java Developer


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




RE: Struts Installation

2002-11-12 Thread Ian Vellosa
Hmmm lets see, would this be of any use?

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

theserverside.com have just put up an artice too entitled "Fast Track to
Struts" at:

http://www2.theserverside.com/resources/article.jsp?l=StrutsFastTrack

Have fun boys and girls!
IV




-Original Message-
From: Eric Gignac [mailto:egignac@;licef.teluq.uquebec.ca]
Sent: 12 November 2002 22:46
To: Struts Users Mailing List
Subject: Struts Installation


Hi

I'm looking for a good tutorial for the installation of Struts.  Any links ?

Thanks


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




Re: 2D Collection and nested:iterate

2002-11-12 Thread Arron Bates
The problem is the use of "this/" as the property of the second iterate.
Basically, it's basically saying "don't append anything more to the
property reference, my parent's reference will do".

ie:
you're probably after "myProperty[5][6]"
but the "this/" is telling it to leave it at "myProperty[5]" never
getting that next index.

Truly multi-dimensional workings to the property constructors isn't an
ability of BeanUtils as yet. It's interesting and may work its way into
things in the future, but for now it's not there.

So... what you'll have to do now is make the simplest of beans hold onto
the second ArrayList and access it via a property so it has the full...

firstList[5].secondList[6]

..nested property. The bean doesn't have to do anything special, just
hold onto that array list so BeanUtils can get at the nested bean
properly.


Arron.

On Wed, 2002-11-13 at 08:20, Louis Leung wrote:
> Hi all,
> 
>  
> 
> In my action form there is a 2D collection, both used ArrayList.  (i.e.
> An ArrayList whose elements are ArrayList also)  I want to retrieve data
> (which are all String) from the 2nd layer of the 2D collection using
>  tag so that it can populate the value back
> automatically.  However, it is not working.
> 
>  
> 
> Code in jsp : 
> 
>  
> 
> 
> 
>  
> 
> 
> 
> 
> 
>  
> 
>  
> 
> <% System.out.println(column); %>
> 
>   indexed="yes"/>   result abit-->
> 
>  
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
> Result (assume a 2X2 collection with elements A1, A2, B1, B2 in them
> already)
> 
>  
> 
> 4 textboxes, the top 2 with [A1, A2] for both, and bottom 2 with [B1,
> B2]
> 
> System.out prints out A1, A2, B1, B2 separately
> 
>  
> 
>  
> 
> It seems like the 2nd iterate tag is indeed iterating thru the 2nd layer
> of the collection from the System.out statement.  But the  .../> tag is not retrieving each element of the 2nd layer collection.
> Rather, it is using the whole of the 2nd collection itself.
> 
>  
> 
> Anyone has any idea why and possibly solution ?  I would really like to
> use the  tag so that the values can be automatically
> populated back by Struts after the user input.
> 
>  
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Louis
> 
>  
> 
>  
> 



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




RE: Struts Installation

2002-11-12 Thread Karr, David
You don't "install" Struts (except for storing the binary distribution on disk), you 
install a web application that uses Struts.  Using Struts in your web application is 
reasonably well-defined in the Struts online documentation.  "Using" it mostly 
consists of putting the "struts.jar" file in the "WEB-INF/lib" directory of your WAR 
file, and configuring the "web.xml" file to use the ActionServlet.

> -Original Message-
> From: Eric Gignac [mailto:egignac@;licef.teluq.uquebec.ca]
> Sent: Tuesday, November 12, 2002 1:46 PM
> To: Struts Users Mailing List
> Subject: Struts Installation
> 
> 
> Hi 
> 
> I'm looking for a good tutorial for the installation of 
> Struts.  Any links ?
> 
> Thanks
> 

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




RE: Need scriptlet to substitute bean:message result to a custom tag param value

2002-11-12 Thread Karr, David
Blank?  I'm surprised it got that far.

You might try something like this (untested):


  
   
  
  
  


> -Original Message-
> From: Dan Tran [mailto:danttran@;hotmail.com]
> 
> Hi I try to substitute a result of a bean:message value to
> a tag's param value, but have no luck
> 
> Here is  the snippet
> 
> 
>   " />  < this returns blank, 
> how do I correct
> this?
>   
> 

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




Re: [OT] posting via news.basebean.com

2002-11-12 Thread Eddie Bush
Is that forum read/write or read-only?  There is no Struts newsgroup, so 
I'd imagine that's some convenience that Vic has setup for folks.  My 
guess is that the newsgroup is read-only.

Dan Tran wrote:

Hi, I posted some struts questions using usenet forum with
basebean.com  and have no reply from any expert
( and I cant find my question in the archive either)

is basebean.com posting working?

-Dan


--
Eddie Bush




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




Re: StrutsTestCase and sessions

2002-11-12 Thread Kevin . Bedell





> >  - You call them one after another and need to maintain session state
> > between tests

> No, multiple methods in the same test class. I totally agree with you
> that different test *classes* can't rely on state being set by another
> class. But AFAICT I should be able to set state within my class without
> any problem.

> > Looking through the strutstestcase MockStrutsTestCase source code, it
looks
> > as if a session is created prior to the first test in the class running
and
> > it lives for all tests. So it should work like this:

> If it did that I'd be happy, but it wasn't. With every call to setUp()
> -- before every single test -- it creates a new request object
> (HttpServletRequestSimulator) . This request object in turn creates a
> new session. So as far as I could see sessions were unusable unless you
> put everything into one test method.

Gee. I thought I was s smart. Looks like I read it wrong.

> > Also, everytime you upgrade your strutstestcase version, you'll have to
> > change this again and recompile. You're not using it as intended.

> Well, I'm using it as documented. The docs and the implementation didn't
> seem to match up. That's why I'd like to see which is incorrect.

Looking things over, I'm sure that the docs are incorrect and not the
implementation. It's pretty clear that the intent is to reset everything in
setUp(). It seems like I've read other places that the idea of having each
test start with a clean slate is one of the design goals behind JUnit.

One alternative may be to:

 - create a series of non-test, private methods in the test class.
 - Have these methods perform each incremental step in the test process.
 - set up your test methods to then incrementally call one more of the
private methods.

For example:

public class TestStrutsExample extends MockStrutsTestCase {

public TestStrutsExample (String testName) { super(testName); }

// this is required if you need the tests to run in order
public static Test suite()
{   TestSuite suite = new TestSuite();

   suite.addTest(new TestStrutsExample("testStepOne"));
   suite.addTest(new TestStrutsExample("testStepTwo"));
   suite.addTest(new TestStrutsExample("testStepThree"));

   return suite;
}

private void stepOne() {

  // Perform steps for test one here

}

private void stepTwo() {

  // Perform steps for test two here

}

private void stepThree() {

  // Perform steps for test three here

}


public void testStepOne() {

  // execute the first step
  this.stepOne();

  assert(whatever);

}

public void testStepTwo() {

  // execute the first and second step
  this.stepOne();
  this.stepTwo();

  assert(whatever);

}

public void testStepThree() {

  // execute the first thru third steps
  this.stepOne();
  this.stepTwo();
  this.stepThree();

  assert(whatever);
}


}


This is really in keeping with the ideas behind JUnit anyway - it ensures
that each test case is isolated and has no 'side effects' that other tests
rely on.

Even so - if you have a bunch of steps it might be a PITA. The upside is
that you can use strutstestcase as it is out of the box.

In the end, it might be best to just use one big test and have multiple
assertions throughout the test...

> Thanks much,

> Chris

Sorry I couldn't help more!

Kevin



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




Struts Installation

2002-11-12 Thread Eric Gignac
Hi 

I'm looking for a good tutorial for the installation of Struts.  Any links ?

Thanks



Need scriptlet to substitute bean:message result to a custom tag param value

2002-11-12 Thread Dan Tran
Hi I try to substitute a result of a bean:message value to
a tag's param value, but have no luck

Here is  the snippet


  " />  < this returns blank, how do I correct
this?
  



Any help is greatly appreciated


-Dan

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




[OT] posting via news.basebean.com

2002-11-12 Thread Dan Tran
Hi, I posted some struts questions using usenet forum with
basebean.com  and have no reply from any expert
( and I cant find my question in the archive either)

is basebean.com posting working?

-Dan

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




2D Collection and nested:iterate

2002-11-12 Thread Louis Leung
Hi all,

 

In my action form there is a 2D collection, both used ArrayList.  (i.e.
An ArrayList whose elements are ArrayList also)  I want to retrieve data
(which are all String) from the 2nd layer of the 2D collection using
 tag so that it can populate the value back
automatically.  However, it is not working.

 

Code in jsp : 

 



 





 

 

<% System.out.println(column); %>

   

 







 



 

 

 

Result (assume a 2X2 collection with elements A1, A2, B1, B2 in them
already)

 

4 textboxes, the top 2 with [A1, A2] for both, and bottom 2 with [B1,
B2]

System.out prints out A1, A2, B1, B2 separately

 

 

It seems like the 2nd iterate tag is indeed iterating thru the 2nd layer
of the collection from the System.out statement.  But the  tag is not retrieving each element of the 2nd layer collection.
Rather, it is using the whole of the 2nd collection itself.

 

Anyone has any idea why and possibly solution ?  I would really like to
use the  tag so that the values can be automatically
populated back by Struts after the user input.

 

 

Thanks in advance.

 

Louis

 

 




Re: StrutsTestCase and sessions

2002-11-12 Thread Chris Winters
On Tue, 2002-11-12 at 15:53, [EMAIL PROTECTED] wrote: 
> So, if I understand what you are doing:
> 
>  - You've got multiple test classes

Yes

>  - You call them one after another and need to maintain session state
> between tests

No, multiple methods in the same test class. I totally agree with you
that different test *classes* can't rely on state being set by another
class. But AFAICT I should be able to set state within my class without
any problem.

> Looking through the strutstestcase MockStrutsTestCase source code, it looks
> as if a session is created prior to the first test in the class running and
> it lives for all tests. So it should work like this:

If it did that I'd be happy, but it wasn't. With every call to setUp()
-- before every single test -- it creates a new request object
(HttpServletRequestSimulator) . This request object in turn creates a
new session. So as far as I could see sessions were unusable unless you
put everything into one test method.
 
>  - Prior to first test running the session is blank just like it would be
> if a new user made their first request.
>  - During first test the Action class (or .jsp's) attach attributes to the
> session.
>  - During second and later tests in that class, the session would be built
> up by the Action classes of the previous tests in that class.
>  - So the idea is that your session object accumulates objects the same as
> it would by simply processing successive requests.
> 
> Once the last test in the class is run, then all the session object
> disappears - which it should because you no longer need it.

This is exactly the behavior I'd like, so you're reading my mind :-)

> The problem with making the session static is that it can have unintended
> side effects. For example, if you try to run other 'sets' of tests, then
> the remnants of the old sessions will be lying around and need to be dealt
> with prior to running new tests.

True, but so far everything has been sufficiently self contained (ie,
actions using forms cleanup the form bean left in the session) that this
hasn't been a problem.

> Also, it becomes much more complicated if
> you want to reuse your tests as Cactus tests. In Cactus, all tests are run
> in directly in a running web container - which means that killing a static
> session object may require restarting your server (there may be ways around
> this, but none are problem free). If you follow the recommendations above,
> then you can reuse the tests as Cactus tests almost unchanged.

Sure, but I hope to never need Cactus :-)
 
> Also, everytime you upgrade your strutstestcase version, you'll have to
> change this again and recompile. You're not using it as intended.

Well, I'm using it as documented. The docs and the implementation didn't
seem to match up. That's why I'd like to see which is incorrect.

Thanks much,

Chris
 
-- 
Chris Winters ([EMAIL PROTECTED])
Java Developer


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




[FYI] Visual Struts development

2002-11-12 Thread Sri Sankaran

Disclaimer: I have nothing to do with or gain from the following, heck it isn't even a 
plug.  Caveat emptor.  I am simply forwarding information that came my way.  Thought 
you might be interested.

ObjectAssembler (http://www.objectventure.com/objectassembler.html) provides the most 
comprehensive visual Struts development environment available today for the design, 
development, assembly, and deployment of web applications. OAP's support for Struts 
1.1 includes full Tiles and Validator functionality. Using ObjectAssembler will enable 
you to deliver on the demands you face in creating and maintaining web sites and 
enterprise intranets.
Along with support for Struts, you'll get everything you want in an enterprise and 
web-based development environment in OAP 2.5, including Servlet, JSP(tm), EJB(tm), and 
JavaBean support, plus a smarter technology that provides real-time validation of the 
application and synchronization of source code with its visual representation. OAP 2.5 
is available as a complete standalone enterprise development environment as well as 
plug-in support for JBuilder , NetBeans and Sun ONE Studio .




html:text indexed="true" inside logic:iterate help!

2002-11-12 Thread Leonardo Maciel
Hi all, I search the list and found some good samples, but I'm still unable 
to execute the following code.
The newEntryContinue.do action shows the correct name and description values 
with the 

When I submit I get:

javax.servlet.ServletException: BeanUtils.populate
...
root cause: java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NullPointerException
	SurveyDetailForm.getParameter(SurveyDetailForm.java:816)
...
THE JSP:



	 


	
	




THE FORM:
=
public class SurveyDetailForm extends ActionForm {
	private ArrayList labArray;
	public ArrayList getLabArray() {
		return labArray;
	}

	public void setLabArray(ArrayList labArray) {
		this.labArray = labArray;
	}
	public LabValues getParameter(int index)
	{
		return (LabValues)labArray.get(index);
	}

STRUTS-CONFIG:
==

	type="NewEntryContinueAction"
	name="SurveyDetailForm"
	input="/newEntry.do"
   validate="true"
	scope="request"	>




	type="NewEntrySaveAction"
	name="SurveyDetailForm"
   validate="false"
	scope="request"	>



THE newEntryContinue:
=
Populates the array with
  detailForm.setLabArray( new ArrayList( pro.getLabValueList() ) );

LabValues objects that has get and set for
public final class LabValues implements Serializable {

   private Integer value;
   private String name;
   private String description;
   private String quantity;
   private String date;


What is wrong??
I appreciate any help.
Thank you
Leo

_
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: 



Encapsulating complete form in Action definition

2002-11-12 Thread Adam Sherman
Would be possible to achieve this?

I want the first hit on the "do" URI to generate the "input" JSP with
no errors. This way I can encpsulate all the needed information in the
Struts config file for handling user input.

Does this make sense to anyone?

Thanks,

A.

-- 
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819

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




Re: StrutsTestCase and sessions

2002-11-12 Thread Kevin . Bedell



So, if I understand what you are doing:

 - You've got multiple test classes
 - You call them one after another and need to maintain session state
between tests

Here's my initial take on this:

I believe that it may be better to consolidate all your tests as individal
tests in a single TestSuite. You can control the order your testcases are
invoked if you specify them individually. For example, you can accomplish
this by adding a similar method to this:

  public static Test suite()
  { TestSuite suite = new TestSuite();

suite.addTest(new MyTestClass("testOne"));
suite.addTest(new MyTestClass("testTwo"));
suite.addTest(new MyTestClass("testThree"));
suite.addTest(new MyTestClass("testFour"));
// etc...

return suite;
  }

For more info on this approach, here's a link to some generic JUnit best
practices:


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

Looking through the strutstestcase MockStrutsTestCase source code, it looks
as if a session is created prior to the first test in the class running and
it lives for all tests. So it should work like this:

 - Prior to first test running the session is blank just like it would be
if a new user made their first request.
 - During first test the Action class (or .jsp's) attach attributes to the
session.
 - During second and later tests in that class, the session would be built
up by the Action classes of the previous tests in that class.
 - So the idea is that your session object accumulates objects the same as
it would by simply processing successive requests.

Once the last test in the class is run, then all the session object
disappears - which it should because you no longer need it.

The problem with making the session static is that it can have unintended
side effects. For example, if you try to run other 'sets' of tests, then
the remnants of the old sessions will be lying around and need to be dealt
with prior to running new tests. Also, it becomes much more complicated if
you want to reuse your tests as Cactus tests. In Cactus, all tests are run
in directly in a running web container - which means that killing a static
session object may require restarting your server (there may be ways around
this, but none are problem free). If you follow the recommendations above,
then you can reuse the tests as Cactus tests almost unchanged.

Also, everytime you upgrade your strutstestcase version, you'll have to
change this again and recompile. You're not using it as intended.

For those interested, using strutstestcase for both cactus and mock object
tests is covered in my book and has samples included.

Kevin

http://www.strutskickstart.com





Chris Winters <[EMAIL PROTECTED]> on 11/12/2002 02:47:33 PM

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

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:StrutsTestCase and sessions


Working with StrutsTestCase 1.9 I found what seems like a discrepancy
between the docs and implementation. In HttpSessionSimulator the class
docs say:

  This class simulates an HttpSession object. You can actually
  work with sessions. The simulation is done using a static
  session object inside HttpServletRequest.

However, the implementation of HttpServletRequestSimulator has 'session'
as an instance variable rather than a static variable. As a result the
session gets recreated with every test which kind of defeats the
purpose.

Changing the variable to static makes my tests happy. I don't see any
ill side effects, but that doesn't mean they aren't there. So is this
just a bug or have I overlooked something obvious?

Apologies if this isn't the correct forum.

Chris

--
Chris Winters ([EMAIL PROTECTED])
Java Developer


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




RE: Simulating Client field prompting

2002-11-12 Thread Susan Bradeen
Thank you, Edgar. This sounds promising! 

Susan

On 11/12/2002 03:48:01 PM "edgar" wrote:

> I have a solution with a small amount of optional javascript.
> 
> You have a 'recalculation' action which does all the lookups and
> populates either ActionErrors for invalid selections or puts in related
> information if a correct entry was made.  It should return you to the
> same jsp.  You can stick the actual entry point to the recalculation in
> the validate method of your actionform.
> 
> The javascript you need is an onchange to submit the form and 'save'
> your focus and a small javacript to regain the focus on return to the
> form.
> 
> If you don't want the javascript have a button after the field with and
> action of 'Load Related Info' or something.  The use can regain the
> focus manually.
> 
> Edgar
> 
> -Original Message-
> From: Susan Bradeen [mailto:SusanB@;softlanding.com]
> Sent: Tuesday, November 12, 2002 2:23 PM
> To: '[EMAIL PROTECTED]'
> 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: html:select and collections

2002-11-12 Thread Susan Bradeen
Gus,

I don't think you need the "name" attribute in the  tag. 

Susan Bradeen

On 11/12/2002 03:06:47 PM Gus Delgado wrote:

> I declare a tag in my jsp like this
> 
>  labelProperty="label"/>
> 
> 
> and my action for pre population goes something like this
> 
> Collection productTypes = getProductTypes(results);
> session.setAttribute("productTypes", productTypes);
> 
> I'm getting an error saying that the productTypes bean does not exist?
> any ideas
> 
> 
> 
> --
> To unsubscribe, e-mail: 

> For additional commands, e-mail: 

> 

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




RE: Simulating Client field prompting

2002-11-12 Thread edgar
I have a solution with a small amount of optional javascript.

You have a 'recalculation' action which does all the lookups and
populates either ActionErrors for invalid selections or puts in related
information if a correct entry was made.  It should return you to the
same jsp.  You can stick the actual entry point to the recalculation in
the validate method of your actionform.

The javascript you need is an onchange to submit the form and 'save'
your focus and a small javacript to regain the focus on return to the
form.

If you don't want the javascript have a button after the field with and
action of 'Load Related Info' or something.  The use can regain the
focus manually.

Edgar

-Original Message-
From: Susan Bradeen [mailto:SusanB@;softlanding.com] 
Sent: Tuesday, November 12, 2002 2:23 PM
To: '[EMAIL PROTECTED]'
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: 




html:select and collections

2002-11-12 Thread Gus Delgado
I declare a tag in my jsp like this




and my action for pre population goes something like this

Collection productTypes = getProductTypes(results);
session.setAttribute("productTypes", productTypes);

I'm getting an error saying that the productTypes bean does not exist? 
any ideas



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



RE: [SIDEBAR] Form population (Was RE: request.setAttribute() for m confusion)

2002-11-12 Thread Sri Sankaran



> ... you've got two of these back-to-back:
> 
> MstrLdActn -> MstrJsp -> MstrSbmtActn - - > DtlLdActn -> DtlJsp -> 
> DtlSbmtActn
>  a redirect passing mastid=54 ^
  
Ah!  Action chaining -- I realize that is an option.  

Just don't let Craig see you doing this... ;)

> 
> 
> 
> -- 
> Eddie Bush
> 
> 

Sri

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

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




RE: From old JSP and Servlets to STRUTS

2002-11-12 Thread David Graham
I think all that code would be called from an Action.  I didn't see anything 
that tied it to presentation.

David






From: "Fernando Hernandez" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: From old JSP and Servlets  to STRUTS
Date: Tue, 12 Nov 2002 20:37:10 +0100

Thanks for your interest in this...

Here is one the cases(The problem line have a comment with asterisks):

	BeanMetacontent currentRes = session.getAttribute("currentRes");
	try {
  	/*/BeanMetaContent currentContent =
currentRes.getMetaContentByLanguage(currBeanLang.getLanguageId());
langDefined = true;
currContentClass = "mngTableLine";
  } catch (NotFoundLanguageException e) {
 		currentContent = new BeanMetaContent();
currentContent.setTitle(defBeanLang.getNotFoundMessage());

currentContent.setDescription(defBeanLang.getNotFoundMessage());
currentContent.setSubject(defBeanLang.getNotFoundMessage());
currentContent.setLanguage(currBeanLang.getLanguageId());
}
langDefined = false;
currContentClass = "mngTableLineUntranslated";

//

I receive in the Session Scope an object named currentRes...whcih I use to
instanciate the BeanMetaContent class(currentContent) by calling a method
(currentRes.getMetaContentByLanguage ( currBeanLang.getLanguageId() )which
is not a simple getter, beacuse a parameter has to be given to it to
retreive the instance.

Also, the method getMetaContentByLanguage( LanguageId ), throws a
LanguageNotFoundException when the content with the desired language is not
found. This exception I have to catch it(I don't know yet how to do it) and
then do some setters like
currentContent.setTitle(defBeanLang.getNotFoundMessage()(which I think I 
can
do it but not sure yet).

What I have understand through my research and the answers from the people 
I
have asked for an opinion about this, is that the presentation layer should
not be handling this type of operations that can be done (maybe even more
effectively) in the logic layer. That the presentation should only care
about showing content and not as in this example if there is content in a
particular language and then show in it. Another example is the fact of
setting attributes of the currContentClass to use them later...

I still have to learn a lot of the whole perspective about Struts(though I
have read dozens of articles and tutorials jeje)...my main tasks are
adopting Model 2, and giving the JSPs enough simplicity and versatility so
they can be easily parametirized resulting in customer benefit and
maintanance efficiency. But the main obstacle I have found(I may be wrong
about this) is that in this case, the presentation and the logic layer are
to tightly related, as I assume I show in the previous example(again, I
maybe wrong about this). But i'll keep on investigating about this until 
I'm
completely sure about the "whole picture", and until i have a well defined
strategy for this project in particular.

THANKS A LOT FOR YOU INTEREST!

F.











-Mensaje original-
De: Karr, David [mailto:david.karr@;attws.com]
Enviado el: martes, 12 de noviembre de 2002 19:18
Para: Struts Users Mailing List
Asunto: RE: From old JSP and Servlets to STRUTS


Show us some examples of why you think you can't remove the scriptlets.
Some of those cases are probably easily fixable.

However, you should probably first understand the model and framework 
before
trying to fix your JSP pages.  This is because you'll find that anything
resembling "business logic" will not be in your JSP pages.

Once you address that, you'll mostly just have a few scriptlet expressions
left to cover cases that aren't easily covered with normal usage of Struts.

Just integrating with the JSTL will also help, as you can use some JSTL 
tags
that use the JSTL EL instead of using scriptlets.

You can also move towards using the Struts-EL library (in the nightly
build), which is a version of the Struts tag library which uses the JSTL EL
engine to evaluate attribute values.

> -Original Message-
> From: Fernando Hernandez [mailto:fernando@;bit-bang.com]
>
> I am student doing an intership and i just started to learn
> about Struts
> because I'm currently transforming a J2EE web application composed by
> servlets and old-java-embedded-JSPs so it can adopt Model 2.
>
> To acomplish this i found that using Struts is the prefect
> answer. To reach
> my goal, at first I thought that maybe the best way to do it
> was to first
> address the interface by taking out all the Java embedded in
> all the JSPs,
> and change it with Struts, JSTL, custom made taglibs. After
> doing this, i
> was going then to think about the Model and the framework itself...
>
> But i have found that to take out the embedded java from the
> JSP has been
> very diffi

Re: How do I split struts-config.xml without using subapps

2002-11-12 Thread Eddie Bush
There was some discussion about possibly implementing this so that all 
configs worked the same (you can do this for tiles/validator).  Nothing 
has been implemented yet though (that I am aware of).  ... and they are 
called modules :-)  We sent many emails over the dev list to standardize 
on that one ;-)  Modules :-)

Christopher Cheng wrote:

My struts-config.xml is getting very long. Is it possible to split that into multiple files without using subapps?
 


--
Eddie Bush





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




Re: [SIDEBAR] Form population (Was RE: request.setAttribute() for mconfusion)

2002-11-12 Thread Eddie Bush
Martin Cooper wrote:


Ahhh! The murky waters finally clear, and I understand where all the
confusion is coming from. Sri and I are talking about one Action handling
the request.


Yes - but I've said before that if you had multiple forms involved you 
would have to make yourself responsible for the extras ;-)

You (Eddie) are talking about two Actions chained together.
Better not let Craig catch you, Eddie! ;-)

--
Martin Cooper


I always viewed chaining as actually fowarding from one action to 
another.  Notice that I choose to redirect there.  How could this 
possibly have any bad effects?  It's a new request - fresh - and it will 
be populated by the detail form-bean etc and you'll grab the request 
parameter ... and load your data for display.

I can certainly see where forwarding around could have adverse 
side-effects, but by redirecting?  ... hrm - well it seves me well. 
 :-)

--
Eddie Bush




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



nested:hidden body to set value?

2002-11-12 Thread Phase Web and Multimedia
I just recently tried to set up a nested:hidden form element (as an
experiment) to use its body to specify the value of the form element. Of
course it failed, i assume because this is not possible. Here is an example
code:

tag sample:
It would be cool if this would be the form
value

output sample:


My inquiry is... why isn't this possible? It would be very convenient.
Especially if i want to populate the value with a dynamic value produced by
a jstl tag like . Either that or when are nested tags going to be el
(expression language) enabled. Nested Tags have made my coding dreams come
true. But el enabled nested tags would be blissful. But please don't forget
my first question of "Shoudn't the tag body be the form value?".

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


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




RE: [SIDEBAR] Form population (Was RE: request.setAttribute()for m confusion)

2002-11-12 Thread Martin Cooper
Comments in here somewhere...

> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Tuesday, November 12, 2002 12:22 PM
> To: Struts Users Mailing List
> Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
> for m confusion)
> 
> 
> (waaay down there ...)
> 
> Sri Sankaran wrote:
> 
> >Intermixed response...
> >
> >>-Original Message-
> >>From: Eddie Bush [mailto:ekbush@;swbell.net] 
> >>Subject: Re: [SIDEBAR] Form population (Was RE: 
> >>request.setAttribute() for m confusion)
> >>
> >>Sri Sankaran wrote:
> >>
> >>>No sweat.
> >>>
> >>>The reason this discussion got so off whack was because I 
> >>>  
> >>>
> >>tried to slam 
> >>
> >>
> >>>a square peg in a round hole by continuing with Kris' 
> >>>  
> >>>
> >>example (Edit & Save actions) to make my point -- bad idea.
> >>
> >>
> >>>So what *is* my scenario?
> >>>
> >>>Consider for example, a master-detail pair of pages.  The 
> >>>  
> >>>
> >>master page 
> >>
> >>
> >>>display a list of employee names.  The detail page -- which 
> >>>  
> >>>
> >>is displayed when a user selects an employee from the master 
> >>page -- displays a collection of (possibly editable) fields 
> >>that describe the selected employee.
> >>
> >>
> >>>The form-bean associated with the detail page is your typical 
> >>>EmployeeBean object.  Even if the struts-config is set up with the 
> >>>right action mapping like
> >>>
> >>> >>>   type="com.acme.DetailAction"
> >>>   name="employeeBean"/>
> >>>
> >>>how can Struts know that the user selected the user 'John 
> Smith' on the 
> >>>master page?  Ergo, the need to create the necessary form 
> bean in the 
> >>>action for the master page.  We cannot wait for/depend on 
> Struts to 
> >>>create it.
> >>>
> >>>  
> >>>
> >>John Smith has some unique identifying value, right?  
> You're going to 
> >>need to grab this value on submit and send it to your detail 
> >>action so 
> >>that it knows which one to load.  
> >>
> >>
> >But when the master page is submitted, it is *MasterAction* 
> that is being invoked and not DetailAction.  DetailAction 
> doesn't come into the picture until the detail page is submitted.
> >
> Yes, it is.  That is why you retrieve whichever pertient 
> value it is the 
> detail will need and then send control to the detail action - 
> and let it 
> load the data relevant for the view and forward to it.  If 
> you're asking 
> for a detail view for one row in the master, then you obviously have 
> some unique value (or group of values - a key) by which you determine 
> the relationship.  This is the information you must somehow make 
> available to the detail view - as request parameters or in some other 
> way.  Personally, I tend toward using OIDs, so ... since 
> you're probably 
> going to have the OID of the master as a field of the detail you can 
> send that OID to the detail as some parameter - call it recordId or 
> whatever you like.

Ahhh! The murky waters finally clear, and I understand where all the
confusion is coming from. Sri and I are talking about one Action handling
the request. You (Eddie) are talking about two Actions chained together.
Better not let Craig catch you, Eddie! ;-)

--
Martin Cooper


> 
> The information you use to load the detail doesn't differ 
> with respect 
> to where you retrieve it.  That data will be just as happy it was 
> retrieved from the master action as it will be if it is 
> retrieved from 
> the detail action.  By placing the responsibility for that 
> behavior upon 
> the detail action you rid the master of caring about it - and 
> you remove 
> the need for your master to create the form for the detail.
> 
> LoadAction -> Form (JSP) -> SubmitAction
> 
> action loads data into form and forwards to view
> view is sent to action to determine next step
> 
> ... you've got two of these back-to-back:
> 
> MstrLdActn -> MstrJsp -> MstrSbmtActn - - > DtlLdActn -> DtlJsp -> 
> DtlSbmtActn
>  a redirect passing mastid=54 ^
> 
> 
> 
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 


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




RE: How do I split struts-config.xml without using subapps

2002-11-12 Thread Karr, David
I don't believe so.  One approach that might help is to use the Struts Console 
application, which lets you get the "big picture" without having to see the entire 
file at once.

> -Original Message-
> From: Christopher Cheng [mailto:mailing-list@;chrisshare.net]
> 
> My struts-config.xml is getting very long. Is it possible to 
> split that into multiple files without using subapps?
> 

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




Re: How do I split struts-config.xml without using subapps

2002-11-12 Thread Derek Lin
I am doing exactly that:

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";[


]>


  &datasources;



The key is to use the  tag. ""

Hope this helps.

-- Derek

- Original Message -
From: "Christopher Cheng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 11:31 AM
Subject: How do I split struts-config.xml without using subapps


My struts-config.xml is getting very long. Is it possible to split that into
multiple files without using subapps?

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




RE: From old JSP and Servlets to STRUTS

2002-11-12 Thread Fernando Hernandez
Thanks for your interest in this...

Here is one the cases(The problem line have a comment with asterisks):

BeanMetacontent currentRes = session.getAttribute("currentRes");
try {
/*/BeanMetaContent currentContent =
currentRes.getMetaContentByLanguage(currBeanLang.getLanguageId());
langDefined = true;
currContentClass = "mngTableLine";
  } catch (NotFoundLanguageException e) {
currentContent = new BeanMetaContent();
currentContent.setTitle(defBeanLang.getNotFoundMessage());
currentContent.setDescription(defBeanLang.getNotFoundMessage());
currentContent.setSubject(defBeanLang.getNotFoundMessage());
currentContent.setLanguage(currBeanLang.getLanguageId());
}
langDefined = false;
currContentClass = "mngTableLineUntranslated";

//

I receive in the Session Scope an object named currentRes...whcih I use to
instanciate the BeanMetaContent class(currentContent) by calling a method
(currentRes.getMetaContentByLanguage ( currBeanLang.getLanguageId() )which
is not a simple getter, beacuse a parameter has to be given to it to
retreive the instance.

Also, the method getMetaContentByLanguage( LanguageId ), throws a
LanguageNotFoundException when the content with the desired language is not
found. This exception I have to catch it(I don't know yet how to do it) and
then do some setters like
currentContent.setTitle(defBeanLang.getNotFoundMessage()(which I think I can
do it but not sure yet).

What I have understand through my research and the answers from the people I
have asked for an opinion about this, is that the presentation layer should
not be handling this type of operations that can be done (maybe even more
effectively) in the logic layer. That the presentation should only care
about showing content and not as in this example if there is content in a
particular language and then show in it. Another example is the fact of
setting attributes of the currContentClass to use them later...

I still have to learn a lot of the whole perspective about Struts(though I
have read dozens of articles and tutorials jeje)...my main tasks are
adopting Model 2, and giving the JSPs enough simplicity and versatility so
they can be easily parametirized resulting in customer benefit and
maintanance efficiency. But the main obstacle I have found(I may be wrong
about this) is that in this case, the presentation and the logic layer are
to tightly related, as I assume I show in the previous example(again, I
maybe wrong about this). But i'll keep on investigating about this until I'm
completely sure about the "whole picture", and until i have a well defined
strategy for this project in particular.

THANKS A LOT FOR YOU INTEREST!

F.











-Mensaje original-
De: Karr, David [mailto:david.karr@;attws.com]
Enviado el: martes, 12 de noviembre de 2002 19:18
Para: Struts Users Mailing List
Asunto: RE: From old JSP and Servlets to STRUTS


Show us some examples of why you think you can't remove the scriptlets.
Some of those cases are probably easily fixable.

However, you should probably first understand the model and framework before
trying to fix your JSP pages.  This is because you'll find that anything
resembling "business logic" will not be in your JSP pages.

Once you address that, you'll mostly just have a few scriptlet expressions
left to cover cases that aren't easily covered with normal usage of Struts.

Just integrating with the JSTL will also help, as you can use some JSTL tags
that use the JSTL EL instead of using scriptlets.

You can also move towards using the Struts-EL library (in the nightly
build), which is a version of the Struts tag library which uses the JSTL EL
engine to evaluate attribute values.

> -Original Message-
> From: Fernando Hernandez [mailto:fernando@;bit-bang.com]
>
> I am student doing an intership and i just started to learn
> about Struts
> because I'm currently transforming a J2EE web application composed by
> servlets and old-java-embedded-JSPs so it can adopt Model 2.
>
> To acomplish this i found that using Struts is the prefect
> answer. To reach
> my goal, at first I thought that maybe the best way to do it
> was to first
> address the interface by taking out all the Java embedded in
> all the JSPs,
> and change it with Struts, JSTL, custom made taglibs. After
> doing this, i
> was going then to think about the Model and the framework itself...
>
> But i have found that to take out the embedded java from the
> JSP has been
> very difficult, since the objects(I'd like to say JavaBeans,
> bur they 're
> not exactly that, and actually that is part of the problem) which were
> sended from the logic to the presentation were very complex
> in nature and
> the content an not be presented just by using the strut's,
> JSTL or many
> other libraries i have looked exhaustively.
>
> So, sh

How do I split struts-config.xml without using subapps

2002-11-12 Thread Christopher Cheng
My struts-config.xml is getting very long. Is it possible to split that into multiple 
files without using subapps?


Simulating Client field prompting

2002-11-12 Thread Susan Bradeen
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: 




Re: File Upload : Progress Bar

2002-11-12 Thread Mark Ayad
I have the code for this someplace, but It would take me an age to find it.

Mark

- Original Message -
From: "micael" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 7:20 PM
Subject: Re: File Upload : Progress Bar


> Keep us posted.  If you run into some difficulties, I would be willing to
> jump in with some assistance, if I have some.  You can contact me at
> [EMAIL PROTECTED]
>
> At 02:45 PM 11/12/2002 +0100, you wrote:
> >I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)
> >
> >Going to try it...
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

>
> Micael
>
> ---
>
> This electronic mail  transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged.  This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited.  If you
> have received this transmission in error, please delete the message.
Thank you
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: [SIDEBAR] Form population (Was RE: request.setAttribute() for mconfusion)

2002-11-12 Thread Eddie Bush
(waaay down there ...)

Sri Sankaran wrote:


Intermixed response...


-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Subject: Re: [SIDEBAR] Form population (Was RE: 
request.setAttribute() for m confusion)

Sri Sankaran wrote:

No sweat.

The reason this discussion got so off whack was because I 
 

tried to slam 
   

a square peg in a round hole by continuing with Kris' 
 

example (Edit & Save actions) to make my point -- bad idea.
   

So what *is* my scenario?

Consider for example, a master-detail pair of pages.  The 
 

master page 
   

display a list of employee names.  The detail page -- which 
 

is displayed when a user selects an employee from the master 
page -- displays a collection of (possibly editable) fields 
that describe the selected employee.
   

The form-bean associated with the detail page is your typical 
EmployeeBean object.  Even if the struts-config is set up with the 
right action mapping like


  type="com.acme.DetailAction"
  name="employeeBean"/>

how can Struts know that the user selected the user 'John Smith' on the 
master page?  Ergo, the need to create the necessary form bean in the 
action for the master page.  We cannot wait for/depend on Struts to 
create it.

 

John Smith has some unique identifying value, right?  You're going to 
need to grab this value on submit and send it to your detail 
action so 
that it knows which one to load.  
   

But when the master page is submitted, it is *MasterAction* that is being invoked and not DetailAction.  DetailAction doesn't come into the picture until the detail page is submitted.


Yes, it is.  That is why you retrieve whichever pertient value it is the 
detail will need and then send control to the detail action - and let it 
load the data relevant for the view and forward to it.  If you're asking 
for a detail view for one row in the master, then you obviously have 
some unique value (or group of values - a key) by which you determine 
the relationship.  This is the information you must somehow make 
available to the detail view - as request parameters or in some other 
way.  Personally, I tend toward using OIDs, so ... since you're probably 
going to have the OID of the master as a field of the detail you can 
send that OID to the detail as some parameter - call it recordId or 
whatever you like.

The information you use to load the detail doesn't differ with respect 
to where you retrieve it.  That data will be just as happy it was 
retrieved from the master action as it will be if it is retrieved from 
the detail action.  By placing the responsibility for that behavior upon 
the detail action you rid the master of caring about it - and you remove 
the need for your master to create the form for the detail.

LoadAction -> Form (JSP) -> SubmitAction

action loads data into form and forwards to view
view is sent to action to determine next step

... you've got two of these back-to-back:

MstrLdActn -> MstrJsp -> MstrSbmtActn - - > DtlLdActn -> DtlJsp -> 
DtlSbmtActn
a redirect passing mastid=54 ^



--
Eddie Bush




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



StrutsTestCase and sessions

2002-11-12 Thread Chris Winters
Working with StrutsTestCase 1.9 I found what seems like a discrepancy
between the docs and implementation. In HttpSessionSimulator the class
docs say:

  This class simulates an HttpSession object. You can actually
  work with sessions. The simulation is done using a static
  session object inside HttpServletRequest.

However, the implementation of HttpServletRequestSimulator has 'session'
as an instance variable rather than a static variable. As a result the
session gets recreated with every test which kind of defeats the
purpose.

Changing the variable to static makes my tests happy. I don't see any
ill side effects, but that doesn't mean they aren't there. So is this
just a bug or have I overlooked something obvious?

Apologies if this isn't the correct forum.

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Java Developer


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




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() for m confusion)

2002-11-12 Thread Sri Sankaran
Intermixed response...

> -Original Message-
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org] 
> Sent: Tuesday, November 12, 2002 1:54 PM
> To: Struts Users Mailing List
> Subject: RE: [SIDEBAR] Form population (Was RE: 
> request.setAttribute() for m confusion)
> 
> 
> See intermixed.
> 
> On Tue, 12 Nov 2002, Martin Cooper wrote:
> 
> > Date: Tue, 12 Nov 2002 08:36:13 -0800
> > From: Martin Cooper <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: [SIDEBAR] Form population (Was RE: 
> request.setAttribute()
> > for m confusion)
> >
> >
> >
> > > -Original Message-
> > > From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
> > > Sent: Tuesday, November 12, 2002 7:56 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: [SIDEBAR] Form population (Was RE: 
> > > request.setAttribute() for m confusion)
> > >
> > >
> > > No sweat.
> > >
> > > The reason this discussion got so off whack was because I 
> tried to 
> > > slam a square peg in a round hole by continuing with 
> Kris' example 
> > > (Edit & Save actions) to make my point -- bad idea.
> > >
> > > So what *is* my scenario?
> > >
> > > Consider for example, a master-detail pair of pages.  The master 
> > > page display a list of employee names.  The detail page 
> -- which is 
> > > displayed when a user selects an employee from the master page -- 
> > > displays a collection of (possibly
> > > editable) fields that describe the selected employee.
> > >
> > > The form-bean associated with the detail page is your typical 
> > > EmployeeBean object.  Even if the struts-config is set up 
> with the 
> > > right action mapping like
> > >
> > >  > > type="com.acme.DetailAction"
> > > name="employeeBean"/>
> > >
> > > how can Struts know that the user selected the user 'John 
> Smith' on 
> > > the master page?  Ergo, the need to create the necessary 
> form bean 
> > > in the action for the master page.  We cannot wait for/depend on 
> > > Struts to create it.
> > >
> > > I don't like the fact that the MasterAction needs to have 
> knowledge 
> > > of the requirements for the detail page (the type of 
> bean, the name 
> > > under which it is accessed) -- or maybe that isn't so bad??
> >
> > Yes, it is bad. Actually, it's a bit of a mystery to me that this 
> > issue doesn't come up more often (or perhaps I just always miss it).
> >
> > One solution (which Craig would probably shoot me for mentioning :)
> 
> Yep :-).  For those who tuned in late, I am *not* a fan of 
> this -- in part because it has some pretty unexpected 
> semantics w.r.t. form beans.
> 
> > is
> > action chaining. That is, your master action chains (i.e. 
> forwards) to 
> > a detail action that prepares the bean for the detail page. 
> There are 
> > some problems with chaining actions, though, so it's not 
> the best way 
> > to handle this.
> >
> > An alternative is to split your actions into two phases, 
> and keep the 
> > logic of those two phases separate, using additional 
> classes. This is 
> > what I'm doing now, and it's pretty clean. Unfortunately, at this 
> > point my employer owns the code, but I'll see if I can 
> wrest it free 
> > at some point. ;-)
> 
> If you know what your destination action's path is, you 
> actually *can* divine what form bean is needed pretty easily. 
>  Let's assume we're talking about the ultimate action at path "/foo":
> 
>   ApplicationConfig appConfig = (ApplicationConfig)
> request.getAttribute(Globals.APPLICATION_KEY);
>   ActionConfig actionConfig = appConfig.findActionConfig("/foo");
>   String name = actionConfig.getName(); // Form bean name
>   String attribute = actionConfig.getAttribute(); // 
> Attribute to store under
>   String scope = actionConfig.getScope(); // Scope to store in
>   FormBeanConfig fbConfig = appConfig.findFormBeanConfig(name);
> 
> Now you've got all the metadata you need to dynamically 
> instantiate the appropriate form bean, and store it under the 
> appropriate attribute in the appropriate scope, without hard 
> coding any of this stuff.

This goes from having to have information about the bean to having information about 
the action path. Six one way, half dozen the other?

> 
> >
> > --
> > Martin Cooper
> 
> Craig
> 

Sri

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

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




RE: Multiple struct-config.xml files

2002-11-12 Thread James Mitchell
Well that's an interesting case for creating a new feature that let's you
have as many struts-config files as you want.

Perhaps you could divide your application and it's resources into Modules.
That way you could develop the Modules in teams.

I have some good new for you.  That's exactly what the new Struts 1.1
feature Modules does.

I know 1.1 is not final, but it will be soon enoughand believe me, you
will find this cool feature very useful.

Hope that helps


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: Chiming Huang [mailto:tomcat_huang@;yahoo.com]
> Sent: Tuesday, November 12, 2002 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: Multiple struct-config.xml files
>
>
> Hi, Is there a way to break down the struts-config.xml files into
> multiple files?  So that each sub-project can handle it's own
> struts-config.xml. We are porting multiple projects to web using
> Tomcat and Struts.  Under Struts, the struts-config.xml is the
> file that contains all the request mappings and forwarding.  If
> we merge all projects into one Tomcat-Struts project, the
> struts-config.xml will be big and difficult to maintain among all
> developers.  A separate struts-config.xml file for each
> sub-project seems to be better.  If we develop each proejct as a
> separate Tomcat-Struts project, does it seem normal to do it that
> way.  Please advise the best way to incorporate multiple
> projects. Thanks.Chiming
>
>
> -
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD


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




Re: about html:error ( error handling )

2002-11-12 Thread wolfgang
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: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() for m confusion)

2002-11-12 Thread Sri Sankaran
Intermixed response...

> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net] 
> Sent: Tuesday, November 12, 2002 2:34 PM
> To: Struts Users Mailing List
> Subject: Re: [SIDEBAR] Form population (Was RE: 
> request.setAttribute() for m confusion)
> 
> 
> Sri Sankaran wrote:
> 
> >No sweat.
> >
> >The reason this discussion got so off whack was because I 
> tried to slam 
> >a square peg in a round hole by continuing with Kris' 
> example (Edit & Save actions) to make my point -- bad idea.
> >
> >So what *is* my scenario?
> >
> >Consider for example, a master-detail pair of pages.  The 
> master page 
> >display a list of employee names.  The detail page -- which 
> is displayed when a user selects an employee from the master 
> page -- displays a collection of (possibly editable) fields 
> that describe the selected employee.
> >
> >The form-bean associated with the detail page is your typical 
> >EmployeeBean object.  Even if the struts-config is set up with the 
> >right action mapping like
> >
> > >type="com.acme.DetailAction"
> >name="employeeBean"/>
> >
> >how can Struts know that the user selected the user 'John Smith' on the 
> >master page?  Ergo, the need to create the necessary form bean in the 
> >action for the master page.  We cannot wait for/depend on Struts to 
> >create it.
> >
> John Smith has some unique identifying value, right?  You're going to 
> need to grab this value on submit and send it to your detail 
> action so 
> that it knows which one to load.  

But when the master page is submitted, it is *MasterAction* that is being invoked and 
not DetailAction.  DetailAction doesn't come into the picture until the detail page is 
submitted.

> Yes, yes, you could just create the 
> form at that point and be done with it - but that is probably better 
> left to your detail-loading-action - the one that populates 
> the detail form and fowards to your JSP.
> 
> >I don't like the fact that the MasterAction needs to have knowledge of 
> >the requirements for the detail page (the type of bean, the name under 
> >which it is accessed) -- or maybe that isn't so bad?? 
> >
> It needs to know which field the detail will use to lookup 
> the record so 
> that it can send it the value of that field.  Is that so bad? 
>  You can't 
> expect it to "just know".  There has to be something to tell 
> it what you 
> want to do.  They're obviously related - they're in a master-detail 
> relationship - so why would such minimal coupling be bad?  
> You've got to 
> have something to indicate what you want to do.  Right?
> 
> >Are you telling me that I missed something fundamental to 
> >Struts?...'tis quite likely.
> >
> >Sri
> >
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




RE: Tiles Redirect Question

2002-11-12 Thread David Graham
You can't redirect to a tiles def because the browser has no idea what it 
means.  You can only forward to tiles.

David






From: "Jeff Born" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: Tiles Redirect Question
Date: Tue, 12 Nov 2002 12:48:40 -0600

Could someone explain how to do this.  I have tried many different options
and none work.  Is it just not recommended?  If so what should I do 
instead.

I have tried the following with no luck:

index.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


I have home as a global forward with the path as the tile with no "/" and
with.  Both do not work.

I have been able to just load the tiles as so (no redirect):

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


Is there a solution?

jb


-Original Message-
From: Jeff Born
Sent: Wednesday, November 06, 2002 10:00 PM
To: Struts Users Mailing List
Subject: Tiles Redirect Question


Ok,  I give..  What do I do to redirect to a tiles definition from the
index.jsp?

Thanks,

jb


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


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



RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-12 Thread Craig R. McClanahan
See intermixed.

On Tue, 12 Nov 2002, Martin Cooper wrote:

> Date: Tue, 12 Nov 2002 08:36:13 -0800
> From: Martin Cooper <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute()
> for m confusion)
>
>
>
> > -Original Message-
> > From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
> > Sent: Tuesday, November 12, 2002 7:56 AM
> > To: Struts Users Mailing List
> > Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute()
> > for m confusion)
> >
> >
> > No sweat.
> >
> > The reason this discussion got so off whack was because I
> > tried to slam a square peg in a round hole by continuing with
> > Kris' example (Edit & Save actions) to make my point -- bad idea.
> >
> > So what *is* my scenario?
> >
> > Consider for example, a master-detail pair of pages.  The
> > master page display a list of employee names.  The detail
> > page -- which is displayed when a user selects an employee
> > from the master page -- displays a collection of (possibly
> > editable) fields that describe the selected employee.
> >
> > The form-bean associated with the detail page is your typical
> > EmployeeBean object.  Even if the struts-config is set up
> > with the right action mapping like
> >
> >  > type="com.acme.DetailAction"
> > name="employeeBean"/>
> >
> > how can Struts know that the user selected the user 'John
> > Smith' on the master page?  Ergo, the need to create the
> > necessary form bean in the action for the master page.  We
> > cannot wait for/depend on Struts to create it.
> >
> > I don't like the fact that the MasterAction needs to have
> > knowledge of the requirements for the detail page (the type
> > of bean, the name under which it is accessed) -- or maybe
> > that isn't so bad??
>
> Yes, it is bad. Actually, it's a bit of a mystery to me that this issue
> doesn't come up more often (or perhaps I just always miss it).
>
> One solution (which Craig would probably shoot me for mentioning :)

Yep :-).  For those who tuned in late, I am *not* a fan of this -- in part
because it has some pretty unexpected semantics w.r.t. form beans.

> is
> action chaining. That is, your master action chains (i.e. forwards) to a
> detail action that prepares the bean for the detail page. There are some
> problems with chaining actions, though, so it's not the best way to handle
> this.
>
> An alternative is to split your actions into two phases, and keep the logic
> of those two phases separate, using additional classes. This is what I'm
> doing now, and it's pretty clean. Unfortunately, at this point my employer
> owns the code, but I'll see if I can wrest it free at some point. ;-)

If you know what your destination action's path is, you actually *can*
divine what form bean is needed pretty easily.  Let's assume we're talking
about the ultimate action at path "/foo":

  ApplicationConfig appConfig = (ApplicationConfig)
request.getAttribute(Globals.APPLICATION_KEY);
  ActionConfig actionConfig = appConfig.findActionConfig("/foo");
  String name = actionConfig.getName(); // Form bean name
  String attribute = actionConfig.getAttribute(); // Attribute to store under
  String scope = actionConfig.getScope(); // Scope to store in
  FormBeanConfig fbConfig = appConfig.findFormBeanConfig(name);

Now you've got all the metadata you need to dynamically instantiate the
appropriate form bean, and store it under the appropriate attribute in the
appropriate scope, without hard coding any of this stuff.

>
> --
> Martin Cooper

Craig


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




RE: Tiles Redirect Question

2002-11-12 Thread Jeff Born
Could someone explain how to do this.  I have tried many different options
and none work.  Is it just not recommended?  If so what should I do instead.

I have tried the following with no luck:

index.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


I have home as a global forward with the path as the tile with no "/" and
with.  Both do not work.

I have been able to just load the tiles as so (no redirect):

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


Is there a solution?

jb


-Original Message-
From: Jeff Born 
Sent: Wednesday, November 06, 2002 10:00 PM
To: Struts Users Mailing List
Subject: Tiles Redirect Question


Ok,  I give..  What do I do to redirect to a tiles definition from the
index.jsp?
 
Thanks,
 
jb



Re: confirmation page best practice

2002-11-12 Thread David Graham
Why is it bad for the result page to know about the form bean?  Seems fine 
to me.  Instead of using a result bean you could just put each piece of data 
into the request (depending on how much data you need to display).  Or, you 
could have your result bean wrap the form bean so the result page only knows 
about the result bean but you don't have to recode anything.

David






From: "Donald Dwoske" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: confirmation page best practice
Date: Tue, 12 Nov 2002 13:27:02 -0500


I have been wondering how people present action
results to users upon success.  I'm sure this has been asked before,
but I scanned the archive and didn't find a consensus.

In some cases I use specialized result beans like so:

// In action after processing
ResultBean result = new ResultBean();

// ...

request.setAttribute("RESULT",result);

// on page..


And then remove the bean from scope at the end of the
page, or if I know it's in request scope, just let it
go out of scope.
   <%  session.removeAttribute( "myActionForm" ); %>


In this second way, the pages "know" what the name of the
form bean is, and also what scope it is in... this seems
worse than #1, but more handy.

Does anyone have suggestions of a good way to do this?  What are
you others doing?

Cheers,
  Don


--
Don Dwoske  
mailto:ddwoske@;genomecorp.com
"The clearest way into the Universe is through a forest wilderness" - John 
Muir


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



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


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



Re: [SIDEBAR] Form population (Was RE: request.setAttribute() for mconfusion)

2002-11-12 Thread Eddie Bush
Sri Sankaran wrote:


No sweat.  

The reason this discussion got so off whack was because I tried to slam a square peg in a round hole by continuing with Kris' example (Edit & Save actions) to make my point -- bad idea.  

So what *is* my scenario?  

Consider for example, a master-detail pair of pages.  The master page display a list of employee names.  The detail page -- which is displayed when a user selects an employee from the master page -- displays a collection of (possibly editable) fields that describe the selected employee.  

The form-bean associated with the detail page is your typical EmployeeBean object.  Even if the struts-config is set up with the right action mapping like


   type="com.acme.DetailAction"
   name="employeeBean"/>

how can Struts know that the user selected the user 'John Smith' on the master page?  Ergo, the need to create the necessary form bean in the action for the master page.  We cannot wait for/depend on Struts to create it.

John Smith has some unique identifying value, right?  You're going to 
need to grab this value on submit and send it to your detail action so 
that it knows which one to load.  Yes, yes, you could just create the 
form at that point and be done with it - but that is probably better 
left to your detail-loading-action - the one that populates the detail 
form and fowards to your JSP.

I don't like the fact that the MasterAction needs to have knowledge of the requirements for the detail page (the type of bean, the name under which it is accessed) -- or maybe that isn't so bad??


It needs to know which field the detail will use to lookup the record so 
that it can send it the value of that field.  Is that so bad?  You can't 
expect it to "just know".  There has to be something to tell it what you 
want to do.  They're obviously related - they're in a master-detail 
relationship - so why would such minimal coupling be bad?  You've got to 
have something to indicate what you want to do.  Right?

Are you telling me that I missed something fundamental to Struts?...'tis quite likely.

Sri


--
Eddie Bush




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




confirmation page best practice

2002-11-12 Thread Donald Dwoske

I have been wondering how people present action
results to users upon success.  I'm sure this has been asked before,
but I scanned the archive and didn't find a consensus.

In some cases I use specialized result beans like so:

// In action after processing
ResultBean result = new ResultBean();

// ...

request.setAttribute("RESULT",result);

// on page..


And then remove the bean from scope at the end of the
page, or if I know it's in request scope, just let it
go out of scope.
   <%  session.removeAttribute( "myActionForm" ); %>


In this second way, the pages "know" what the name of the
form bean is, and also what scope it is in... this seems
worse than #1, but more handy.

Does anyone have suggestions of a good way to do this?  What are
you others doing?

Cheers,
  Don


--
Don Dwoske  
mailto:ddwoske@;genomecorp.com
"The clearest way into the Universe is through a forest wilderness" - John Muir


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




Tiles/Digster classloading issue - was: Re: has anyone gotten struts 1.1b2to work on Jboss 3.0.3/tomcat 4.1.12 ?

2002-11-12 Thread Kevin . Bedell




I've used tomcat 4.1.12 with JBoss 3.0.3 and had things working fine - though it looks 
like there may be some tiles-specific issues that are causing
problems.

I believe that changing the JDK, etc may not fix this particualr problem. There's a 
continuing thread happening currently in the jboss-user list. Here
 are some excerpts:



I've tracked down at least part of the problem:

1.  Tomcat 4.1.12 and Struts require the use of the
org.apache.commons.digester package.

2.  Struts (ActionServlet.java, line 1087) has:
>> configDigester.setUseContextClassLoader(true);

3.  Tiles uses the org.apache.commons.validator package, which in
turn uses org.apache.commons.digester. Part of the validator library,
ValidatorResourcesInitializer, does not set the useContextClassLoader
property. As a consequence, when it uses the Digester, it uses the
calling class' ClassLoader, which cannot find the classes required.



Later, the thread continues:


A separate instance of Digester is loaded by the Tiles framework,
through the ValidatorResourcesInitializer.initialize() method. This is
what I think is causing the problem.


So it looks as if the issue is related to the way Tiles calls the Digester to 
initialize itself...

Here's a link to the overall thread - you'll have to follow the thread for a while to 
get to the snippets above.

http://www.mail-archive.com/jboss-user@;lists.sourceforge.net/msg22047.html


Best of luck,

Kevin

http://www.strutskickstart.com







Vincent Stoessel <[EMAIL PROTECTED]> on 11/12/2002 11:20:39 AM

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

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Re: has anyone gotten struts 1.1b2 to work on Jboss
   3.0.3/tomcat 4.1.12 ?


Gemes Tibor wrote:
> 2002. november 12. 16:03 dátummal [EMAIL PROTECTED] ezt írtad:
>
>>I've gotten this configuration working - the sample application in my
book
>>uses it and contains step by step instructions for configuring it.
>>
>>I believe the classloader issue you are referring to is isolated to JDK
>>1.4. JDK 1.3.3 works fine -
>
>
>
> We had a lots of pain with deploying to jboss. We use tiles extensively.
> We tried jboss 3.0.3 w/tomcat, and had a bunch of ClassNotFoundException.
>
> We moved to jboss 3.0.4 w/o tomcat, and things seemed to work, until real
> deployment time. After a half day of searching the difference between the
> development and the live server we found that the devel server is running
> with java 1.4.1_01 and the live had 1.3.1 and 1.4.0. None of these
worked.
> Finally we installed java 1.4.1_01 and since then everithing seems to be
OK.
>
> linux, jboss 3.0.4 jetty, Sun JDK 1.4.1_01, struts jars from the
> struts-blank.war
>




Hmm, I have been putting off upgrading to 1.4.1 since 1.4.0 has been
working with no problems, but this is good reason to go ahead and do it.
I am going to take your advice and try the non-tomcat jboss.



--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




RE: Redux: Actions and business logic, or Using Struts with the Rational Unified Process

2002-11-12 Thread John Bigboote
Robert,

Thanks for butting in! ;-)

I mispoke when I said FormBeans.  My inexperience with
Struts reared ugly at that point.  Now that I have a
(somewhat) better handle on the design, I realize that
FormBeans are clearly in the presentation layer and
not in the problem domain.

John

--- Robert Taylor <[EMAIL PROTECTED]> wrote:
> How do you see FormBeans used in the problem domain?
> 
> If the problem domain is the business layer that
> contains
> the logic to solve the problem, then I believe it is
> best not to couple the business layer with any
> specific
> presentation layer, such as Struts, which would
> occur if
> you use FormBeans in your business tier.
> 
> Sorry for butting in, but that's just my 2 cents.
> 
> robert
> 
> > -Original Message-
> > From: John Bigboote [mailto:y0yodyne@;yahoo.com]
> > Sent: Monday, November 11, 2002 9:04 AM
> > To: Struts Users Mailing List
> > Subject: RE: Redux: Actions and business logic, or
> Using Struts with the
> > Rational Unified Process
> >
> >
> >
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > > > example apps, so I'm interested in how
> Struts
> > > > > maps to the contructs of RUP.
> > >
> > > RUP is a software methodology framework, so I
> > > wouldn't consider Struts something that maps to
> the
> > > constructs of RUP as much as an enabler
> technology
> > > designing maintainable J2EE applications using a
> > > myriad of proven design patterns and Java
> idioms.
> > >
> >
> > Well yes, RUP is a methodology framework, but when
> the
> > rubber hits the road in the design phase, Rational
> > advocates an MVC design for applications to
> separate
> > the presentation layer from the problem domain
> layer
> > from the persistence layer, yadda yadda.  Well,
> Struts
> > is an MVC framework.  Granted, while it tends
> toward
> > the presentation layer, it does provide mechanisms
> > that venture into the problem domain, like
> FormBeans.
> >
> > >
> > > > >
> > > > >  - Would a complex application utilize
> Struts as
> > > > > the overall architecture for all tiers, or
> just
> > > > > the presentation layer?  The previous thread
> > > > > seems to convey mixed opinions.
> > >
> > > Presentation. Read the home page of the Struts
> site.
> > > It tells you where the boundries are in a
> paragraph:
> > >
> > > http://jakarta.apache.org/struts/
> > >
> >
> > Paragraph 2 of the document referenced by that URL
> > says that "Struts provides its own Controller
> > component and integrates with other technologies
> to
> > provide the Model and the View".  It goes on to
> say
> > that this controller can interact with the model
> tier
> > in the form of Javabeans/EJBs, and view components
> > such as JSPs, Velocity templates, etc.  That
> implies
> > that Struts falls closer to the controller than
> one
> > would think.
> >
> > > > >
> > > > >  - If an architectural design called for a
> > > > > ScenarioController class for each use case,
> how
> > > > > would the boundary between this class and
> Struts
> >
> > > > > be manifested?  Should this
> ScenarioController
> > be
> > > > > an  extension of or external to Struts?
> > >
> > > Well, generally a scenario has an associated set
> of
> > > business logic to be done on the backend to
> > > accomplish this goal. Thus, you would probably
> > > engineer a stateless EJB that would contain 1 or
> > > more methods to accomplish this goal (probably
> one
> > > method, which may invoke multiple other
> components/
> > > EJBs once the single remote call from the web
> tier
> > is
> > > made).
> > >
> >
> > Agreed.  I guess the nature of my question stems
> from
> > the controller provided in Struts.  In the
> interests
> > of loose coupling of tiers, I would think that the
> > struts controller should be separate from scenario
> > controller  rather than putting scenario (i.e.
> > business) logic in the struts controller.
> >
> > I guess I'm hung up on the word "controller" and
> its
> > use in both the struts and Rational documents.  In
> my
> > mind, truly separate tiers means that the struts
> > controller should control the behavior of the
> > presentation layer, while the scenario behavior
> would
> > reside in other classes refered to in the Struts
> world
> > as the model.  Have I got this right?
> >
> >
> >
> > __
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> 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:   

Re: File Upload : Progress Bar

2002-11-12 Thread micael
Keep us posted.  If you run into some difficulties, I would be willing to 
jump in with some assistance, if I have some.  You can contact me at 
[EMAIL PROTECTED]

At 02:45 PM 11/12/2002 +0100, you wrote:
I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)

Going to try it...

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


Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



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



RE: From old JSP and Servlets to STRUTS

2002-11-12 Thread Karr, David
Show us some examples of why you think you can't remove the scriptlets.  Some of those 
cases are probably easily fixable.

However, you should probably first understand the model and framework before trying to 
fix your JSP pages.  This is because you'll find that anything resembling "business 
logic" will not be in your JSP pages.

Once you address that, you'll mostly just have a few scriptlet expressions left to 
cover cases that aren't easily covered with normal usage of Struts.

Just integrating with the JSTL will also help, as you can use some JSTL tags that use 
the JSTL EL instead of using scriptlets.

You can also move towards using the Struts-EL library (in the nightly build), which is 
a version of the Struts tag library which uses the JSTL EL engine to evaluate 
attribute values.

> -Original Message-
> From: Fernando Hernandez [mailto:fernando@;bit-bang.com]
> 
> I am student doing an intership and i just started to learn 
> about Struts
> because I'm currently transforming a J2EE web application composed by
> servlets and old-java-embedded-JSPs so it can adopt Model 2.
> 
> To acomplish this i found that using Struts is the prefect 
> answer. To reach
> my goal, at first I thought that maybe the best way to do it 
> was to first
> address the interface by taking out all the Java embedded in 
> all the JSPs,
> and change it with Struts, JSTL, custom made taglibs. After 
> doing this, i
> was going then to think about the Model and the framework itself...
> 
> But i have found that to take out the embedded java from the 
> JSP has been
> very difficult, since the objects(I'd like to say JavaBeans, 
> bur they 're
> not exactly that, and actually that is part of the problem) which were
> sended from the logic to the presentation were very complex 
> in nature and
> the content an not be presented just by using the strut's, 
> JSTL or many
> other libraries i have looked exhaustively.
> 
> So, should i leave some Java embedded in the JSPs?
> If the answer to the previous question is "yes", should I 
> maybe put the
> embedded Java into custom tag libraries made by me? or maybe 
> use includes or
> imports?
> 
> 
> I please ask your help on this since I'm running out of time.
> 
> Thanks from Madrid.
> 
> 
> Fernando Hernandez.
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 

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




Re: about html:error ( error handling )

2002-11-12 Thread wolfgang
Hi Mouratidis,

Thank you for replying me.

but unfortunately that's not what I wanted to know.

I wasn't asking how to just handle errors.

thank you.
wolfgang


-- 
wolfgang <[EMAIL PROTECTED]>


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




[ANNOUNCE] display tag- added columns functionality

2002-11-12 Thread Rick Reumann
In recent weeks I've noticed several people inquire about Ed Hill's
awesome display tag http://edhill.its.uiowa.edu/display-0.8/
and the ability to only display certain columns.

I modified the jar and tld so that you can now provide a
"columnsToDisplay" attribute in the display:table tag.
columnsToDisplay just needs to be a String array of the columns you
want to display. The only caveat is the Strings in the array should
represent the titles of the columns and not the names of the fields.
(I suppose I should change that, but I wasn't sure if it would still
work when you use one of the table decorators. It shouldn't be a problem,
though, so I'll probably change that).

If anyone wants the jar/tld feel free to e-mail me or if I hear from
Ed, I'll see if he wants to include it in his latest release or I
could provide a link to the code somewhere else.


-- 

Rick
mailto:maillist@;reumann.net


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




Re: Logging change between Struts 1.1B1 and 1.1B2? - FIXED!

2002-11-12 Thread Ryan Cornia
Never mind. I missed the instructions about updating commons-logging to
1.0.1. Once I did that, everything seems OK.

Thanks,
Ryan


Ryan Cornia
IT Programmer Analyst / eSolutions Team Leader
Department of Community and Economic Development
State of Utah

>>> [EMAIL PROTECTED] 11/12/02 10:16AM >>>
I've tried it with log4j.jar and log4j.properties in war, but I get
the
same results. 

Any other ideas?

Thanks,
Ryan


>>> [EMAIL PROTECTED] 11/12/02 08:33AM >>>
2002. november 12. 16:23 dátummal Ryan Cornia ezt írtad:

> I took one application and updated it to Struts 1.1B2 and
re-deployed,
> and now all of the INFO messages for that application are displayed.
How
> do I removed them? B2 is apparently not using tomcats global log4j
> configuration

I keep the log4j.jar in WEB-INF/lib and log4j.properties in
WEB-INF/classes. I 
don't know wheter it makes any difference however. Is not there a 
log4j.properties on your classpath allready?

Hth,

Tib

--
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: Map iterate problem Application Scope

2002-11-12 Thread Mark Ayad

One of thoes afternoons it all works now, I've attatche all the code

urgh ?

- Original Message -
From: "Vinh Tran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 6:15 PM
Subject: RE: Map iterate problem


> Mark:
>
> Please include code otherwise I can't help youand include the error
you
> are receiving.
>
> Vinh
>
> -Original Message-
> From: Mark Ayad [mailto:mark@;javamark.com]
> Sent: Tuesday, November 12, 2002 11:05 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Map iterate problem
>
>
> Map iterate problemSorry that doesn't work
>
> >From the documentation:
>
> id
>
> The name of a page scope JSP bean that will contain the current element of
> the collection on each iteration.
>
> but my bean is stored in the application scope:
>
> Unless my problem lies in my iterate tag ?
>   - Original Message -
>   From: Vinh Tran
>   To: Struts Users Mailing List ; [EMAIL PROTECTED]
>   Sent: Tuesday, November 12, 2002 4:45 PM
>   Subject: RE: Map iterate problem
>
>
>   sorry...forgot the property attribute...
>
>   
> -Original Message-
> From: Vinh Tran [mailto:vinht@;processintelligence.com]
> Sent: Tuesday, November 12, 2002 10:40 AM
> To: Struts Users Mailing List
> Subject: RE: Map iterate problem
>
>
> Or you can define your Map from MultiMap
>
> (Note: some changes made to MutiMap)
> public class MultiMap
> {
>  public Map mymap = 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 getMyMap()
> {
>  return myMap;
> }
> }
>
> then.
>
> then simply iterate through yourMapHope this works.Vinh
>   -Original Message-
>   From: Hookom, Jacob John [mailto:hookomjj@;uwec.edu]
>   Sent: Tuesday, November 12, 2002 10:19 AM
>   To: Struts Users Mailing List
>   Subject: RE: Map iterate problem
>
>
>   Your multimap must be an instance of java.util.Map to get
> logic:iterate to recognize/handle it properly.
> -Original Message-
> From: Mark Ayad [mailto:mark@;javamark.com]
> Sent: Tue 11/12/2002 9:17 AM
> To: Struts Users Mailing List
> Cc:
> 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:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



MemoryPlugin.java
Description: java/


MultiMap.java
Description: java/


test.jsp
Description: Binary data
--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Display tag with Tiles

2002-11-12 Thread Zeltser, Mark
Hi,

I am using Ed's display tag version 0.8. Did anyone succeeded to get
export function( export data to csv, excel, xml) to work with tiles?

In my case data is displayed directly in the browser, however
exporting works with provided example.

Thanks. Mark.

--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.



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




  1   2   >