AW: LookupDispatchAction-problem getting started

2005-08-23 Thread Tiller, Volker
Thank you, the spaces work.

Volker 

 -Ursprüngliche Nachricht-
 Von:  Wendy Smoak [SMTP:[EMAIL PROTECTED]
 Gesendet am:  Montag, 22. August 2005 14:43
 An:   Struts Users Mailing List
 Betreff:  Re: LookupDispatchAction-problem getting started
 
 From: Tiller, Volker [EMAIL PROTECTED]
 
  I can't get started with the example about using LookupDispatchAction
  of Ted Husted, Tip #3 (http://husted.com/struts/tips/index.html).
  What is my error or can I get some working code ?
 
  forward name=testit path=/test.do?method=button.add/
 
 The 'method' parameter should be set to the _value_ from 
 ApplicationResources.properties (not the key).  I'm not sure how to encode 
 the spaces to do this manually, maybe method=add+it+all or 
 method=add%20it%20all.  Or maybe the spaces will just work. (It's early...)
 
 Here's what happens:
 - the framework sees add it all as the value of the 'method' parameter
 - it figures out that 'add it all' came from the 'button.add' property
 - looks up 'button.add' in the keyMethodMap and finds 'add'
 - calls the 'add' method in your Action
 
 (Naming the parameter something other than 'method' may make things 
 clearer-- maybe 'choice'.)
 
 HTH,
 -- 
 Wendy Smoak
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Problem with logic:present TAG

2005-08-23 Thread Kade Jeevan Kumar
Hi All!
 
I am developing an application where i needs to populate a value which is of 
boolean type.
 
A sample snippet of code giving below - 

logic:present name=xyzform property=exists
/logic:present
 
Here, 'exists' is a boolean type.  my requirement is to chek if exists is true 
display some message else display some different message.
 
I feel the problem lies here, according to Struts Bean Tag library we cann't 
use boolean type with logic:present
 
Can any one suggest me the possible solution.
 
Thanks in Advance
 
Jeevan
 


-
 Start your day with Yahoo! - make it your home page 

Re: Problem with logic:present TAG

2005-08-23 Thread Gareth Evans

you could try

logic:equal name=xyzform property=exists value=true

/logic:equal

Gareth

Kade Jeevan Kumar wrote:

Hi All!
 
I am developing an application where i needs to populate a value which is of boolean type.
 
A sample snippet of code giving below - 


logic:present name=xyzform property=exists
/logic:present
 
Here, 'exists' is a boolean type.  my requirement is to chek if exists is true display some message else display some different message.
 
I feel the problem lies here, according to Struts Bean Tag library we cann't use boolean type with logic:present
 
Can any one suggest me the possible solution.
 
Thanks in Advance
 
Jeevan
 



-
 Start your day with Yahoo! - make it your home page 


--
Gareth Evans

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

--
Tel:+44 (0)870 0100 704
Fax:+44 (0)870 9010 705
E-Mail: [EMAIL PROTECTED]
Web:www.msoft.co.uk

--
Terms:
Please note that any prices quoted within this e-mail are subject to VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
--
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.


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



Re: Modularizing struts-config.xml

2005-08-23 Thread Leon Rosenberg

 Yes, you can use any number of struts-config files; there is a 
 servlet init parameter which accepts a comma-separated list.
 
param-nameconfig/param-name
param-value
  /WEB-INF/struts-config.xml,
  /WEB-INF/admin/struts-config.xml,
  /WEB-INF/approval/struts-config.xml,
 ...
 /param-value
 

is it an 1.1 feature or only available in later versions?

regards
leon



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



handleConfigException in Struts 1.1

2005-08-23 Thread Pilgrim, Peter
(I still need the source code for Struts 1.1)

My real problem is a Struts 1.1 application ( my client does not want to 
upgrade 1.2. )
deployed on a WebLogic 8.1 Server. The application fails to deploy because
of a parsing error. Has anyone come across this type of stack trace before?



22-Aug-2005 17:57:53 o'clock BST Error HTTP lnl45a-4102 asds1 
ExecuteThread: '1' for queue: 'weblogic.kernel.System' WLS Kernel  
BEA-1012
16 Servlet: action failed to preload on startup in Web application: asds.
javax.servlet.UnavailableException: Parsing error processing resource path
at 
org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:1035)
at 
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1014)
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at 
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
at 
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
at 
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
at 
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3260)
at 
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3205)
at 
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3182)
at 
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5663)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
at 
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2022)
at 
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2063)
at 
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
at 
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
at 
weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
at 
weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
at 
weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
at 
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
at 
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at 
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at 
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at 
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)


The struts-config.xml appears to be flawless, but it is better to have
multiple eyes beating my two very experienced eyes. I just don't see
any wrong in the struts-config in the simplest cut down version 
and the bean classes do exist in the right place. Yes, I started a process
of elimination investigation to isolate the failure. Is it the XML? Struts? 
or WLS?

?xml version=1.0 encoding=UTF-8?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

struts-config

  !-- == Form Bean Definitions === --

  form-beans
form-bean name=NavigateForm type=com.csfb.asds.ui.form.NavigateForm / 
  /form-beans

  !-- == Global Forward Definitions == --

  global-forwards
forward name=blank path=/secured/index.jsp redirect=true /
  /global-forwards

  !-- == Action Mapping Definitions == --

/struts-config




The b**t**d thing is that WLS and Struts do not seem to obey Log4j.properties
setting I ordered ``log4j.logger.org.apache.struts = DEBUG''. I would expect
a very verbose WebLogic application server log files, but it doesn't do it
for me. I remember doing it in JBoss, Oracle AS 9.0 and Tomcat 4.1.24 circa 
2003! 
How else do you get Struts 1.1 to dump shed load of debugger output (again)? 

Failing that I want to hack the 1.1 code to show the exception stacktrace(s). 
I believe there is 

Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Nicolas De Loof


I've put it on
http://loof.free.fr/jakarta-struts-1.1-src.zip

Hope it will help you.

Nico.

Pilgrim, Peter a écrit :


Can anyone tell me where I can download the full Struts 1.1 source code
other than http://archive.apache.org/dist/struts/ which is being blocked 
by my clients corporate security ?



--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications disclaimer: 


http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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

 



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


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



html:select auto selection

2005-08-23 Thread Chatzinikos, Fotis, VF-GR Consultant

Hello again, 

Some days ago I sent a mail here (Title: Pre-population of html:select
tag using multiplehtml:option tags) and got no reply.

Could somebody provide a working example of a combination of a
FormAction and a jsp page that correctly set an html list (select) tag
to the correct (selected) value?

Thanks in advance,
Fotis


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



AW: Problem with logic:present TAG

2005-08-23 Thread Tiller, Volker
should it work with

jsp:useBean id=myBean .../
...
c:if test=${myBean.exists}
...true-case
/c:if
c:if test=${!myBean.exists}
...false-case
/c:if

?

Volker

 -Ursprüngliche Nachricht-
 Von:  Kade Jeevan Kumar [SMTP:[EMAIL PROTECTED]
 Gesendet am:  Dienstag, 23. August 2005 09:29
 An:   user@struts.apache.org
 Betreff:  Problem with logic:present TAG
 
 Hi All!
  
 I am developing an application where i needs to populate a value which is of 
 boolean type.
  
 A sample snippet of code giving below - 
 
 logic:present name=xyzform property=exists
 /logic:present
  
 Here, 'exists' is a boolean type.  my requirement is to chek if exists is 
 true display some message else display some different message.
  
 I feel the problem lies here, according to Struts Bean Tag library we cann't 
 use boolean type with logic:present
  
 Can any one suggest me the possible solution.
  
 Thanks in Advance
  
 Jeevan
  
 
   
 -
  Start your day with Yahoo! - make it your home page 

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



RE: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Pilgrim, Peter

Thanks Nicolas. Tried downloading from your site, but something in the 
ZIP is triggering the down security here. Nothing to do with the URL 
location more probably I caught the bad side of the filter hashing 
algorithm.

--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


 -Original Message-
 From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 09:53
 To: Struts Users Mailing List
 Subject: Re: [URGENT] Struts 1.1 Source Download
 
 
 
 I've put it on
 http://loof.free.fr/jakarta-struts-1.1-src.zip
 
 Hope it will help you.
 
 Nico.
 
 Pilgrim, Peter a écrit :
 
 Can anyone tell me where I can download the full Struts 1.1 
 source code
 other than http://archive.apache.org/dist/struts/ which is 
 being blocked 
 by my clients corporate security ?
 
 
 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston, 
 Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497
 
 =
 =
 Please access the attached hyperlink for an important 
 electronic communications disclaimer: 
 
 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
 
 =
 =
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 
 
 This message contains information that may be privileged or 
 confidential and is the property of the Capgemini Group. It 
 is intended only for the person to whom it is addressed. If 
 you are not the intended recipient,  you are not authorized 
 to read, print, retain, copy, disseminate,  distribute, or 
 use this message or any part thereof. If you receive this  
 message in error, please notify the sender immediately and 
 delete all  copies of this message.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Emmanouil Batsis


Long shot but have you tried using HTTPS?

Pilgrim, Peter wrote:

Thanks Nicolas. Tried downloading from your site, but something in the 
ZIP is triggering the down security here. Nothing to do with the URL 
location more probably I caught the bad side of the filter hashing 
algorithm.


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497


 


-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: 23 August 2005 09:53
To: Struts Users Mailing List
Subject: Re: [URGENT] Struts 1.1 Source Download



I've put it on
http://loof.free.fr/jakarta-struts-1.1-src.zip

Hope it will help you.

Nico.

Pilgrim, Peter a écrit :

   

Can anyone tell me where I can download the full Struts 1.1 
 


source code
   

other than http://archive.apache.org/dist/struts/ which is 
 

being blocked 
   


by my clients corporate security ?


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497

=
 


=
   

Please access the attached hyperlink for an important 
 

electronic communications disclaimer: 
   


http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

=
 


=
   


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



 

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



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


   



==
Please access the attached hyperlink for an important electronic communications disclaimer: 


http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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

 




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



Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Emmanouil Batsis


Right, no dice. Perhaps one should email the archive to you.

Emmanouil Batsis wrote:


Long shot but have you tried using HTTPS?

Pilgrim, Peter wrote:

Thanks Nicolas. Tried downloading from your site, but something in 
the ZIP is triggering the down security here. Nothing to do with the 
URL location more probably I caught the bad side of the filter 
hashing algorithm.


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada 
Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497


 


-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: 23 August 2005 09:53
To: Struts Users Mailing List
Subject: Re: [URGENT] Struts 1.1 Source Download



I've put it on
http://loof.free.fr/jakarta-struts-1.1-src.zip

Hope it will help you.

Nico.

Pilgrim, Peter a écrit :

  

Can anyone tell me where I can download the full Struts 1.1 


source code
  

other than http://archive.apache.org/dist/struts/ which is 


being blocked   


by my clients corporate security ?


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada 
Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497

=



=
  

Please access the attached hyperlink for an important 


electronic communications disclaimer:   


http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

=



=
  


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






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



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


  



== 

Please access the attached hyperlink for an important electronic 
communications disclaimer:

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

== 




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

 




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




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



Re: AW: Problem with logic:present TAG

2005-08-23 Thread d d
  
try using logic:equal along with logic:present

On Tue, 23 Aug 2005 Tiller,Volker wrote :
should it work with

jsp:useBean id=myBean .../
...
c:if test=${myBean.exists}
...true-case
/c:if
c:if test=${!myBean.exists}
...false-case
/c:if

?

Volker

  -Ursprüngliche Nachricht-
  Von:Kade Jeevan Kumar [SMTP:[EMAIL PROTECTED]
  Gesendet am:Dienstag, 23. August 2005 09:29
  An: user@struts.apache.org
  Betreff:Problem with logic:present TAG
 
  Hi All!
 
  I am developing an application where i needs to populate a value which is 
  of boolean type.
 
  A sample snippet of code giving below -
 
  logic:present name=xyzform property=exists
  /logic:present
 
  Here, 'exists' is a boolean type.  my requirement is to chek if exists is 
  true display some message else display some different message.
 
  I feel the problem lies here, according to Struts Bean Tag library we 
  cann't use boolean type with logic:present
 
  Can any one suggest me the possible solution.
 
  Thanks in Advance
 
  Jeevan
 
 
 
  -
   Start your day with Yahoo! - make it your home page

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



[URGENT] Struts 1.1 Source Download

2005-08-23 Thread Pilgrim, Peter

Can anyone tell me where I can download the full Struts 1.1 source code
other than http://archive.apache.org/dist/struts/ which is being blocked 
by my clients corporate security ?


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



RE: 'required' is undefined when using struts javascript validation

2005-08-23 Thread Mariano Petrakovsky
The problem si the function name generated by struts.

I'm fix this problem, modifying the validator_rules.xml (I'm attach this)...
Sure exist a more correct to resolve this problem... but... time is money.

The function name generated by struts is formName_required (form) for
required validator for instance. But the javascript in validator_rules.xml
search for a required(form) function. I modify the javascript in
validator_rules.xml for it search the correct function name.

Saludos :)...

--
Mariano G. Petrakovsky
Programmer · Software Factory
AXG Tecnonexo -  www.tecnonexo.com

Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.

Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.


· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · ·


-Mensaje original-
De: Tian Chi [mailto:[EMAIL PROTECTED]
Enviado el: Martes, 23 de Agosto de 2005 02:44
Para: user@struts.apache.org
Asunto: 'required' is undefined when using struts javascript validation


Hi,

I'm a newbie at using strus and have been trying to get client-side
validation to work using Struts, but I 'm receiving a javascript error while
trying to use the
'required ' validation rule. The error in IE and FireFox both say:

Error: 'required ' is undefined

When I look at the generated javascript, it seems the object 'required' is
not defined in the following generated function. Can anyone give me some
guidance how to resolve this? I'd really appreciate it.  Hope to hear from
you soon.

function validateRequired(form) {
var isValid = true;
var focusField = null;
var i = 0;
var fields = new Array();
oRequired = new required();
for (x in oRequired) {
var field = form[oRequired[x][0]];
... blah  blah 


Thanks in advance,

-Paul



-
 Start your day with Yahoo! - make it your home page
!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN
  http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;
!--

   This file contains the default Struts Validator pluggable validator
   definitions.  It should be placed somewhere under /WEB-INF and
   referenced in the struts-config.xml under the plug-in element
   for the ValidatorPlugIn.

  plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames value=/WEB-INF/validator-rules.xml,
  /WEB-INF/validation.xml/
  /plug-in

   These are the default error messages associated with
   each validator defined in this file.  They should be
   added to your projects ApplicationResources.properties
   file or you can associate new ones by modifying the
   pluggable validators msg attributes in this file.

   # Struts Validator Error Messages
   errors.required={0} is required.
   errors.minlength={0} can not be less than {1} characters.
   errors.maxlength={0} can not be greater than {1} characters.
   errors.invalid={0} is invalid.

   errors.byte={0} must be a byte.
   errors.short={0} must be a short.
   errors.integer={0} must be an integer.
   errors.long={0} must be a long.
   errors.float={0} must be a float.
   errors.double={0} must be a double.

   errors.date={0} is not a date.
   errors.range={0} is not in the range {1} through {2}.
   errors.creditcard={0} is an invalid credit card number.
   errors.email={0} is an invalid e-mail address.

--

form-validation

   global

  validator name=required
classname=org.apache.struts.validator.FieldChecks
   method=validateRequired
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest
  msg=errors.required

 javascript![CDATA[
function validateRequired(form) {
var isValid = true;
var focusField = null;
var i = 0;
var fields = new Array();
eval('oRequired = new ' + form.name + '_required();');
//oRequired = new eval(formName_required();
for (x in oRequired) {
	var field = form[oRequired[x][0]];
	
if (field.type == 'text' ||
field.type == 'textarea' ||
field.type == 'file' ||
field.type == 'select-one' ||
field.type == 'radio' ||
field.type == 'password') {

var value = '';
		// 

Struts Hibernate error

2005-08-23 Thread Luiz Godoy

I´m having this error using eclipse, with struts and hibernate, any clue ?

INFO: using CGLIB reflection optimizer

23/08/2005 10:12:25 org.hibernate.cfg.Environment clinit

INFO: using JDK 1.4 java.sql.Timestamp handling

23/08/2005 10:12:25 org.apache.struts.action.RequestProcessor processException

WARNING: Unhandled Exception thrown: class java.lang.RuntimeException

Thanks 


Luiz Octavio Godoy 

Desenvolvimento de Sistemas


-
 Start your day with Yahoo! - make it your home page 

Re: Struts Hibernate error

2005-08-23 Thread Emmanouil Batsis

Luiz Godoy wrote:


I´m having this error using eclipse, with struts and hibernate, any clue ?



Not without the stacktrace.

Manos

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



Re: Struts Hibernate error

2005-08-23 Thread Luiz Godoy
Here is it, i´m trying to test an action, but the error seem to come from 
Hibernate.
testLoadPage(test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction)
servletunit.struts.ExceptionDuringTestError: An uncaught exception was thrown 
during actionExecute()
 at 
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:305)
 at 
test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Root Cause:

javax.servlet.ServletException: Exception building SessionFactory: null
 at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
 at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 at 
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290)
 at 
test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
 at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Root Cause:

java.lang.RuntimeException: Exception building SessionFactory: null
 at 
com.bm.infra.persistence.hibernate.SessionManager.currentSession(SessionManager.java:34)
 at 
com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(HibernatePersistenceManager.java:185)
 at 
com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(HibernatePersistenceManager.java:175)
 at com.ccne.dao.FamiliaDNCDAO.findByCodigo(FamiliaDNCDAO.java:41)
 at com.ccne.bs.CadastroFamiliaDNC.findByCodigo(CadastroFamiliaDNC.java:34)
 at 
com.bm.pcs.corporativo.actions.FamiliaDNCAction.excluir(FamiliaDNCAction.java:118)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at 
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
 at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
 at com.bm.infra.web.action.BasicAction.execute(BasicAction.java:142)
 at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 at 
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290)
 at 
test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46)
 --- all i have here is the actionPerform(); on line 46
 at 

RE: Set the file name in html:file

2005-08-23 Thread Dharmendra . Sharan
Hi,

  If I understood you correctly, you are trying to have a default filename when 
you click download from within your application. In this case here's how it may 
be done:-

response.setContentType(application/ms-excel); // or whatever the content 
format is...
response.setHeader(Content-Disposition, inline; filename=ShipmentReport + 
accountNbr + .xls);
  
   where response is reference to the HttpServletResponse, and accountNbr 
is just a local variable to distinguish between different version reports (if 
any!)

  HTH,

  Dharmendra
ps: have a good day!
-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 23, 2005 1:39 AM
To: Struts Users Mailing List
Subject: Re: Set the file name in html:file


Browsers don't allow you to set a file name, as it could be a security risk

eg set file name to be c:\windows\someimportantfile.txt then get the 
form to auto submit and send the file to the server

Anuradha S.Athreya wrote:

Hello,

In the JSP, I need to set the default file name in the JSP. 
I'm using  html:file taglib.
I'm retrieving the file name (to be set) from a bean. What is the syntax for
this?




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


  


-- 
Jason Lea



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


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



RE: Struts Hibernate error

2005-08-23 Thread Marco Mistroni
hELLO,
how r you initializing your SessionFactory?
Specifically, how are you integrating Hibernate inside Struts?
Are you using a struts plugin for hibernate?
If you check www.hibernate.org, there are FAQ for how to properly use
A SessionFactory
Proper way was using a ServletFilter if I remember correctly...

If you want to avoid headaches, try to use Spring for managing
Hibernate session

HTH
marco


-Original Message-
From: Luiz Godoy [mailto:[EMAIL PROTECTED] 
Sent: 23 August 2005 14:48
To: Struts Users Mailing List
Subject: Re: Struts Hibernate error

Here is it, i´m trying to test an action, but the error seem to come
from Hibernate.
testLoadPage(test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction)
servletunit.struts.ExceptionDuringTestError: An uncaught exception was
thrown during actionExecute()
 at
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.j
ava:305)
 at
test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(Te
stFamiliaDNCAction.java:46)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:436)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:311)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:192)

Root Cause:

javax.servlet.ServletException: Exception building SessionFactory: null
 at
org.apache.struts.action.RequestProcessor.processException(RequestProces
sor.java:523)
 at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:421)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 at
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.j
ava:290)
 at
test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(Te
stFamiliaDNCAction.java:46)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:436)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:311)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:192)

Root Cause:

java.lang.RuntimeException: Exception building SessionFactory: null
 at
com.bm.infra.persistence.hibernate.SessionManager.currentSession(Session
Manager.java:34)
 at
com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(Hibe
rnatePersistenceManager.java:185)
 at
com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(Hibe
rnatePersistenceManager.java:175)
 at com.ccne.dao.FamiliaDNCDAO.findByCodigo(FamiliaDNCDAO.java:41)
 at
com.ccne.bs.CadastroFamiliaDNC.findByCodigo(CadastroFamiliaDNC.java:34)
 at
com.bm.pcs.corporativo.actions.FamiliaDNCAction.excluir(FamiliaDNCAction
.java:118)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:274)
 at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)
 at com.bm.infra.web.action.BasicAction.execute(BasicAction.java:142)
 at

Re: Struts Hibernate error

2005-08-23 Thread Emmanouil Batsis

Luiz Godoy wrote:



java.lang.RuntimeException: Exception building SessionFactory: null



Search the hibernate forums, could be anything from your 
hibernate.cfg.xml location to your JDK version. In any case, it has 
nothing to do with struts.


hth,

Manos

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



Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Ed Griebel
I've put it on dropload.com for you, retrieval information sent as
private e-mail. (dropload allows a user to send a big file, and
another user can download it once by visiting the website.)

-ed

On 8/23/05, Emmanouil Batsis [EMAIL PROTECTED] wrote:
 
 Right, no dice. Perhaps one should email the archive to you.
 
 Emmanouil Batsis wrote:
 
  Long shot but have you tried using HTTPS?
 
  Pilgrim, Peter wrote:
 
  Thanks Nicolas. Tried downloading from your site, but something in
  the ZIP is triggering the down security here. Nothing to do with the
  URL location more probably I caught the bad side of the filter
  hashing algorithm.
 
  --
  Peter Pilgrim :: J2EE Software Development
  Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
  Square, London E14 4QJ, United Kingdom
  Tel: +44-(0)207-883-4497
 
 
 
 
  -Original Message-
  From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Sent: 23 August 2005 09:53
  To: Struts Users Mailing List
  Subject: Re: [URGENT] Struts 1.1 Source Download
 
 
 
  I've put it on
  http://loof.free.fr/jakarta-struts-1.1-src.zip
 
  Hope it will help you.
 
  Nico.
 
  Pilgrim, Peter a écrit :
 
 
 
  Can anyone tell me where I can download the full Struts 1.1
 
  source code
 
 
  other than http://archive.apache.org/dist/struts/ which is
 
  being blocked
 
  by my clients corporate security ?
 
 
  --
  Peter Pilgrim :: J2EE Software Development
  Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
  Square, London E14 4QJ, United Kingdom
  Tel: +44-(0)207-883-4497
 
  =
 
 
  =
 
 
  Please access the attached hyperlink for an important
 
  electronic communications disclaimer:
 
  http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
 
  =
 
 
  =
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  This message contains information that may be privileged or
  confidential and is the property of the Capgemini Group. It is
  intended only for the person to whom it is addressed. If you are not
  the intended recipient,  you are not authorized to read, print,
  retain, copy, disseminate,  distribute, or use this message or any
  part thereof. If you receive this  message in error, please notify
  the sender immediately and delete all  copies of this message.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  ==
 
  Please access the attached hyperlink for an important electronic
  communications disclaimer:
  http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
 
  ==
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Pilgrim, Peter

That is not the point. The secsoft is triggering on the
contents of the JAR or zip file. In other word said 
corporate software is reading the entire mistakenly
(hash) matching on a word, and saying No way Charlie, out you go.

Anyway I now have the file. Do you remember back in the
days before the Internet? Do you remember the gnu ftpmail?
I once request 12 parts of GNU Emacs source file by email.
Just email with the URL, I mean FTP address, the directory
what you want you to download. The next morning I walked
in the office my Emacs was ready. Deattach them to directory
then run cat emacs*.dta  emacs-1.0.1-src.tar.gz on SunOS. Oh bliss!

--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 15:15
 To: Struts Users Mailing List
 Subject: Re: [URGENT] Struts 1.1 Source Download
 
 
 You know, you could have just gone here:
 http://archive.apache.org/dist/struts/struts-1.1/
 
 
 --
 James Mitchell
 Software Engineer / Open Source Evangelist
 Consulting / Mentoring / Freelance
 EdgeTech, Inc.
 http://www.edgetechservices.net/
 678.910.8017
 AIM:   jmitchtx
 Yahoo: jmitchtx
 MSN:   [EMAIL PROTECTED]
 Skype: jmitchtx
 
 
 
 On Aug 23, 2005, at 10:10 AM, Ed Griebel wrote:
 
  I've put it on dropload.com for you, retrieval information sent as
  private e-mail. (dropload allows a user to send a big file, and
  another user can download it once by visiting the website.)
 
  -ed
 
  On 8/23/05, Emmanouil Batsis [EMAIL PROTECTED] wrote:
 
 
  Right, no dice. Perhaps one should email the archive to you.
 
  Emmanouil Batsis wrote:
 
 
  Long shot but have you tried using HTTPS?
 
  Pilgrim, Peter wrote:
 
 
  Thanks Nicolas. Tried downloading from your site, but 
 something in
  the ZIP is triggering the down security here. Nothing to 
 do with  
  the
  URL location more probably I caught the bad side of the filter
  hashing algorithm.
 
  --
  Peter Pilgrim :: J2EE Software Development
  Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
  Square, London E14 4QJ, United Kingdom
  Tel: +44-(0)207-883-4497
 
 
 
 
 
  -Original Message-
  From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
  Sent: 23 August 2005 09:53
  To: Struts Users Mailing List
  Subject: Re: [URGENT] Struts 1.1 Source Download
 
 
 
  I've put it on
  http://loof.free.fr/jakarta-struts-1.1-src.zip
 
  Hope it will help you.
 
  Nico.
 
  Pilgrim, Peter a écrit :
 
 
 
 
  Can anyone tell me where I can download the full Struts 1.1
 
 
  source code
 
 
 
  other than http://archive.apache.org/dist/struts/ which is
 
 
  being blocked
 
 
  by my clients corporate security ?
 
 
  --
  Peter Pilgrim :: J2EE Software Development
  Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
  Square, London E14 4QJ, United Kingdom
  Tel: +44-(0)207-883-4497
 
  =
 
 
 
  =
 
 
 
  Please access the attached hyperlink for an important
 
 
  electronic communications disclaimer:
 
 
  http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
 
  =
 
 
 
  =
 
 
 
  
 - 
  
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  This message contains information that may be privileged or
  confidential and is the property of the Capgemini Group. It is
  intended only for the person to whom it is addressed. If you  
  are not
  the intended recipient,  you are not authorized to read, print,
  retain, copy, disseminate,  distribute, or use this 
 message or any
  part thereof. If you receive this  message in error, 
 please notify
  the sender immediately and delete all  copies of this message.
 
 
  
 -- 
  ---
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  
 === 
  ===
 
  Please access the attached hyperlink for an important electronic
  communications disclaimer:
  http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
 
  
 === 
  ===
 
 
 
  
 --- 
  --
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  
 

Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Martin Gainty
Yes..Most corp environments have big brother software to make sure you're 
not 'contaminating' their environment

Personally I like bringing my laptop for that reason
Martin
- Original Message - 
From: Pilgrim, Peter [EMAIL PROTECTED]

To: 'Struts Users Mailing List' user@struts.apache.org
Sent: Tuesday, August 23, 2005 10:30 AM
Subject: RE: [URGENT] Struts 1.1 Source Download



That is not the point. The secsoft is triggering on the
contents of the JAR or zip file. In other word said
corporate software is reading the entire mistakenly
(hash) matching on a word, and saying No way Charlie, out you go.

Anyway I now have the file. Do you remember back in the
days before the Internet? Do you remember the gnu ftpmail?
I once request 12 parts of GNU Emacs source file by email.
Just email with the URL, I mean FTP address, the directory
what you want you to download. The next morning I walked
in the office my Emacs was ready. Deattach them to directory
then run cat emacs*.dta  emacs-1.0.1-src.tar.gz on SunOS. Oh bliss!

--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston,
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497



-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: 23 August 2005 15:15
To: Struts Users Mailing List
Subject: Re: [URGENT] Struts 1.1 Source Download


You know, you could have just gone here:
http://archive.apache.org/dist/struts/struts-1.1/


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]
Skype: jmitchtx



On Aug 23, 2005, at 10:10 AM, Ed Griebel wrote:

 I've put it on dropload.com for you, retrieval information sent as
 private e-mail. (dropload allows a user to send a big file, and
 another user can download it once by visiting the website.)

 -ed

 On 8/23/05, Emmanouil Batsis [EMAIL PROTECTED] wrote:


 Right, no dice. Perhaps one should email the archive to you.

 Emmanouil Batsis wrote:


 Long shot but have you tried using HTTPS?

 Pilgrim, Peter wrote:


 Thanks Nicolas. Tried downloading from your site, but
something in
 the ZIP is triggering the down security here. Nothing to
do with
 the
 URL location more probably I caught the bad side of the filter
 hashing algorithm.

 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
 Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497





 -Original Message-
 From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 09:53
 To: Struts Users Mailing List
 Subject: Re: [URGENT] Struts 1.1 Source Download



 I've put it on
 http://loof.free.fr/jakarta-struts-1.1-src.zip

 Hope it will help you.

 Nico.

 Pilgrim, Peter a écrit :




 Can anyone tell me where I can download the full Struts 1.1


 source code



 other than http://archive.apache.org/dist/struts/ which is


 being blocked


 by my clients corporate security ?


 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston, Floor 15, 5 Canada
 Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497

 =



 =



 Please access the attached hyperlink for an important


 electronic communications disclaimer:


 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

 =



 =




- 
 

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






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



-- 
 ---

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







===
 ===

 Please access the attached hyperlink for an important electronic
 communications disclaimer:
 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml


===
 ===




--- 
 --

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








RE: Set the file name in html:file

2005-08-23 Thread karthikeyan.varadarajan

S. it is true. The browsers won't allow you to set the name of the file.


The user have to select the file name using the browse button.

Thanks
Regards
V.Karthi

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 23, 2005 11:09 AM
To: Struts Users Mailing List
Subject: Re: Set the file name in html:file


Browsers don't allow you to set a file name, as it could be a security
risk

eg set file name to be c:\windows\someimportantfile.txt then get the
form to auto submit and send the file to the server

Anuradha S.Athreya wrote:

Hello,

In the JSP, I need to set the default file name in the JSP.
I'm using  html:file taglib.
I'm retrieving the file name (to be set) from a bean. What is the
syntax for
this?




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


 


--
Jason Lea





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



Re: html:select auto selection

2005-08-23 Thread Wendy Smoak
From: Chatzinikos, Fotis, VF-GR Consultant 
[EMAIL PROTECTED]



Some days ago I sent a mail here (Title: Pre-population of html:select
tag using multiplehtml:option tags) and got no reply.


Try re-posting just the html:select section and the resulting HTML when 
you 'view source' on the page.  If your form bean has a matching String 
property, the framework ought to pre-select the right option for you.  If 
you haven't already, add a bean:write tag to prove that the form property 
is set to what you think it is.


Also, it's possible that some people didn't get past the first sentence 
where you said you're using 'reset' to preopulate a form bean.  (Normally, 
the only thing you need to do in 'reset' is set checkboxes to false, and 
then only for a session-scoped form bean.  A 'SetupAction' or some variant 
of DispatchAction can help with form pre-population.)



HTH,
--
Wendy Smoak 



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



Re: [Friday] [somewhat-ajax-related] XMLHttpRequest scoping problems

2005-08-23 Thread David Durham

Sudhaker Raj wrote:

You may want to check OpenRICO - http://openrico.org


Good link.  Much appreciated.


- Dave

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



Re: (ultra-newbie) Cannot forward to a JSP within WEB-INF

2005-08-23 Thread Glen Mazza
That was it--just switch redirect to false in order to forward 
instead.  Thanks Craig!


Glen


Craig McClanahan wrote:

On 8/22/05, Glen Mazza [EMAIL PROTECTED] wrote:



forward name=Failure path=/WEB-INF/pages/LoginForm.jsp
redirect=true/
forward name=Success path=/WEB-INF/pages/UserQuery.jsp
redirect=true/



You are using redirects here, which causes the browser to make a
second request to the new URL.  It's not legal to make a request
directly to a JSP page (or any other resource) inside the /WEB-INF
directory; you have to use forwards instead.

Craig

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




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



[Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Hi all:

I have been struggling all day to understand the features provided by 
Shale. Here's what i have so far:

I have a new skeletal project with just the jars in usecases.war in my 
WEB-INF/lib and 2 trivial jsps. index.jsp which forwards to logon.faces. 
logon.jsp is a usual logon page with un/pw stuff.

I have a LogonAction class (using org.apache.shale.usecases.profile
.LogonActions) which extends AbstractViewController. From the API docs for 
ViewController:

having your backing beans implement this interface (typically by 
extending AbstractViewController) will receive the benefit of the extra 
services described by this interface, all of which will be provided 
automatically.

So I took that to mean that Shale has provided me with this nice 
AbstractViewController so all I gotta do is exend it...? So, in my 
LogonAction I implemented init(), prerender() and preprocess() methods 
with trivial code. However, none of these methods are ever getting called. 
(The LogonAction.logon method however *is* getting called...)

There's more stuff in the docs about:
To be useful, the ViewController must be plugged into the application 
lifecycle through a custom JSF ViewHandler, like the ShaleViewHandler

So am I supposed to plug the LogonAction to ShaleViewHandler? How do I do 
that? (I didn't understand the docs here - and I can explain why but this 
is already a very long message so will desist..)

Plus there's stuff about registering my ViewController bean. But I had 
rather hoped that extending AbstractViewController would mean I wouldn't 
have to do that explicitly..?

I have looked at the logon stuff in faces-confing.xml in usecases.war but 
am afraid have drawn a blank..Kinda stuck at this point..(:(

Can someone please help me see what i am missing? Many thanks in advance!
Geeta

p.s. my faces-config.xml looks like this:

managed-bean
managed-bean-nameprofile$logon/managed-bean-name
managed-bean-class
  com.intellicare.shaleNShark.logon.LogonAction
/managed-bean-class
managed-bean-scoperequest/managed-bean-scope
managed-property
  description
Session scope attribute key under which the User instance for a
logged on user is stored.
  /description
  display-nameUser Key/display-name
  property-nameuserKey/property-name
  property-classjava.lang.String/property-class
  valueuser/value
/managed-property
  /managed-bean

 navigation-rule
from-view-id*/from-view-id
navigation-case
  from-outcomeauthenticated/from-outcome
  to-view-id/success.jsp/to-view-id
/navigation-case
navigation-case
  from-outcomeunauthenticated/from-outcome
  to-view-id/failure.jsp/to-view-id
/navigation-case
  /navigation-rule


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
[EMAIL PROTECTED] wrote on 08/23/2005 03:10:38 PM:
 
 I have a LogonAction class (using org.apache.shale.usecases.profile
 .LogonActions) which extends AbstractViewController. From the API docs 
for 
 ViewController:

I mean: 
I have a LogonAction class (using org.apache.shale.usecases.profile
.LogonActions as a prototype) which extends AbstractViewController. 

Thanks!
Geeta


Re: Login Problem

2005-08-23 Thread Laurie Harper
I guess that'd depend on the Tomcat version, but look at the documentation 
on session persistence and clustering.


L.

d d wrote:
  
First of all thanks for replying...

Actually i am authenticating user based on session attribute. i.e if user name 
is present in session.
As u said told abt 'sessions being serialized' can i know more about this..or 
how can i avoid it??

Regards.
dd

On Fri, 19 Aug 2005 Laurie Harper wrote :


d d wrote:


 I am working on a struts web application with oracle as back end.I use tomcat. 
I am using filter so that if user has not logged in he cannot access any of the 
pages.I have a problem for logging..
I login into my application..Use the application..Now if suddenly i close 
Tomcat Server.. and restart it ..and refresh my old page..it continues to work.
This perticularly happens if there is a action in url..
e.g address bar has. http/localhost:8080/web/app/ss.do and the server is 
restarted, filter does not work..and page continues to flow.
and if address bar contains http/../ss.jsp filter works and user is 
forced to login.
I havent judged the exact problem yet .Can anyone help me?


How are you performing authentication? If you're using HTTP Basic 
authentication, a restart of Tomcat wont clear the user's credentials from the 
browser so subsequent requests will continue to authenticate as you're seeing. 
Alternatively, if you're relying on data stored in the session to determine if 
the session has been authenticated, you may see this as a result of sessions 
being serialized to disk on Tomcat shutdown and reloaded on subsequent requests.

In other words, without knowing more about your authentication scheme it's 
impossible to say if this behaviour is 'wrong' or not. Perhaps you could post 
the filter code you're using?

L.
-- Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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







--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi all:
 
 I have been struggling all day to understand the features provided by
 Shale. Here's what i have so far:
 
 I have a new skeletal project with just the jars in usecases.war in my
 WEB-INF/lib and 2 trivial jsps. index.jsp which forwards to logon.faces.
 logon.jsp is a usual logon page with un/pw stuff.
 
 I have a LogonAction class (using org.apache.shale.usecases.profile
 .LogonActions) which extends AbstractViewController. From the API docs for
 ViewController:
 
 having your backing beans implement this interface (typically by
 extending AbstractViewController) will receive the benefit of the extra
 services described by this interface, all of which will be provided
 automatically.
 

I can see that automatically needs to be qualified by explaining
what registered means below.

 So I took that to mean that Shale has provided me with this nice
 AbstractViewController so all I gotta do is exend it...? So, in my
 LogonAction I implemented init(), prerender() and preprocess() methods
 with trivial code. However, none of these methods are ever getting called.
 (The LogonAction.logon method however *is* getting called...)
 
 There's more stuff in the docs about:
 To be useful, the ViewController must be plugged into the application
 lifecycle through a custom JSF ViewHandler, like the ShaleViewHandler
 
 So am I supposed to plug the LogonAction to ShaleViewHandler? How do I do
 that? (I didn't understand the docs here - and I can explain why but this
 is already a very long message so will desist..)
 
 Plus there's stuff about registering my ViewController bean. But I had
 rather hoped that extending AbstractViewController would mean I wouldn't
 have to do that explicitly..?

You will want to register your view controller beans as a managed bean
anyway, so that JSF will create them for you on demand.  But, for
Shale to provide the services it does, it must know how to translate
the view id --- something like /logon.jsp -- into the name of the
corresponding managed bean.  That way, when you navigate to that page,
Shale can precreate the bean and call the relevant event handlers.

There is an API defining a mapper (ViewControllerMapper), and a
default implementation (DefaultViewControllerMapper) that applies the
following rules to transform a viewId into a managed bean name:
* Strip any leading slash (/) character
* Strip any trailing extension (such as .jsp)
* Convert any remaining instance of a slash (/) into a dollar sign ($)

Thus, the managed bean name corresponding to /logon.jsp *must* be
named logon for it to be recognized as a ViewController.  In your
scenario, you left the name copied from the Use Cases example
(logon$profile), which would be suitable for a page named
/logon/profile.jsp.
 
 I have looked at the logon stuff in faces-confing.xml in usecases.war but
 am afraid have drawn a blank..Kinda stuck at this point..(:(
 
 Can someone please help me see what i am missing? Many thanks in advance!
 Geeta
 
 p.s. my faces-config.xml looks like this:
 
 managed-bean
 managed-bean-nameprofile$logon/managed-bean-name

Change this to logon and update any value binding expressions that
use it as well.

 managed-bean-class
   com.intellicare.shaleNShark.logon.LogonAction
 /managed-bean-class
 managed-bean-scoperequest/managed-bean-scope
 managed-property
   description
 Session scope attribute key under which the User instance for a
 logged on user is stored.
   /description
   display-nameUser Key/display-name
   property-nameuserKey/property-name
   property-classjava.lang.String/property-class
   valueuser/value
 /managed-property
   /managed-bean
 
  navigation-rule
 from-view-id*/from-view-id
 navigation-case
   from-outcomeauthenticated/from-outcome
   to-view-id/success.jsp/to-view-id
 /navigation-case
 navigation-case
   from-outcomeunauthenticated/from-outcome
   to-view-id/failure.jsp/to-view-id
 /navigation-case
   /navigation-rule
 
 

And yes, the javadocs do need to be clearer about the need for this. 
I'll add some more information to the ViewController class docs to
explain it.

Craig

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



Re: List selection manager 'widget'

2005-08-23 Thread Laurie Harper
Unless I'm missing something, that is for populating combo boxes based on 
selections in other combo boxes, e.g. for populating the State/Province 
combo box based on Country selection, etc. That's not quite the same.


L.


C.F. Scheidecker Antunes wrote:


Hi Laurie,

I am trying to do the same and I've done some research. One of the 
things I've found is the one bellow.


I would appreciate, if you find something diferent, to email it back to 
the list as well so that it would same time for me

and other developers as well.

Thanks,

C.F.

Maybe something like this would work for you:

http://javascript.js-x.com/examples/example.php?title=Multiple%20dynamic%20combo%20boxes%20Builder 



html
head
!--
This file retrieved from the Javascript Archives
http://javascript.js-x.com
1000s of free ready to use scripts, tutorials, forums.
Author: Mirko Elviro - http://www.js-x.com/
--
script language=JavaScript
/*
*** Multiple dynamic combo boxes
*** by Mirko Elviro, 9 Mar 2005
***
***Please do not remove this comment
*/

// This script supports an unlimited number of linked combo boxed
// Their id must be combo_0, combo_1, combo_2 etc.
// Here you have to put the data that will fill the combo boxes
// ie. data_2_1 will be the first option in the second combo box
// when the first combo box has the second option selected


// first combo box
data_1 = new Option(1, $);
data_2 = new Option(2, $$);

// second combo box
data_1_1 = new Option(11, -);
data_1_2 = new Option(12, -);
data_2_1 = new Option(21, --);
data_2_2 = new Option(22, --);
data_2_3 = new Option(23, --);
data_2_4 = new Option(24, --);
data_2_5 = new Option(25, --);

// third combo box
data_1_1_1 = new Option(111, *);
data_1_1_2 = new Option(112, *);
data_1_1_3 = new Option(113, *);
data_1_2_1 = new Option(121, *);
data_1_2_2 = new Option(122, *);
data_1_2_3 = new Option(123, *);
data_1_2_4 = new Option(124, *);
data_2_1_1 = new Option(211, **);
data_2_1_2 = new Option(212, **);
data_2_2_1 = new Option(221, **);
data_2_2_2 = new Option(222, **);
data_2_3_1 = new Option(231, ***);
data_2_3_2 = new Option(232, ***);

// fourth combo box
data_2_2_1_1 = new Option(2211,%)
data_2_2_1_2 = new Option(2212,%%)

// other parameters
displaywhenempty=-empty-
valuewhenempty=-1

displaywhennotempty=-select-
valuewhennotempty=0


function change(currentbox)
{
var numb = currentbox.id.split(_);
var currentbox = numb[1];
var i=parseInt(currentbox)+1;
// I empty all combo boxes following the current one
var _t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
while (_t  document.getElementById(combo_+i)!=null)
{
var son = document.getElementById(combo_+i);
// I empty all options except the first (it isn't allowed)
for (m=son.options.length-1;m0;m--)
son.options[m]=null;
// I reset the first option
son.options[0]=new Option(displaywhenempty,valuewhenempty);
i=i+1;
}

// now I create the string with the base name (stringa), ie. data_1_0
// to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box 
to fill

var stringa='data';
i=0;
_t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
while (_t  document.getElementById(combo_+i)!=null)
{
eval(stringa=stringa+'_'+document.getElementById(\combo_+i+\).selectedIndex); 


if (i==currentbox)
break;
i=i+1;
}

// filling the son combo (if exists)
var following=parseInt(currentbox)+1;
_t=eval(typeof(document.getElementById('combo_+following+'))!='undefined'); 


if (_t  document.getElementById(combo_+following)!=null)
{
son=document.getElementById(combo_+following);
stringa=stringa+_;
i=0;
while ((eval(typeof(+stringa+i+)!='undefined')) || (i==0))
{
// if there are no options, I empty the first option of the son combo
// otherwise I put -select- in it
if ((i==0)  eval(typeof(+stringa+0)=='undefined'))
if (eval(typeof(+stringa+1)=='undefined'))
eval(son.options[0]=new Option(displaywhenempty,valuewhenempty));
else
eval(son.options[0]=new Option(displaywhennotempty,valuewhennotempty));
else
eval(son.options[+i+]=new 
Option(+stringa+i+.text,+stringa+i+.value))

i++;
}
//son.focus();
i=1;
combostatus='';
cstatus=stringa.split(_);
while (cstatus[i]!=null)
{
combostatus=combostatus+cstatus[i];
i=i+1;
}
return combostatus;
}
}
/script
/head
body
form
select name=combo0 id=combo_0 onChange=change(this);
style=width:200px;
option value=value1-select-/option
option value=value21/option
option value=value32/option
/select
BRBR
select name=combo1 id=combo_1 onChange=change(this)
style=width:200px;
option value=value1 /option
/select
BRBR
select name=combo2 id=combo_2 onChange=change(this);
style=width:200px;
option value=value1 /option
/select
BRBR
select name=combo3 id=combo_3 onChange=change(this);
style=width:200px;
option value=value1 /option
/select
/form
BRcentera title='Javascript' href='http://javascript.js-x.com' 
http://javascript.js-x.com%27javascript.js-x.com 
http://javascript.js-x.com/a/center

/body
/html


Laurie Harper wrote:

Does anybody have, or know of, a good HTML form 'widget' 

Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Rick Reumann

Craig McClanahan wrote the following on 8/23/2005 3:27 PM:

And yes, the javadocs do need to be clearer about the need for this. 
I'll add some more information to the ViewController class docs to

explain it.


I'm still really confused by all of it as well. Actually what would be 
great I think is a VERY simple example of the ViewController 
implementation being used in a sample application. I know I'm supposed 
to read java docs, but I love learning from example apps:)


--
Rick

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, Rick Reumann [EMAIL PROTECTED] wrote:
 Craig McClanahan wrote the following on 8/23/2005 3:27 PM:
 
  And yes, the javadocs do need to be clearer about the need for this.
  I'll add some more information to the ViewController class docs to
  explain it.
 
 I'm still really confused by all of it as well. Actually what would be
 great I think is a VERY simple example of the ViewController
 implementation being used in a sample application. I know I'm supposed
 to read java docs, but I love learning from example apps:)
 

Hmm ... sounds like a shale-blank app (corresponding to
struts-blank) might be a good idea ...

Craig

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


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



[OT] RFP resources for java projects

2005-08-23 Thread Brian McGovern
Sorry for the off topic request, but I figured this might be a good place to 
ask.  Im looking for a resource that lists requests for proposal on java 
projects?  Any ideas?

Thanks
-B


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Rick Reumann

Craig McClanahan wrote the following on 8/23/2005 3:27 PM:


Thus, the managed bean name corresponding to /logon.jsp *must* be
named logon for it to be recognized as a ViewController.  In your
scenario, you left the name copied from the Use Cases example
(logon$profile), which would be suitable for a page named
/logon/profile.jsp.


Ok, this a total noob question, but it still has me confused. For 
example you'll see the use of a DataTable..


h:dataTable value=#{tableData.names} var=name
...

this above would mean that I need a managed bean named tableData 
configured. Ok I'm fine there.


But now I see that you were a mentioning you need managed beans with 
names that match a URL pattern? If so this is very confusing. Would you 
then need to duplicate the managed bean definitions?


For example (and this in relation to my question from yesterday), what 
if if I had a forward (or even someone typing in the url directly) that 
went to a page...


employees.jsp

and on that page, I needed to used a dataTable to show the list of 
employees. I currently have a managed bean definiton:


managed-bean
  managed-bean-nameemployeeBacking/managed-bean-name
 managed-bean-classnet.reumann.EmployeeBacking/managed-bean-class
  managed-bean-scoperequest/managed-bean-scope
   /managed-bean

I then planned to use it on the employees.jsp with a dataTable:

h:dataTable value=#{employeeBacking.employees} var=emp

EmployeeBacking extends AbstractViewController

and I have a prerender() in there that just throws in some sample data 
into my employees List in the EmployeeBacking class.


I'm too am having difficulty getting the prerender to fire:(

Is the problem that at I need another managed-bean definition with the 
name employees attached to the same EmployeeBacking object?


TIA for any help.



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



Re: List selection manager 'widget'

2005-08-23 Thread Daniel Schaller
Hi,

Try the javascript in the attached file. Works brilliant for me:

The function you need to use is moveOptions(srcID, targetID) where srcID and
targetID are the IDs of your both select boxes.

I hope that helps.

Cheers,
Daniel

On 23/8/05 20:22, Laurie Harper [EMAIL PROTECTED] wrote (with possible
deletions):

 Unless I'm missing something, that is for populating combo boxes based on
 selections in other combo boxes, e.g. for populating the State/Province
 combo box based on Country selection, etc. That's not quite the same.
 
 L.
 
 
 C.F. Scheidecker Antunes wrote:
 
 Hi Laurie,
 
 I am trying to do the same and I've done some research. One of the
 things I've found is the one bellow.
 
 I would appreciate, if you find something diferent, to email it back to
 the list as well so that it would same time for me
 and other developers as well.
 
 Thanks,
 
 C.F.
 
 Maybe something like this would work for you:
 
 http://javascript.js-x.com/examples/example.php?title=Multiple%20dynamic%20co
 mbo%20boxes%20Builder
 
 
 html
 head
 !--
 This file retrieved from the Javascript Archives
 http://javascript.js-x.com
 1000s of free ready to use scripts, tutorials, forums.
 Author: Mirko Elviro - http://www.js-x.com/
 --
 script language=JavaScript
 /*
 *** Multiple dynamic combo boxes
 *** by Mirko Elviro, 9 Mar 2005
 ***
 ***Please do not remove this comment
 */
 
 // This script supports an unlimited number of linked combo boxed
 // Their id must be combo_0, combo_1, combo_2 etc.
 // Here you have to put the data that will fill the combo boxes
 // ie. data_2_1 will be the first option in the second combo box
 // when the first combo box has the second option selected
 
 
 // first combo box
 data_1 = new Option(1, $);
 data_2 = new Option(2, $$);
 
 // second combo box
 data_1_1 = new Option(11, -);
 data_1_2 = new Option(12, -);
 data_2_1 = new Option(21, --);
 data_2_2 = new Option(22, --);
 data_2_3 = new Option(23, --);
 data_2_4 = new Option(24, --);
 data_2_5 = new Option(25, --);
 
 // third combo box
 data_1_1_1 = new Option(111, *);
 data_1_1_2 = new Option(112, *);
 data_1_1_3 = new Option(113, *);
 data_1_2_1 = new Option(121, *);
 data_1_2_2 = new Option(122, *);
 data_1_2_3 = new Option(123, *);
 data_1_2_4 = new Option(124, *);
 data_2_1_1 = new Option(211, **);
 data_2_1_2 = new Option(212, **);
 data_2_2_1 = new Option(221, **);
 data_2_2_2 = new Option(222, **);
 data_2_3_1 = new Option(231, ***);
 data_2_3_2 = new Option(232, ***);
 
 // fourth combo box
 data_2_2_1_1 = new Option(2211,%)
 data_2_2_1_2 = new Option(2212,%%)
 
 // other parameters
 displaywhenempty=-empty-
 valuewhenempty=-1
 
 displaywhennotempty=-select-
 valuewhennotempty=0
 
 
 function change(currentbox)
 {
 var numb = currentbox.id.split(_);
 var currentbox = numb[1];
 var i=parseInt(currentbox)+1;
 // I empty all combo boxes following the current one
 var _t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
 while (_t  document.getElementById(combo_+i)!=null)
 {
 var son = document.getElementById(combo_+i);
 // I empty all options except the first (it isn't allowed)
 for (m=son.options.length-1;m0;m--)
 son.options[m]=null;
 // I reset the first option
 son.options[0]=new Option(displaywhenempty,valuewhenempty);
 i=i+1;
 }
 
 // now I create the string with the base name (stringa), ie. data_1_0
 // to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box
 to fill
 var stringa='data';
 i=0;
 _t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
 while (_t  document.getElementById(combo_+i)!=null)
 {
 eval(stringa=stringa+'_'+document.getElementById(\combo_+i+\).selectedIn
 dex); 
 
 if (i==currentbox)
 break;
 i=i+1;
 }
 
 // filling the son combo (if exists)
 var following=parseInt(currentbox)+1;
 _t=eval(typeof(document.getElementById('combo_+following+'))!='undefined'
 ); 
 
 if (_t  document.getElementById(combo_+following)!=null)
 {
 son=document.getElementById(combo_+following);
 stringa=stringa+_;
 i=0;
 while ((eval(typeof(+stringa+i+)!='undefined')) || (i==0))
 {
 // if there are no options, I empty the first option of the son combo
 // otherwise I put -select- in it
 if ((i==0)  eval(typeof(+stringa+0)=='undefined'))
 if (eval(typeof(+stringa+1)=='undefined'))
 eval(son.options[0]=new Option(displaywhenempty,valuewhenempty));
 else
 eval(son.options[0]=new Option(displaywhennotempty,valuewhennotempty));
 else
 eval(son.options[+i+]=new
 Option(+stringa+i+.text,+stringa+i+.value))
 i++;
 }
 //son.focus();
 i=1;
 combostatus='';
 cstatus=stringa.split(_);
 while (cstatus[i]!=null)
 {
 combostatus=combostatus+cstatus[i];
 i=i+1;
 }
 return combostatus;
 }
 }
 /script
 /head
 body
 form
 select name=combo0 id=combo_0 onChange=change(this);
 style=width:200px;
 option value=value1-select-/option
 option value=value21/option
 option value=value32/option
 /select
 BRBR
 select name=combo1 id=combo_1 onChange=change(this)
 style=width:200px;
 option value=value1 /option
 

Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Larry Meadors
On 8/23/05, Craig McClanahan [EMAIL PROTECTED] wrote:
 
 Hmm ... sounds like a shale-blank app (corresponding to
 struts-blank) might be a good idea ...

+1!

:-D

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Larry Meadors [EMAIL PROTECTED] wrote on 08/23/2005 03:59:50 PM:

 On 8/23/05, Craig McClanahan [EMAIL PROTECTED] wrote:
  
  Hmm ... sounds like a shale-blank app (corresponding to
  struts-blank) might be a good idea ...
 
 +1!
 
 :-D
 

+..like.. a gazillion..? ;)


Re: List selection manager 'widget'

2005-08-23 Thread Daniel Schaller
Sorry, forgot the Javascript file.




On 23/8/05 20:59, Daniel Schaller [EMAIL PROTECTED]
wrote (with possible deletions):

 Hi,
 
 Try the javascript in the attached file. Works brilliant for me:
 
 The function you need to use is moveOptions(srcID, targetID) where srcID and
 targetID are the IDs of your both select boxes.
 
 I hope that helps.
 
 Cheers,
 Daniel
 
 On 23/8/05 20:22, Laurie Harper [EMAIL PROTECTED] wrote (with possible
 deletions):
 
 Unless I'm missing something, that is for populating combo boxes based on
 selections in other combo boxes, e.g. for populating the State/Province
 combo box based on Country selection, etc. That's not quite the same.
 
 L.
 
 
 C.F. Scheidecker Antunes wrote:
 
 Hi Laurie,
 
 I am trying to do the same and I've done some research. One of the
 things I've found is the one bellow.
 
 I would appreciate, if you find something diferent, to email it back to
 the list as well so that it would same time for me
 and other developers as well.
 
 Thanks,
 
 C.F.
 
 Maybe something like this would work for you:
 
 
http://javascript.js-x.com/examples/example.php?title=Multiple%20dynamic%20c
o
 mbo%20boxes%20Builder
 
 
 html
 head
 !--
 This file retrieved from the Javascript Archives
 http://javascript.js-x.com
 1000s of free ready to use scripts, tutorials, forums.
 Author: Mirko Elviro - http://www.js-x.com/
 --
 script language=JavaScript
 /*
 *** Multiple dynamic combo boxes
 *** by Mirko Elviro, 9 Mar 2005
 ***
 ***Please do not remove this comment
 */
 
 // This script supports an unlimited number of linked combo boxed
 // Their id must be combo_0, combo_1, combo_2 etc.
 // Here you have to put the data that will fill the combo boxes
 // ie. data_2_1 will be the first option in the second combo box
 // when the first combo box has the second option selected
 
 
 // first combo box
 data_1 = new Option(1, $);
 data_2 = new Option(2, $$);
 
 // second combo box
 data_1_1 = new Option(11, -);
 data_1_2 = new Option(12, -);
 data_2_1 = new Option(21, --);
 data_2_2 = new Option(22, --);
 data_2_3 = new Option(23, --);
 data_2_4 = new Option(24, --);
 data_2_5 = new Option(25, --);
 
 // third combo box
 data_1_1_1 = new Option(111, *);
 data_1_1_2 = new Option(112, *);
 data_1_1_3 = new Option(113, *);
 data_1_2_1 = new Option(121, *);
 data_1_2_2 = new Option(122, *);
 data_1_2_3 = new Option(123, *);
 data_1_2_4 = new Option(124, *);
 data_2_1_1 = new Option(211, **);
 data_2_1_2 = new Option(212, **);
 data_2_2_1 = new Option(221, **);
 data_2_2_2 = new Option(222, **);
 data_2_3_1 = new Option(231, ***);
 data_2_3_2 = new Option(232, ***);
 
 // fourth combo box
 data_2_2_1_1 = new Option(2211,%)
 data_2_2_1_2 = new Option(2212,%%)
 
 // other parameters
 displaywhenempty=-empty-
 valuewhenempty=-1
 
 displaywhennotempty=-select-
 valuewhennotempty=0
 
 
 function change(currentbox)
 {
 var numb = currentbox.id.split(_);
 var currentbox = numb[1];
 var i=parseInt(currentbox)+1;
 // I empty all combo boxes following the current one
 var _t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
 while (_t  document.getElementById(combo_+i)!=null)
 {
 var son = document.getElementById(combo_+i);
 // I empty all options except the first (it isn't allowed)
 for (m=son.options.length-1;m0;m--)
 son.options[m]=null;
 // I reset the first option
 son.options[0]=new Option(displaywhenempty,valuewhenempty);
 i=i+1;
 }
 
 // now I create the string with the base name (stringa), ie. data_1_0
 // to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box
 to fill
 var stringa='data';
 i=0;
 _t=eval(typeof(document.getElementById('combo_+i+'))!='undefined');
 while (_t  document.getElementById(combo_+i)!=null)
 {
 
eval(stringa=stringa+'_'+document.getElementById(\combo_+i+\).selectedI
n
 dex); 
 
 if (i==currentbox)
 break;
 i=i+1;
 }
 
 // filling the son combo (if exists)
 var following=parseInt(currentbox)+1;
 
_t=eval(typeof(document.getElementById('combo_+following+'))!='undefined'

 ); 
 
 if (_t  document.getElementById(combo_+following)!=null)
 {
 son=document.getElementById(combo_+following);
 stringa=stringa+_;
 i=0;
 while ((eval(typeof(+stringa+i+)!='undefined')) || (i==0))
 {
 // if there are no options, I empty the first option of the son combo
 // otherwise I put -select- in it
 if ((i==0)  eval(typeof(+stringa+0)=='undefined'))
 if (eval(typeof(+stringa+1)=='undefined'))
 eval(son.options[0]=new Option(displaywhenempty,valuewhenempty));
 else
 eval(son.options[0]=new Option(displaywhennotempty,valuewhennotempty));
 else
 eval(son.options[+i+]=new
 Option(+stringa+i+.text,+stringa+i+.value))
 i++;
 }
 //son.focus();
 i=1;
 combostatus='';
 cstatus=stringa.split(_);
 while (cstatus[i]!=null)
 {
 combostatus=combostatus+cstatus[i];
 i=i+1;
 }
 return combostatus;
 }
 }
 /script
 /head
 body
 form
 select name=combo0 id=combo_0 onChange=change(this);
 style=width:200px;
 option value=value1-select-/option
 option value=value21/option
 

Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Larry Meadors
I did not want to be greedy, but OK.

 ;-)

Larry


On 8/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Larry Meadors [EMAIL PROTECTED] wrote on 08/23/2005 03:59:50 PM:
 
  On 8/23/05, Craig McClanahan [EMAIL PROTECTED] wrote:
  
   Hmm ... sounds like a shale-blank app (corresponding to
   struts-blank) might be a good idea ...
 
  +1!
 
  :-D
 
 
 +..like.. a gazillion..? ;)
 


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



Re: Validator's indexedListProperty

2005-08-23 Thread Josh Cronemeyer
Ok, Looks like at least a few other people have found Struts guilty here.  I
have found a existing bug report 23372
http://issues.apache.org/bugzilla/show_bug.cgi?id=23372 that deals with this.
Basically Validator can handle indexed properties, but the indexed error
messages that it creates cannot be handled by the Struts custom JSP taglibs.
Perhaps I can write some custom taglibs to work around this.  On the subject
of custom taglibs if anyone is interested I have created a simple tutorial
based on a custom struts tag I created.  It is a custom div tag that lets
you change the class or id of the div when there are errors for the given
property.  Here is the link.  http://www.cuberick.com/?p=2  Lemme know if you
have any suggestions or questions.

On Mon, Aug 22, 2005 at 03:52:30PM -0500, Josh Cronemeyer wrote:
 On Mon, Aug 22, 2005 at 11:18:50AM -0500, Josh Cronemeyer wrote:
  Hi,
  
  I've been playing with the indexedListProperty to validate what a user has
  selected in my forms.  The problem I am having is that when an error message
  gets returned, It does not get associated with the form element
  (html:multibox property=test in my case).  I think the problem is that
  the message comes back with a key of test[x] where x is the index of the
  error.  If I just print out my error messages like this html:errors/ I can
  see the error message, but html:errors property=test/ doesn't show
  anything.  It seems like the html:errors tag should have an
  indexedListProperty parameter as well so I can display my error messages
  correctly.  What am i missing?
  
  Regards,
  
  josh cronemeyer
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 I've looked all over in the struts user guide and googled for information on
 this.  It appears that while the validator can handle validation of indexed
 beans in forms, the struts JSP taglibs cannot handle the resulting indexed
 messages.  Could this be a bug?  It sure looks that way.
 
 Thanks, 
 josh cronemeyer 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, Rick Reumann [EMAIL PROTECTED] wrote:
 Craig McClanahan wrote the following on 8/23/2005 3:27 PM:
 
  Thus, the managed bean name corresponding to /logon.jsp *must* be
  named logon for it to be recognized as a ViewController.  In your
  scenario, you left the name copied from the Use Cases example
  (logon$profile), which would be suitable for a page named
  /logon/profile.jsp.
 
 Ok, this a total noob question, but it still has me confused. For
 example you'll see the use of a DataTable..
 
 h:dataTable value=#{tableData.names} var=name
 ...
 
 this above would mean that I need a managed bean named tableData
 configured. Ok I'm fine there.

Yes, you'd need that, but not because of Shale ... that's pure JSF level stuff.

 
 But now I see that you were a mentioning you need managed beans with
 names that match a URL pattern? If so this is very confusing. Would you
 then need to duplicate the managed bean definitions?
 
 For example (and this in relation to my question from yesterday), what
 if if I had a forward (or even someone typing in the url directly) that
 went to a page...
 
 employees.jsp
 
 and on that page, I needed to used a dataTable to show the list of
 employees. I currently have a managed bean definiton:
 
 managed-bean
managed-bean-nameemployeeBacking/managed-bean-name
   managed-bean-classnet.reumann.EmployeeBacking/managed-bean-class
managed-bean-scoperequest/managed-bean-scope
 /managed-bean
 
 I then planned to use it on the employees.jsp with a dataTable:
 
 h:dataTable value=#{employeeBacking.employees} var=emp
 
 EmployeeBacking extends AbstractViewController
 
 and I have a prerender() in there that just throws in some sample data
 into my employees List in the EmployeeBacking class.
 
 I'm too am having difficulty getting the prerender to fire:(
 
 Is the problem that at I need another managed-bean definition with the
 name employees attached to the same EmployeeBacking object?
 
 TIA for any help.
 

The important principle is really pretty easy to articulate:

IF you want your backing bean to implement ViewController
and get its event methods called, THEN the name of the
managed bean MUST conform to the mapping rules.

That would mean, for a page named /employee.jsp, then the managed
bean name (if you use the default mapper, which is recommended) MUST
be employee, not employeeBacking.  Making that change would also
mean changing expressions that use employeeBacking now to use
employee instead, so you'd have:

  h:dataTable value=#{employee.employees} var=emp

since you're changing the name of the managed bean.

If you don't need your backing bean to implement ViewController, then
Shale imposes no restrictions ... pure JSF code continues to work. 
But you would not get the extra event calling services in that case.

Craig


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


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



Re: [OT] RFP resources for java projects

2005-08-23 Thread erikweber
Perhaps you mean something like rentacoder.com.

Erik


-Original Message-
From: Brian McGovern [EMAIL PROTECTED]
Sent: Aug 23, 2005 3:59 PM
To: Struts Users Mailing List user@struts.apache.org
Subject: [OT] RFP resources for java projects

Sorry for the off topic request, but I figured this might be a good place to 
ask.  Im looking for a resource that lists requests for proposal on java 
projects?  Any ideas?

Thanks
-B


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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Craig McClanahan [EMAIL PROTECTED] wrote on 08/23/2005 03:27:18 PM:

 Change this to logon and update any value binding expressions that
 use it as well.
 

Craig, as ever many thanks for your detailed reply! 

ok, so I changed my faces.config.xml and now my manged bean looks like 
this:

managed-bean
managed-bean-namelogon/managed-bean-name
managed-bean-class
etc..

Plus my logon.jsp has now:
h:commandButton   id=logon
   action=#{logon.logon}
value=#{messages['label.logon']}/

That's right, I hope? (I had profile$logon instead of logon.logon 
before..

Cleaned out my work directory, restarted tomcat, blah blah and now,... 
yeah!... I do hit the init(), prerender() and preprocess() methods! Cool, 
right? Well, not exactly. Now my logon method isn't getting hit..(:(. 
Instead I have nasty errors like this:

javax.servlet.ServletException: Error testing property 'username' in bean 
of type null
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
 org.apache.shale.faces.InvokeCommand.execute(InvokeCommand.java:40)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:166)
 
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:252)

root cause 
javax.faces.el.PropertyNotFoundException: Error testing property 
'username' in bean of type null
 
com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
 
org.apache.shale.faces.ShalePropertyResolver.getType(ShalePropertyResolver.java:206)
 com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
 com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
 com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:345)
 
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
 javax.faces.component.UIInput.getConvertedValue(UIInput.java:713)
 javax.faces.component.UIInput.validate(UIInput.java:638)
 javax.faces.component.UIInput.executeValidate(UIInput.java:849)
 javax.faces.component.UIInput.processValidators(UIInput.java:412)
 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
 javax.faces.component.UIForm.processValidators(UIForm.java:170)
 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
 javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
 
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
 com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
 com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
 org.apache.shale.faces.InvokeCommand.execute(InvokeCommand.java:40)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:166)
 
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:252)


So somehow my backing bean is now null; isn't being found any more or 
something..?
 
 Craig

Thanks again!
Geeta


[JSF] best practice for value object in backing bean - method names?

2005-08-23 Thread Rick Reumann
I posted this to the MyFaces list, but posting here as well since not 
sure where the best list is for posting these questions. (Ok, well, 
since Craig is active here, I'm taking advantage of that fact and 
sneaking in as many JSF posts here as I can:).


For sake of this discussion imagine a case where user needs to click on 
a button to get and invoice based off an invoice ID.


Now coming from struts I'm used to going to a 'getInvoice' dispatch 
method which would return to me an Invoice object (after making a 
backend call) and then that Invoice would be stuffed into the Request 
for use on the page we forward to.


With JSF, I'm assuming you'd typically want an InvoiceBackingBean and 
nested in there possibly an Inovice value object? So then on a JSP you 
could have   invoiceBackingBean.invoice.id   This would obviously mean 
your InvoiceBackingBean would need a getInvoice method that would 
return the instance of the Invoice object in the backing bean.


Where I'm now confused is what do you call the actual action method in 
your BackingBean that would do the true get (dao/service/delegate 
call) that would populate the Invoice object in the backing bean. Aren't 
you going to run into some odd naming conventions?  Do you make another 
method called retrieveInvoice ? So looking at the backingBean you'll 
have getInvoice - returns the invoice object in backing bean, and then 
you'll also have retrieveInvoice - which is what your forms will call 
when submitted to populate the actual invoice in the backing bean?


How do you gurus handle this?


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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
uh, ohsorry!! Was being a dufus again... Please ignore my earlier 
note. Had another profile$logon stuck in the username and pw fields in my 
jsp.. Sorry! Everything's working just fine now..:) 

Thanks a lot for the help, Craig! (and especially the explanation..:)

Geeta

[EMAIL PROTECTED] wrote on 08/23/2005 04:13:17 PM:

 Instead I have nasty errors like this:
 
 javax.servlet.ServletException: Error testing property 'username' in 
bean 
 of type null


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Rick Reumann

Craig McClanahan wrote the following on 8/23/2005 4:10 PM:


The important principle is really pretty easy to articulate:

IF you want your backing bean to implement ViewController
and get its event methods called, THEN the name of the
managed bean MUST conform to the mapping rules.

That would mean, for a page named /employee.jsp, then the managed
bean name (if you use the default mapper, which is recommended) MUST
be employee, not employeeBacking.  Making that change would also
mean changing expressions that use employeeBacking now to use
employee instead, so you'd have:

  h:dataTable value=#{employee.employees} var=emp


Is it typical then to end up with several ManagedBean definitions for 
the same backingBean but for different mappings?


In other words what if not just employee.jsp needed the Employee 
managed bean but also employees.jsp, employeeForm.jsp, FooBar.jsp 
all needed access to the managedBean?  If all of them needed the 
prerender to fire off then I would think each of them would have to be 
created with separate managed bean definitions?


--
Rick

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Craig McClanahan [EMAIL PROTECTED] wrote on 08/23/2005 03:27:18 PM:
 
  Change this to logon and update any value binding expressions that
  use it as well.
 
 
 Craig, as ever many thanks for your detailed reply!
 
 ok, so I changed my faces.config.xml and now my manged bean looks like
 this:
 
 managed-bean
 managed-bean-namelogon/managed-bean-name
 managed-bean-class
 etc..
 
 Plus my logon.jsp has now:
 h:commandButton   id=logon
action=#{logon.logon}
 value=#{messages['label.logon']}/
 
 That's right, I hope? (I had profile$logon instead of logon.logon
 before..
 
 Cleaned out my work directory, restarted tomcat, blah blah and now,...
 yeah!... I do hit the init(), prerender() and preprocess() methods! Cool,
 right?

Yep :-).

 Well, not exactly. Now my logon method isn't getting hit..(:(.
 Instead I have nasty errors like this:
 
 javax.servlet.ServletException: Error testing property 'username' in bean
 of type null

This means that one of your value binding expressions that includes
username is likely to still be messed up.  When you changed the
managed bean name from profile$logon to logon, you'll need to
update *all* the expressions that used to say profile$logon ... not
just one of them.

Craig

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Rick Reumann [EMAIL PROTECTED] wrote on 08/23/2005 04:31:41 PM:

 Craig McClanahan wrote the following on 8/23/2005 4:10 PM:
 
  The important principle is really pretty easy to articulate:
  
  IF you want your backing bean to implement ViewController
  and get its event methods called, THEN the name of the
  managed bean MUST conform to the mapping rules.
  
  That would mean, for a page named /employee.jsp, then the managed
  bean name (if you use the default mapper, which is recommended) MUST
  be employee, not employeeBacking.  Making that change would also
  mean changing expressions that use employeeBacking now to use
  employee instead, so you'd have:
  
h:dataTable value=#{employee.employees} var=emp
 
 Is it typical then to end up with several ManagedBean definitions for 
 the same backingBean but for different mappings?

Funny, I was *just* thinking that! And then I figured it is because in the 
Struts world, we are typically used to thinking of a form bean as being 
shared by many jsps. But I think in the Faces world perhaps the backing 
bean and the jsp are supposed to be really tightly integrated..(almost the 
same (one) thing..?)

 
 In other words what if not just employee.jsp needed the Employee 
 managed bean but also employees.jsp, employeeForm.jsp, FooBar.jsp 
 all needed access to the managedBean?  If all of them needed the 
 prerender to fire off then I would think each of them would have to be 
 created with separate managed bean definitions?
 
 -- 
 Rick

Geeta


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Craig McClanahan [EMAIL PROTECTED] wrote on 08/23/2005 04:38:23 PM:

 Yep :-).
 
  Well, not exactly. Now my logon method isn't getting hit..(:(.
  Instead I have nasty errors like this:
  
  javax.servlet.ServletException: Error testing property 'username' in 
bean
  of type null
 
 This means that one of your value binding expressions that includes
 username is likely to still be messed up.  When you changed the
 managed bean name from profile$logon to logon, you'll need to
 update *all* the expressions that used to say profile$logon ... not
 just one of them.

Right on as usual. That was just the problem..:)

 Craig

Geeta


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, Rick Reumann [EMAIL PROTECTED] wrote:
 Craig McClanahan wrote the following on 8/23/2005 4:10 PM:
 
  The important principle is really pretty easy to articulate:
 
  IF you want your backing bean to implement ViewController
  and get its event methods called, THEN the name of the
  managed bean MUST conform to the mapping rules.
 
  That would mean, for a page named /employee.jsp, then the managed
  bean name (if you use the default mapper, which is recommended) MUST
  be employee, not employeeBacking.  Making that change would also
  mean changing expressions that use employeeBacking now to use
  employee instead, so you'd have:
 
h:dataTable value=#{employee.employees} var=emp
 
 Is it typical then to end up with several ManagedBean definitions for
 the same backingBean but for different mappings?
 

Why would you need that?  I typically use a 1:1 mapping between JSP
pages and backing beans.

 In other words what if not just employee.jsp needed the Employee
 managed bean but also employees.jsp, employeeForm.jsp, FooBar.jsp
 all needed access to the managedBean?  If all of them needed the
 prerender to fire off then I would think each of them would have to be
 created with separate managed bean definitions?

It might be helpful to distinguish different kinds of managed beans:

* Backing beans containing event handlers and data related
  specifically to a particular page.  This is what a ViewController
  is in Shale.  There will normally be exactly one such bean per page,
  with (at least) an action method for each submit button that does
  something different (Save versus Cancel for example).

* General purpose data beans that you define as managed beans
  so you can leverage the dependency injection mechanism.  The
  names of these beans are arbitrary, and easy to share across pages.
  (In apps built with Java Studio Creator, for example, we precreate
  three beans like this -- one in each of request/session/application
  scope -- as convenient places to pass data around).  But you can
  also stick your own objects into the appropriate scope whenever
  you need to share.  But these should be *data* or *business logic*
  beans, not tied to JSF APIs.  They are *not* backing beans by
  the definition above.

Another way to look at things is to mentally translate from Struts 1.x
terms:  a backing bean (or ViewController) is a combination of an
ActionForm and an Action.  Or, more precisely, it's often a
combination of an ActionForm and a DispatchAction -- although the
multiple action methods is implemented by binding each component
individually, rather than calling a common execute() method that then
dispatches.

In general, then, each action method functionally corresponds to a
single Action.execute() method in Struts.  And the best practices
about abstracting out your actual business logic into a separate tier
applies here as well -- call your DAO and business logic objects from
within the action method.

 Rick

Craig

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Rick Reumann

[EMAIL PROTECTED] wrote the following on 8/23/2005 4:39 PM:

Funny, I was *just* thinking that! And then I figured it is because in the 
Struts world, we are typically used to thinking of a form bean as being 
shared by many jsps. But I think in the Faces world perhaps the backing 
bean and the jsp are supposed to be really tightly integrated..(almost the 
same (one) thing..?)


If that's the case, though, I'd find that as a severe limitation of JSF. 
In Struts my DispatchActions can be called from anywhere and there isn't 
really a need for a tight coupling. getEmployee returns success and 
any form or JSP can use this Action (assuming they also use the 
ActionForm also).


In JSF I keep wishing there was a way I can through in a use this 
managed bean in the navigation rules - but I'm guessing that's because 
I've been using Struts for so long. Hopefully this will all start to 
click at some point.


--
Rick

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Rick Reumann [EMAIL PROTECTED] wrote on 08/23/2005 04:53:35 PM:
 
 If that's the case, though, I'd find that as a severe limitation of JSF. 

 In Struts my DispatchActions can be called from anywhere and there isn't 

 really a need for a tight coupling. getEmployee returns success and 
 any form or JSP can use this Action (assuming they also use the 
 ActionForm also).
 In JSF I keep wishing there was a way I can through in a use this 
 managed bean in the navigation rules - but I'm guessing that's because 
 I've been using Struts for so long. Hopefully this will all start to 
 click at some point.
 

ok, I'm probably being quite stupid here and should think this over a bit 
more.. but hey, what the hell..;)

Ok, maybe you could have many different managed beans (I mean with 
different names) but all pointing to the same class/bean?..

Though perhaps (from Craig's earlier note), really we are supposed to 
think of backing beans as kind of very basic and specific to a page or 
something.. and thus not *have to* share it across many pages. If you have 
logic in there which you have to share, then move it to another layer once 
removed perhaps..

But you are right, this isn't sinking in like it should..(:(

 Rick

Geeta


Problem in action forwarding

2005-08-23 Thread wilson wong
Greeting

   Setup Win 2K , Tomcat 5.0.28 with struts 1.2.7

   Problem: Every action  being forward to always
execute the webapps/mycontext/index.jsp prior to the
action being invoked



Web.xml

welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list


 index.jsp

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-logic.tld
prefix=logic %
%
  System.out.println(-- MAIN INDEX.JSP );  
%
logic:redirect action=/enter/


struts-config.xml

action   path=/enter scope=request
type=org.storeorder.store.catalog.action.EnterAction
  validate=false
  forward name=sucess
path=/catalog/catalog.jsp/
/action
actionpath=/storeinfo   
forward=/catalog/aboutus.jsp/


in catalog.jsp

tr 
 td colspan=3 bgcolor=#D0DCEE ul
li class=PurpleBulletLinksstronga
href=%=request.getContextPath()%/storeinfo.doAbout
Us
  /a /strong/li


when I click on the  About Us 

this is what happen  From the server log


DEBUG 15:19:20 ModuleUtils - Get module name for path
/storeinfo.do
DEBUG 15:19:20 ModuleUtils - Module name found:
default
DEBUG 15:19:20 RequestProcessor - Processing a 'GET'
for path '/storeinfo'
DEBUG 15:19:20 RequestProcessor -  Delegating via
forward to '/catalog/aboutus.jsp'
-- MAIN INDEX.JSP 
DEBUG 15:19:20 ModuleUtils - Get module name for path
/enter.do
DEBUG 15:19:20 ModuleUtils - Module name found:
default
DEBUG 15:19:20 RequestProcessor - Processing a 'GET'
for path '/enter'
DEBUG 15:19:20 RequestProcessor -  Looking for Action
instance for class org.sto
reorder.store.catalog.action.EnterAction
DEBUG 15:19:20 RequestProcessor -   Returning existing
Action instance
Inside Enter Action
DEBUG 15:19:20 EnterAction -  EnterAction  - Exit 0
DEBUG 15:19:20 RequestProcessor -
processForwardConfig(ForwardConfig[name=sucess
,path=/catalog/catalog.jsp,redirect=false,contextRelative=false,module=null])


It seems to me it went back and execute the index.jsp
again  before execute /catalog/aboutus.jsp 

It happens in all other action, it always executes the
index.jsp from the context path first why ?

Any Clue ?

Thanks in advance





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Rick Reumann

Craig McClanahan wrote the following on 8/23/2005 4:47 PM:


Is it typical then to end up with several ManagedBean definitions for
the same backingBean but for different mappings?




Why would you need that?  I typically use a 1:1 mapping between JSP
pages and backing beans.


I guess that probably will be the case for most scenarios. It would take 
too long to describe the last scenario on the project I just worked on, 
but to break it down into a different analogy.. imagine if you had three 
separate JSPs: dog.jsp, fish.jsp, cat.jsp. They were all unique enough 
from a 'view' concept to make them separate pages. Yet, before you went 
to each page you needed to set up some data in the form for that page. 
Speaking in Struts terms, each page shared the same AnimalForm (even 
though it could have been broken out into 3 separate ones). Also when 
the form on each page submitted it only needed to submit to one 
AnimalAction (no need for a fish, cat, dog action when essentially what 
happened in each case was very similar). Processing on a save took place 
like...


saveDispatchMethod(..) {
   //bean utils copy animal form properties into an Animal object
   //save
   animalFactory.getAnimalService(animalType).save( animal );
}

Also there was a setUp() method that would be called before going to 
fish.jsp, dog.jsp etc and it would set up the correct animal information 
in the form.


So even though I had separate views (jsps), only one Action was needed 
to handle all of them.


This became important as later on more 'animal' types might need to be 
supported. In that case only a new view jsp might need to be added 
(along with a couple of backend classes - service and dao) yet the 
Struts controller didn't need to be touched. I didn't need to create a 
new Action for each type of animal(view). Granted this isn't the typical 
case but it might come up for others.


In relation to the 'employees' issue at hand, I was hoping to reuse the 
same backing bean for employees and employee.  employees.jsp shows 
the data grid and employee.jsp would be your typical edit/add form. I 
see though that it would make more sense to break these up into two 
different managed beans since the prerender for each is completely 
different.




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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Gary VanMatre
 [EMAIL PROTECTED] wrote the following on 8/23/2005 4:39 PM:
 
  Funny, I was *just* thinking that! And then I figured it is because in the 
  Struts world, we are typically used to thinking of a form bean as being 
  shared by many jsps. But I think in the Faces world perhaps the backing 
  bean and the jsp are supposed to be really tightly integrated..(almost the 
  same (one) thing..?)
 
 If that's the case, though, I'd find that as a severe limitation of JSF. 
 In Struts my DispatchActions can be called from anywhere and there isn't 
 really a need for a tight coupling. getEmployee returns success and 
 any form or JSP can use this Action (assuming they also use the 
 ActionForm also).
 

I think an important distinction between the two is that in JSF, managed beans 
are an instance that don't need to be thread save like a struts action.  In JSF 
you can combine the Action and ActionForm into a single managed bean or you 
could separate them. Whatever works the best in your application.   There is 
nothing to stop you from registering multiple managed beans names with the same 
backing class.  

The catch is when you want to reuse a jsp fragment in more than one page since 
the binding expression is tied to a single managed bean.
 

 In JSF I keep wishing there was a way I can through in a use this 
 managed bean in the navigation rules - but I'm guessing that's because 
 I've been using Struts for so long. Hopefully this will all start to 
 click at some point.
 

Isn't the relationship between the ViewController/ managed bean and the JSF 
view as you have described?

Maybe something like this where invoiceId is a query parameter: 

managed-bean
   managed-bean-nameprofile$login/managed-bean-name
   managed-bean-scoperequest/managed-bean-scope
   managed-property
  property-nameinvoiceId/property-name

  value#{param['invoiceId']}/value
   /managed-property
/managed-bean


Gary

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



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



A forward problem

2005-08-23 Thread chhum
Hi,


Frantically trying to get a client demo working for the morning and I
feel like I ought to be able to work this out but I just can't.

I've got a demo system (not) running on a URL on tomcat 5.5/Java 1.5
with a file structure like
myserver/mydomain_com/mydomain.com/ so until I get the domain stuff
sorted out I can access via a url like 
http://www.myhost.com/mydomain.com/mydomain_com/login.do

My login page works much like the struts mailreader application – I have
an action path to action path=/SubmitLogon and the html form action
is html:form action=SubmitLogon

The browser gets sent this with an action path to
/mydomain_com/SubmitLogon.do i.e. back up one directory on the file
structure.So what happens when the submit event fires is that it goes to
http://www.myhost.com/smydomain.com/SubmitLogon.do
Thus giving me a 404 error.

Is there anything quick and easy that can be done here to prevent this.
 I thought I could maybe set the action path=/SubmitLogon without the
/ (action path=SubmitLogon  but this errors with an action path
missing / error message. 

Thanks in advance,

Chum


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



RE: A forward problem

2005-08-23 Thread David G. Friedman
Chum,

Have you moved your webapp to the webapps/ROOT tomcat folder?
Also, do you have Tomcat directly on port 80 or are you using
Apache or a connector (mod_jk or mod_jk2) to send port 80 to 
your Tomcat instance?

Regards,
David


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



Re: A forward problem

2005-08-23 Thread erikweber
If all your links and actions have the same problem (the paths can be 
translated following the same rule), then the easiest fix I can think of is to 
either use Apache mod_rewrite, or if you are using a bare Tomcat, a redirect 
Servlet.

Erik


-Original Message-
From: [EMAIL PROTECTED]
Sent: Aug 23, 2005 5:54 PM
To: Struts Users Mailing List user@struts.apache.org
Subject: A forward problem

Hi,


Frantically trying to get a client demo working for the morning and I
feel like I ought to be able to work this out but I just can't.

I've got a demo system (not) running on a URL on tomcat 5.5/Java 1.5
with a file structure like
myserver/mydomain_com/mydomain.com/ so until I get the domain stuff
sorted out I can access via a url like 
http://www.myhost.com/mydomain.com/mydomain_com/login.do

My login page works much like the struts mailreader application � I have
an action path to action path=/SubmitLogon and the html form action
is html:form action=SubmitLogon

The browser gets sent this with an action path to
/mydomain_com/SubmitLogon.do i.e. back up one directory on the file
structure.So what happens when the submit event fires is that it goes to
http://www.myhost.com/smydomain.com/SubmitLogon.do
Thus giving me a 404 error.

Is there anything quick and easy that can be done here to prevent this.
 I thought I could maybe set the action path=/SubmitLogon without the
/ (action path=SubmitLogon  but this errors with an action path
missing / error message. 

Thanks in advance,

Chum


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



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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Rick Reumann [EMAIL PROTECTED] wrote on 08/23/2005 04:53:35 PM:
 
  If that's the case, though, I'd find that as a severe limitation of JSF.
 
  In Struts my DispatchActions can be called from anywhere and there isn't
 
  really a need for a tight coupling. getEmployee returns success and
  any form or JSP can use this Action (assuming they also use the
  ActionForm also).

Note that navigation rules *themselves* can be shared ... by virtue of
the fact that you can use wildcard expressions.  So, you get the
benefits of global forwards in Struts too, so success goes the same
place no matter which action returns it.

  In JSF I keep wishing there was a way I can through in a use this
  managed bean in the navigation rules - but I'm guessing that's because
  I've been using Struts for so long. Hopefully this will all start to
  click at some point.
 


soapbox
But, I would caution you to avoid a mistake that lots of Struts users
make as well -- think of an outcome (JSF) or an ActionForward (Struts)
as a description that says this is what happened, not this is where
to go next.  Let's consider an example (applicabe to either
technology) to show you what I mean.

How many apps have you built that has a little search field to, for
example, look up the customers that match the first few characters you
type (yes, in today's world, you'd probably use an Ajax-ish code
completion widget, but bear with me).  If you think about it, the
action that executes the lookup has three significant possible
outcomes:

* Zero matches were found

* Exactly one match was found

* More than one match was found

A quick and dirty implementation would always present a table or list
of the matches, allowing the user to select the customer they actually
wanted.  For that, you would only need one outcome.  A more
sophisticated UI, however, might want to do three different things:

* In the zero matches case, go back to the query screen,
  perhaps adding a message like I'm sorry, no customers matched
  your criteria.  Please broaden your search criteria.

* In the one match case, go directly to the customer details screen
  for that customer.

* In the multiple matches case, list the options as before.

I would advocate that the developer coding the lookup action should
return outcomes like No Matches, One Match, and Multiple
Matches.  It should be up to the application architect desgning the
overall flow.  And she should be able to change her mind about whether
to go to one place or three, *without* changing the lookup action code
at all.

Outcomes are about what happened, not about where to go next.
/soapbox


 
 ok, I'm probably being quite stupid here and should think this over a bit
 more.. but hey, what the hell..;)
 
 Ok, maybe you could have many different managed beans (I mean with
 different names) but all pointing to the same class/bean?..
 

It's not clear what you mean by pointing in this scenario.

 Though perhaps (from Craig's earlier note), really we are supposed to
 think of backing beans as kind of very basic and specific to a page or
 something.. 

That is the correct viewpoint.  The backing bean is (along with the
page itself) your view tier, and it interacts with model tier stuff
the same way you would do it in a Struts app.

 and thus not *have to* share it across many pages.

I would go one stronger, and say you should *not* share this kind of
bean -- although there is a subtle exception to that ... you can
compose your view out of multiple smaller pieces (either by using
jsp:include or Tiles).  You'd want to have a backing bean *per Tile*
in this case, so the backing bean, plus its corresponding JSP, are
being reused.  But they are a unit, and should be thought of that way.

 If you have
 logic in there which you have to share, then move it to another layer once
 removed perhaps..

Yep, for all the standard reasons (this logic should be independent of
the web tier APIs, so it can be unit tested easily and reused in other
scenarios).  And, you can optionally use the managed beans facility to
configure such objects and put them in the right scope (or use Spring,
or use JNDI lookups, or use either of the above transparently via
value binding expressions in Shale).

The best practices here (separate business logic from presentation
logic) are exactly the same as they are for a Struts based app.

 
 But you are right, this isn't sinking in like it should..(:(
 
  Rick
 
 Geeta
 
 

Craig

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



[OT] DAO Pattern in Struts

2005-08-23 Thread Paul Benedict
Guys,

This is off-topic but I need your help. There are some
good programmers here and I would like to receive some
advice back. I am sure there's a simple answer to it.

My Struts app is a multitier app (Web - Business -
DAO) and it uses Jakarta Commons DbUtils for the DAO
layer. My DAO methods are the typical get
connection,execute,close connection pattern. Well,
suddenly my DAO methods are complex enough that I can
call my publically defined methods as helpers, which
leads to all sorts of problems. That would opening a
connection per call to a sibling method!

What should be done here?

I thought of moving the ownership of the connection
from the method to the instance level. Is this
appropriate? At least I could get sharing of a
connection. But some business layers call multiple
different DAO objects and it makes even more sense to
share a connection across all DAO objects. Would this
be better? I think so, but I don't know how to model
it.

Please, any help! It is holding up my design.

Thanks,
Paul



__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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



Re: [OT] DAO Pattern in Struts

2005-08-23 Thread Larry Meadors
Have you looked at using something like the iBATIS DAO?

I think it could save you alot of pain.

One thing to watch out for is thread safety - putting a connection on
an instance (especially a shared instance) is pretty risky, especially
when you start thinking about transactions and the like...that kind of
thing is really better handled at the thread level (which is what
iBATIS does).

Larry


On 8/23/05, Paul Benedict [EMAIL PROTECTED] wrote:
 Guys,
 
 This is off-topic but I need your help. There are some
 good programmers here and I would like to receive some
 advice back. I am sure there's a simple answer to it.
 
 My Struts app is a multitier app (Web - Business -
 DAO) and it uses Jakarta Commons DbUtils for the DAO
 layer. My DAO methods are the typical get
 connection,execute,close connection pattern. Well,
 suddenly my DAO methods are complex enough that I can
 call my publically defined methods as helpers, which
 leads to all sorts of problems. That would opening a
 connection per call to a sibling method!
 
 What should be done here?
 
 I thought of moving the ownership of the connection
 from the method to the instance level. Is this
 appropriate? At least I could get sharing of a
 connection. But some business layers call multiple
 different DAO objects and it makes even more sense to
 share a connection across all DAO objects. Would this
 be better? I think so, but I don't know how to model
 it.
 
 Please, any help! It is holding up my design.
 
 Thanks,
 Paul
 
 
 
 __
 Yahoo! Mail
 Stay connected, organized, and protected. Take the tour:
 http://tour.mail.yahoo.com/mailtour.html
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: [OT] DAO Pattern in Struts

2005-08-23 Thread erikweber
Not sure if this is really much help because I'm sure you've thought of this, 
but I mirror many or all of my DB DAO methods with methods that take the 
Connection as a parameter . . . In the primary method, they obtain their own 
Connections, but in the secondary method, they use whatever Connection is 
passed as a parameter. Then I have an adapter between the business manager and 
the DAOs which obtains a Connection (and for example turns off autocommit), 
passes it to many DAO methods, and then releases the Connection (after turning 
autocommit back on).

If you are using Connection pooling though, the cost still may be very low and 
not worth the trouble, as you are not really opening any Connections for each 
DAO call -- the pool keeps them open all the time. When you get a Connection, 
it comes from a cache. When you invoke close on the Connection, you are really 
invoking close on an adapter which releases the Connection back to the cache . 
. .

(But sometimes you need to share a Connection for another reason besides 
optimization.)

Someone correct me if I'm wrong. Hope that helps, as I'm not familiar with the 
Jakarta DAO stuff.

Erik


-Original Message-
From: Paul Benedict [EMAIL PROTECTED]
Sent: Aug 23, 2005 6:35 PM
To: user@struts.apache.org
Subject: [OT] DAO Pattern in Struts

Guys,

This is off-topic but I need your help. There are some
good programmers here and I would like to receive some
advice back. I am sure there's a simple answer to it.

My Struts app is a multitier app (Web - Business -
DAO) and it uses Jakarta Commons DbUtils for the DAO
layer. My DAO methods are the typical get
connection,execute,close connection pattern. Well,
suddenly my DAO methods are complex enough that I can
call my publically defined methods as helpers, which
leads to all sorts of problems. That would opening a
connection per call to a sibling method!

What should be done here?

I thought of moving the ownership of the connection
from the method to the instance level. Is this
appropriate? At least I could get sharing of a
connection. But some business layers call multiple
different DAO objects and it makes even more sense to
share a connection across all DAO objects. Would this
be better? I think so, but I don't know how to model
it.

Please, any help! It is holding up my design.

Thanks,
Paul



__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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



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



Re: [OT] DAO Pattern in Struts

2005-08-23 Thread Paul Benedict
Erik,

Oh, I have worked on a project where that was the
pattern I designed for myself!! One accepted a
connection for transactions, the other for
self-contained singleton executions. Yup, it's a great
pattern.

You raise an interesting point. I never thought about
using a middle-man between my business tier and DAO.
I'll have to think about that. 

And yes, I do use connection pooling -- good point! I
guess there is not a performance gain in keeping the
connection around at the instance level. Perhaps I am
being scrupulous and trying to save time with the pool
code, but that's ridiculous. It's better to put it
back in the pool because at the millisecond level,
many more threads could be using it in between my
thread.

And, I like the IBATIS idea described by Larry... but
sorry, I love Hibernate :-) I don't use it yet, but I
am on board whenever I get to use it.

Thanks!
Paul




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: [OT] DAO Pattern in Struts

2005-08-23 Thread Larry Meadors
You can (and should) use the DAO pattern with Hibernate, too.

The iBATIS DAO even has built-in support for hibernate (of course, it
has support for sql maps, too).

Larry


On 8/23/05, Paul Benedict [EMAIL PROTECTED] wrote:
 Erik,
 
 Oh, I have worked on a project where that was the
 pattern I designed for myself!! One accepted a
 connection for transactions, the other for
 self-contained singleton executions. Yup, it's a great
 pattern.
 
 You raise an interesting point. I never thought about
 using a middle-man between my business tier and DAO.
 I'll have to think about that.
 
 And yes, I do use connection pooling -- good point! I
 guess there is not a performance gain in keeping the
 connection around at the instance level. Perhaps I am
 being scrupulous and trying to save time with the pool
 code, but that's ridiculous. It's better to put it
 back in the pool because at the millisecond level,
 many more threads could be using it in between my
 thread.
 
 And, I like the IBATIS idea described by Larry... but
 sorry, I love Hibernate :-) I don't use it yet, but I
 am on board whenever I get to use it.
 
 Thanks!
 Paul
 
 
 
 
 Start your day with Yahoo! - make it your home page
 http://www.yahoo.com/r/hs
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: [SHALE] Simple getting started-type question

2005-08-23 Thread David G. Friedman
Frank,

You could always write your JSF blog with Shale and post it to a created,
but empty (abandoned), dev.java.net JSF blog project:
https://jsfblog.dev.java.net/

(grin)

Regards,
David

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Monday, August 22, 2005 12:53 AM
To: Struts User
Subject: [SHALE] Simple getting started-type question

Hi everyone,

I'm finally getting a little bit of time to look at Shale, with the
intent of doing the Mailreader app under it as I offered to do a few
weeks back... although I was thinking of writing a blog app instead
since I wanted to re-do mine anyway, but that is neither here nor there :)

... SNIPPED 

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Re: A forward problem

2005-08-23 Thread Martin Gainty

From what I can see you your alias could be incorrect in httpd.conf
notice the Alias, Redirect, Directory and Location assignments in this 
example

http://syger.com/jsc/docs/reader/jsp/environ.htm

*or your actions in your webapp are not defined correctly* in 
struts-config.xml

take a look at
http://struts.apache.org/faqs/newbie.html
Martin
- Original Message - 
From: [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, August 23, 2005 5:54 PM
Subject: A forward problem



Hi,


Frantically trying to get a client demo working for the morning and I
feel like I ought to be able to work this out but I just can't.

I've got a demo system (not) running on a URL on tomcat 5.5/Java 1.5
with a file structure like
myserver/mydomain_com/mydomain.com/ so until I get the domain stuff
sorted out I can access via a url like
http://www.myhost.com/mydomain.com/mydomain_com/login.do

My login page works much like the struts mailreader application - I have
an action path to action path=/SubmitLogon and the html form action
is html:form action=SubmitLogon

The browser gets sent this with an action path to
/mydomain_com/SubmitLogon.do i.e. back up one directory on the file
structure.So what happens when the submit event fires is that it goes 
to

http://www.myhost.com/smydomain.com/SubmitLogon.do
Thus giving me a 404 error.

Is there anything quick and easy that can be done here to prevent this.
I thought I could maybe set the action path=/SubmitLogon without the
/ (action path=SubmitLogon  but this errors with an action path
missing / error message.

Thanks in advance,

Chum


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




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



Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread gramani
Craig McClanahan [EMAIL PROTECTED] wrote on 08/23/2005 06:33:35 PM:
 
 soapbox
 But, I would caution you to avoid a mistake that lots of Struts users
 make as well -- think of an outcome (JSF) or an ActionForward (Struts)
 as a description that says this is what happened, not this is where
 to go next.  Let's consider an example (applicabe to either
 technology) to show you what I mean.
 
 How many apps have you built that has a little search field to, for
 example, look up the customers that match the first few characters you
 type (yes, in today's world, you'd probably use an Ajax-ish code
 completion widget, but bear with me).  If you think about it, the
 action that executes the lookup has three significant possible
 outcomes:
 
 * Zero matches were found
 
 * Exactly one match was found
 
 * More than one match was found
 
 A quick and dirty implementation would always present a table or list
 of the matches, allowing the user to select the customer they actually
 wanted.  For that, you would only need one outcome.  A more
 sophisticated UI, however, might want to do three different things:
 
 * In the zero matches case, go back to the query screen,
   perhaps adding a message like I'm sorry, no customers matched
   your criteria.  Please broaden your search criteria.
 
 * In the one match case, go directly to the customer details screen
   for that customer.
 
 * In the multiple matches case, list the options as before.
 
 I would advocate that the developer coding the lookup action should
 return outcomes like No Matches, One Match, and Multiple
 Matches.  It should be up to the application architect desgning the
 overall flow.  And she should be able to change her mind about whether
 to go to one place or three, *without* changing the lookup action code
 at all.
 
 Outcomes are about what happened, not about where to go next.
 /soapbox
 

Correct. And I have indeed coded for situations similar to your search 
example, for Struts apps in the past. What i mean is (continuing your 
example) my (Struts) action returned perhaps forwards for say noMatch, 
oneMatch or manyMatches. However, the forwards for that action in 
struts-config then had to have paths for something like noMatches.jsp, 
oneMatch.jsp, manyMatches.jsp. So the architect can indeed decide to 
change the where to go next piece without touching the action code by 
simply fixing struts-config.xml. And, as I understand it, we code the the 
Shale/JSF framework also similarly. The backing bean returns an outcome 
and the faces-config.xml maps the outcome to the view. So, I don't mean to 
sound impertinent or anything :), but really, you *do* in fact return an 
outcome in either case and outcomes are indeed about what happened 
and not where to go next.. Except you *do* of course go somewhere next, 
and therefore have to code that information (in config files in either 
framework). So what am i missing? I mean, where's the difference between 
the Struts way and the Shale/JSF way?
 
  Ok, maybe you could have many different managed beans (I mean with
  different names) but all pointing to the same class/bean?..
  
 
 It's not clear what you mean by pointing in this scenario.

Well, just kind of a stupid way of doing things. ;) I meant that in 
faces-config.xml, we can have two managed-bean defintions, one with 
managed-bean-name as say page1 and the other as page2 but both having 
managed-bean-class as the same bean class say MyBeanClass. In that case, 
page1.jsp and page2.jsp would both share the same bean..(Would have to set 
the managed-bean-scope to session though I'd guess in order to share it 
across both pages..?) I imagine that would work.. but, yes, I understand 
you have said it isn't a good idea..:)
 
 Yep, for all the standard reasons (this logic should be independent of
 the web tier APIs, so it can be unit tested easily and reused in other
 scenarios).  And, you can optionally use the managed beans facility to
 configure such objects and put them in the right scope (or use Spring,
 or use JNDI lookups, or use either of the above transparently via
 value binding expressions in Shale).
 
 The best practices here (separate business logic from presentation
 logic) are exactly the same as they are for a Struts based app.
 

Yes, I think we shouldn't have a problem with that..;-)
 
 Craig

Once again, many thanks for your time!
Geeta


Re: [Shale/JSF] Extending AbstractViewController doesn't automagically give me access to init() etc.

2005-08-23 Thread Craig McClanahan
On 8/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Craig McClanahan [EMAIL PROTECTED] wrote on 08/23/2005 06:33:35 PM:
  [snip the soapbox]
 
 Correct. And I have indeed coded for situations similar to your search
 example, for Struts apps in the past. What i mean is (continuing your
 example) my (Struts) action returned perhaps forwards for say noMatch,
 oneMatch or manyMatches. However, the forwards for that action in
 struts-config then had to have paths for something like noMatches.jsp,
 oneMatch.jsp, manyMatches.jsp. So the architect can indeed decide to
 change the where to go next piece without touching the action code by
 simply fixing struts-config.xml. And, as I understand it, we code the the
 Shale/JSF framework also similarly. The backing bean returns an outcome
 and the faces-config.xml maps the outcome to the view. So, I don't mean to
 sound impertinent or anything :), but really, you *do* in fact return an
 outcome in either case and outcomes are indeed about what happened
 and not where to go next.. Except you *do* of course go somewhere next,
 and therefore have to code that information (in config files in either
 framework). So what am i missing? I mean, where's the difference between
 the Struts way and the Shale/JSF way?
 

Congratulations, you broke the code :-).  All the things you learned
about good application design using Struts stil work.

   Ok, maybe you could have many different managed beans (I mean with
   different names) but all pointing to the same class/bean?..
  
 
  It's not clear what you mean by pointing in this scenario.
 
 Well, just kind of a stupid way of doing things. ;) I meant that in
 faces-config.xml, we can have two managed-bean defintions, one with
 managed-bean-name as say page1 and the other as page2 but both having
 managed-bean-class as the same bean class say MyBeanClass. In that case,
 page1.jsp and page2.jsp would both share the same bean..(Would have to set
 the managed-bean-scope to session though I'd guess in order to share it
 across both pages..?) I imagine that would work.. but, yes, I understand
 you have said it isn't a good idea..:)
 

Yep :-).

Backing beans (or ViewControllers when you also use Shale) are view
tier things, just like form beans in Struts were intended to be (but
way to many people in the world use for other things too).

  Yep, for all the standard reasons (this logic should be independent of
  the web tier APIs, so it can be unit tested easily and reused in other
  scenarios).  And, you can optionally use the managed beans facility to
  configure such objects and put them in the right scope (or use Spring,
  or use JNDI lookups, or use either of the above transparently via
  value binding expressions in Shale).
 
  The best practices here (separate business logic from presentation
  logic) are exactly the same as they are for a Struts based app.
 
 
 Yes, I think we shouldn't have a problem with that..;-)
 
  Craig
 
 Once again, many thanks for your time!
 Geeta
 
 

Craig

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



Check Disk space before file upload

2005-08-23 Thread Anuradha S.Athreya
Hello,

How can I check for disk space  on the server before uploading a file on the
server?



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



Re: Check Disk space before file upload

2005-08-23 Thread Frank W. Zammetti
There's no easy cross-platform way to do this, believe it or not.  Seems 
like it should be in the SDK, but it isn't.


There is however some code I contributed to the Commons IO project that 
does exactly this.  It is currently in SVN only, but I just submitted 
some updates today that hopefully will allow it to be in the upcoming 
1.1 (I believe) release).


In the mean time, you can grab FileSystemUtils.java from SVN and give it 
a shot.  It depends on one other class from IO (ByteArrayOutputStream I 
think), but you can use the standard version instead, it will compile 
fine against it (IIRC, this adds the possibility of some other 
exceptions you'd have to potentially handle, but otherwise it works).


Frank

Anuradha S.Athreya wrote:

Hello,

How can I check for disk space  on the server before uploading a file on the
server?



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









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



Re: Check Disk space before file upload

2005-08-23 Thread Dakota Jack
Frank, could you shoot this code to me?  That sounds interesting as
all get out!  Thanks ahead of time.

On 8/23/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 There's no easy cross-platform way to do this, believe it or not.  Seems
 like it should be in the SDK, but it isn't.
 
 There is however some code I contributed to the Commons IO project that
 does exactly this.  It is currently in SVN only, but I just submitted
 some updates today that hopefully will allow it to be in the upcoming
 1.1 (I believe) release).
 
 In the mean time, you can grab FileSystemUtils.java from SVN and give it
 a shot.  It depends on one other class from IO (ByteArrayOutputStream I
 think), but you can use the standard version instead, it will compile
 fine against it (IIRC, this adds the possibility of some other
 exceptions you'd have to potentially handle, but otherwise it works).
 
 Frank
 
 Anuradha S.Athreya wrote:
  Hello,
 
  How can I check for disk space  on the server before uploading a file on the
  server?
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



Re: Check Disk space before file upload

2005-08-23 Thread Frank W. Zammetti

Hi Jack,

You can grab the latest version off the Bugzilla ticket:

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

It's one of those things that you'll look at the code and go D'oh! 
That's obvious as hell!, but amazingly I couldn't find anything similar 
anywhere before I wrote it (there *must* be something, I just didn't 
turn it up).


Frank

Dakota Jack wrote:

Frank, could you shoot this code to me?  That sounds interesting as
all get out!  Thanks ahead of time.

On 8/23/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:


There's no easy cross-platform way to do this, believe it or not.  Seems
like it should be in the SDK, but it isn't.

There is however some code I contributed to the Commons IO project that
does exactly this.  It is currently in SVN only, but I just submitted
some updates today that hopefully will allow it to be in the upcoming
1.1 (I believe) release).

In the mean time, you can grab FileSystemUtils.java from SVN and give it
a shot.  It depends on one other class from IO (ByteArrayOutputStream I
think), but you can use the standard version instead, it will compile
fine against it (IIRC, this adds the possibility of some other
exceptions you'd have to potentially handle, but otherwise it works).

Frank

Anuradha S.Athreya wrote:


Hello,

How can I check for disk space  on the server before uploading a file on the
server?



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









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








--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



RE: Check Disk space before file upload

2005-08-23 Thread David G. Friedman
Frank,

That's a very interesting bit of coding. :)

Regards,
David

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 24, 2005 1:06 AM
To: Struts Users Mailing List
Subject: Re: Check Disk space before file upload


Hi Jack,

You can grab the latest version off the Bugzilla ticket:

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

It's one of those things that you'll look at the code and go D'oh!
That's obvious as hell!, but amazingly I couldn't find anything similar
anywhere before I wrote it (there *must* be something, I just didn't
turn it up).

Frank

Dakota Jack wrote:
 Frank, could you shoot this code to me?  That sounds interesting as
 all get out!  Thanks ahead of time.

 On 8/23/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:

There's no easy cross-platform way to do this, believe it or not.  Seems
like it should be in the SDK, but it isn't.

There is however some code I contributed to the Commons IO project that
does exactly this.  It is currently in SVN only, but I just submitted
some updates today that hopefully will allow it to be in the upcoming
1.1 (I believe) release).

In the mean time, you can grab FileSystemUtils.java from SVN and give it
a shot.  It depends on one other class from IO (ByteArrayOutputStream I
think), but you can use the standard version instead, it will compile
fine against it (IIRC, this adds the possibility of some other
exceptions you'd have to potentially handle, but otherwise it works).

Frank

Anuradha S.Athreya wrote:

Hello,

How can I check for disk space  on the server before uploading a file on
the
server?



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








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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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


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



Re: Check Disk space before file upload

2005-08-23 Thread Frank W. Zammetti

Thanks... I think :)

Frank

David G. Friedman wrote:

Frank,

That's a very interesting bit of coding. :)

Regards,
David

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 24, 2005 1:06 AM
To: Struts Users Mailing List
Subject: Re: Check Disk space before file upload


Hi Jack,

You can grab the latest version off the Bugzilla ticket:

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

It's one of those things that you'll look at the code and go D'oh!
That's obvious as hell!, but amazingly I couldn't find anything similar
anywhere before I wrote it (there *must* be something, I just didn't
turn it up).

Frank

Dakota Jack wrote:


Frank, could you shoot this code to me?  That sounds interesting as
all get out!  Thanks ahead of time.

On 8/23/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:



There's no easy cross-platform way to do this, believe it or not.  Seems
like it should be in the SDK, but it isn't.

There is however some code I contributed to the Commons IO project that
does exactly this.  It is currently in SVN only, but I just submitted
some updates today that hopefully will allow it to be in the upcoming
1.1 (I believe) release).

In the mean time, you can grab FileSystemUtils.java from SVN and give it
a shot.  It depends on one other class from IO (ByteArrayOutputStream I
think), but you can use the standard version instead, it will compile
fine against it (IIRC, this adds the possibility of some other
exceptions you'd have to potentially handle, but otherwise it works).

Frank

Anuradha S.Athreya wrote:



Hello,

How can I check for disk space  on the server before uploading a file on


the


server?



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









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








--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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


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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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