problem in Logout Action and No cache using struts

2003-07-10 Thread Sachin
Hi All,
well iam working on a application using struts all works fine.but i
am not able to solve one problem.

My application should behave like a wizard.i don't want to user just go back
on clicking browser button

But still no able to do that And after application complete its
functionality i want that user will logout from system and not able to
access whole application

but still i am trying to implement it by using pragma no-cache etc. some
META_ENV but not able to do that some people suggesting me to make session
for logout but i don't want to use session for my application.

Can struts play any major role in that because ultimately ActionForms are
providing data to web page

Can anybody help me or any suggestion

thanks

Sachin




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



What should be in validate() method when using struts validator package

2003-07-10 Thread sriram
What should be in validate() method when we use Struts Validator package?
Should it be an empty method?

My current validate() method (without using Struts Validator) is as follows:(What 
should it be if I implement validations in validator-rules.xml and validations.xml)? 
Pl. suggest.

 public ActionErrors validate(ActionMapping mapping,
 javax.servlet.http.HttpServletRequest request) {
// maintenance forms do new, update and delete, but also searches and create new 
for
// fkey resolvers.  Only new and update actually need validation.
if (!lrAction_.equals(New)  !lrAction_.equals(Update)) return null;

ActionErrors errs = new ActionErrors();
SupportValues support = new SupportValues();



try {
  support.setContactName(contactName_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_CONTACT_NAME,new 
ActionError(supportviewform.error_contact_name,ex.getMessage()));
}
try {
  support.setContactDetail(contactDetail_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_CONTACT_DETAIL,new 
ActionError(supportviewform.error_contact_detail,ex.getMessage()));
}
try {
  support.setPhoneNo(phoneNo_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_PHONE_NO,new 
ActionError(supportviewform.error_phone_no,ex.getMessage()));
}
try {
  support.setEmailAddr(emailAddr_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_EMAIL_ADDR,new 
ActionError(supportviewform.error_email_addr,ex.getMessage()));
}
try {
  support.setSubject(subject_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_SUBJECT,new 
ActionError(supportviewform.error_subject,ex.getMessage()));
}
try {
  support.setMessage(message_);
} catch (IllegalArgumentException ex) {
  errs.add(FLD_MESSAGE,new 
ActionError(supportviewform.error_message,ex.getMessage()));
} 
if (errs.empty()) return null;

// preserve selected values in the form, so on error don't lose them all.
preserveSelectedValues(request);

return errs;
  } // end of validate


Re: What should be in validate() method when using struts validator package

2003-07-10 Thread Nagendra Kumar O V S








  hi,
  struts validator provides both client side as well as server side 
  validations.
  if u want to use the serverside validations , u have to extend the 
  validatorForm instead of ActionForm and remove the validate() method all 
  together.
  but, in my application, i am using validator for client side 
  validations and on the server side i still use plain vanilla Action forms 
  and validation method(for validations) for my own business 
  requirements.
  so its a matter of choice.
  
  --nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  10, 2003 11:42:11 AM
  To: 'Struts Users Mailing 
  List'
  Subject: What should be 
  in validate() method when using struts validator package
  What should be in validate() method when we use Struts 
  Validator package?Should it be an empty method?My current 
  validate() method (without using Struts Validator) is as follows:(What 
  should it be if I implement validations in validator-rules.xml and 
  validations.xml)? Pl. suggest.public ActionErrors 
  validate(ActionMapping mapping,javax.servlet.http.HttpServletRequest 
  request) {// maintenance forms do new, update and delete, but also 
  searches and create new for// fkey resolvers. Only new and update 
  actually need validation.if (!lrAction_.equals("New")  
  !lrAction_.equals("Update")) return null;ActionErrors errs = new 
  ActionErrors();SupportValues support = new 
  SupportValues();try 
  {support.setContactName(contactName_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_CONTACT_NAME,new 
  ActionError("supportviewform.error_contact_name",ex.getMessage()));}try 
  {support.setContactDetail(contactDetail_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_CONTACT_DETAIL,new 
  ActionError("supportviewform.error_contact_detail",ex.getMessage()));}try 
  {support.setPhoneNo(phoneNo_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_PHONE_NO,new 
  ActionError("supportviewform.error_phone_no",ex.getMessage()));}try 
  {support.setEmailAddr(emailAddr_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_EMAIL_ADDR,new 
  ActionError("supportviewform.error_email_addr",ex.getMessage()));}try 
  {support.setSubject(subject_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_SUBJECT,new 
  ActionError("supportviewform.error_subject",ex.getMessage()));}try 
  {support.setMessage(message_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_MESSAGE,new 
  ActionError("supportviewform.error_message",ex.getMessage()));} if 
  (errs.empty()) return null;// preserve selected values in the 
  form, so on error don't lose them 
  all.preserveSelectedValues(request);return errs;} // end 
  of validate





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Re: problem in Logout Action and No cache using struts

2003-07-10 Thread Nagendra Kumar O V S








  have u tried 
   controller nocache="true"/
  in ur struts config
  
  --nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  10, 2003 11:37:14 AM
  To: Struts Users Mailing List 
  \(E-mail\)
  Subject: problem in 
  Logout Action and No cache using struts
  Hi All,well iam working on a application using struts 
  all works fine.but iam not able to solve one problem.My 
  application should behave like a wizard.i don't want to user just go 
  backon clicking browser buttonBut still no able to do that And 
  after application complete itsfunctionality i want that user will 
  logout from system and not able toaccess whole applicationbut 
  still i am trying to implement it by using "pragma" "no-cache" etc. 
  someMETA_ENV but not able to do that some people suggesting me to make 
  sessionfor logout but i don't want to use session for my 
  application.Can struts play any major role in that because 
  ultimately ActionForms areproviding data to web pageCan 
  anybody help me or any 
  suggestionthanksSachin-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Validate method going in infinite Loop

2003-07-10 Thread Pankaj Borgaonkar

Hi All,
 
I am validating email address entered by user, using in  validate method
of formBean. If the email address is invalid I am adding the errors. 
 
Struts Config entries:
 
action path=/emailcreation  
 
type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp

  forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action
 
OR
 
action path=/emailcreation  
 
type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/emailcreation.mo 
  forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action
 
Second one is going into the loop and first one is not getting the
values from database as the request is going to JSP not to action  class
i.e the formbean values are not populate.
 
How can I overcome this problem.
 
Thanks in Advance  
 
Regards
Pankaj Borgaonkar
Wipro Technologies
 

**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


RE: What should be in validate() method when using struts validator package

2003-07-10 Thread Nagendra Kumar O V S








  HI again
  this pdf gives u good start to the validator framework
  http://www.manning.com/husted/chap12.pdf
  
  also u can deploy the struts-validator.war that comes with the struts 
  release and go thro' the jsps, validator.xml, validator-rules.xml
  
  --nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  10, 2003 12:10:40 PM
  To: 'Struts Users Mailing 
  List'
  Subject: RE: What 
  should be in validate() method when using struts validator 
  package
  Can you please explain how to use validator for client 
  side validations? Any sample code on the web (links would be 
  helpful).ThanksSriram-Original 
  Message-From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]] Sent: 
  Thursday, July 10, 2003 11:59 AMTo: [EMAIL PROTECTED]Subject: 
  Re: What should be in validate() method when using struts validator 
  packagehi,struts validator provides both client side 
  as well as server side validations.if u want to use the serverside 
  validations , u have to extend the validatorForm instead of ActionForm and 
  remove the validate() method all together.but, in my application, i am 
  using validator for client side validations and on the server side i still 
  use plain vanilla Action forms and validation method (for validations) for 
  my own business requirements.so its a matter of 
  choice.--nagi---Original Message---From: 
  Struts Users Mailing mailto:[EMAIL PROTECTED] 
  ListDate: Thursday, July 10, 2003 11:42:11 AMTo: 'Struts Users 
  Mailing mailto:[EMAIL PROTECTED] 
  List'Subject: What should be in validate() method when using struts 
  validator packageWhat should be in validate() method when we use 
  Struts Validator package?Should it be an empty method?My 
  current validate() method (without using Struts Validator) is as 
  follows:(What should it be if I implement validations in 
  validator-rules.xml and validations.xml)? Pl. suggest.public 
  ActionErrors validate(ActionMapping 
  mapping,javax.servlet.http.HttpServletRequest request) {// 
  maintenance forms do new, update and delete, but also searches and create 
  new for// fkey resolvers. Only new and update actually need 
  validation.if (!lrAction_.equals("New")  
  !lrAction_.equals("Update")) return null;ActionErrors errs = new 
  ActionErrors();SupportValues support = new 
  SupportValues();try 
  {support.setContactName(contactName_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_CONTACT_NAME,new 
  ActionError("supportviewform.error_contact_name",ex.getMessage()));}try 
  {support.setContactDetail(contactDetail_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_CONTACT_DETAIL,new 
  ActionError("supportviewform.error_contact_detail",ex.getMessage()));}try 
  {support.setPhoneNo(phoneNo_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_PHONE_NO,new 
  ActionError("supportviewform.error_phone_no",ex.getMessage()));}try 
  {support.setEmailAddr(emailAddr_);} catch 
  (IllegalArgumentException ex) {errs.add(FLD_EMAIL_ADDR,new 
  ActionError("supportviewform.error_email_addr",ex.getMessage()));}try 
  {support.setSubject(subject_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_SUBJECT,new 
  ActionError("supportviewform.error_subject",ex.getMessage()));}try 
  {support.setMessage(message_);} catch (IllegalArgumentException 
  ex) {errs.add(FLD_MESSAGE,new 
  ActionError("supportviewform.error_message",ex.getMessage()));} if 
  (errs.empty()) return null;// preserve selected values in the 
  form, so on error don't lose them 
  all.preserveSelectedValues(request);return errs;} // end 
  of 
  validatehttp://www.incredimail.com/redir.asp?ad_id=309lang=9 
  IncrediMail - Email has finally evolved - http://www.incredimail.com/redir.asp?ad_id=309lang=9 
  Click Here 





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Should dtd's be kept locally and referenced locally or just take from the web?

2003-07-10 Thread Tin Pham
Hi,

Does anybody have any opinions on whether my dtd's should be downloaded and
referenced locally or put on the web?

What happens if you go into production and the online reference is down?

The app server type I am using is WebSphere.

Thanks.




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



RE: problem in Logout Action and No cache using struts

2003-07-10 Thread Sachin
Thanks Nagendra I am not aware of it

it is working

Thanks

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 11:59 AM
To: [EMAIL PROTECTED]
Subject: Re: problem in Logout Action and No cache using struts


have u tried
controller nocache=true/
in ur struts config

--nagi

---Original Message---

From: Struts Users Mailing List
Date: Thursday, July 10, 2003 11:37:14 AM
To: Struts Users Mailing List \(E-mail\)
Subject: problem in Logout Action and No cache using struts

Hi All,
well iam working on a application using struts all works fine.but i
am not able to solve one problem.

My application should behave like a wizard.i don't want to user just go back
on clicking browser button

But still no able to do that And after application complete its
functionality i want that user will logout from system and not able to
access whole application

but still i am trying to implement it by using pragma no-cache etc. some
META_ENV but not able to do that some people suggesting me to make session
for logout but i don't want to use session for my application.

Can struts play any major role in that because ultimately ActionForms are
providing data to web page

Can anybody help me or any suggestion

thanks

Sachin




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


.


  IncrediMail - Email has finally evolved - Click Here



Re: Validate method going in infinite Loop

2003-07-10 Thread Nagendra Kumar O V S








  hi pankaj,
  
  action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo" 
  forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//action
  ** this action mapping goes into a infinite loop , becos, if u find 
  an error ur calling emailcreation.mo(input parameter). that is it is 
  calling itself. and hence infinte loop. everytime u call emailcreation.mo 
  , validate method will be called.
  
  
  action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//action** 
  this seems to be ok , becos ur forwarding the controll to 
  /jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input 
  parameter) and the jsp page should display ur error. and if u want to get 
  data from db(for validation) , get it from validate method only. ur 
  control will never go action class unless all the validations are 
  success..
  
  --nagi
  
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  10, 2003 12:11:05 PM
  To: [EMAIL PROTECTED]
  Subject: Validate 
  method going in infinite Loop
  Hi All,I am validating email address entered by 
  user, using in validate methodof formBean. If the email address is 
  invalid I am adding the errors. Struts Config 
  entries:action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//actionORaction 
  path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo" 
  forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//actionSecond 
  one is going into the loop and first one is not getting thevalues from 
  database as the request is going to JSP not to action classi.e the 
  formbean values are not populate.How can I overcome this 
  problem.Thanks in Advance RegardsPankaj 
  BorgaonkarWipro 
  Technologies**DisclaimerInformation 
  contained in this E-MAIL being proprietary to Wipro Limited is 
  'privileged' and 'confidential' and intended for use only by the 
  individualor entity to which it is addressed. You are notified that 
  any use, copying or dissemination of the information contained in the 
  E-MAIL in any manner whatsoever is strictly 
  prohibited.***





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



RE: Validate method going in infinite Loop

2003-07-10 Thread Pankaj Borgaonkar

Thanks Nagendra
 
But on the JSP page I want to show both the errors as well as the data (
form bean variable which are populated in the performAction() method of
action class. )
i.e. in validate method if email address is invalid then I am adding the
errors and forwarding to JSP page, this page will show the errors only
but not the formbean values 
as it has not gone into the performAction(). So I need to show the
errors also and the data also from database. This data is not used for
validating the email address but it is used for showing some  suggested
email addresses.
 
Please reply 
Pankaj 
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 12:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Validate method going in infinite Loop



hi pankaj,
 
action path=/emailcreation 

type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/emailcreation.mo 
forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action
 
** this action mapping goes into a infinite loop , becos, if u find an
error ur calling emailcreation.mo(input parameter). that is it is
calling itself. and hence infinte loop. everytime u call
emailcreation.mo , validate method will be called.
 
 
action path=/emailcreation 

type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp

forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action

** this seems to be ok , becos ur forwarding the controll to
/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input
parameter) and the jsp page should display ur error. and if u want to
get data from db(for validation) , get it from validate method only. ur
control will never go action class unless all the validations are
success..
 
--nagi
 
 
---Original Message---
 
From: Struts Users Mailing  mailto:[EMAIL PROTECTED] List
Date: Thursday, July 10, 2003 12:11:05 PM
To: [EMAIL PROTECTED]
Subject: Validate method going in infinite Loop
 
Hi All,

I am validating email address entered by user, using in validate method
of formBean. If the email address is invalid I am adding the errors. 

Struts Config entries:

action path=/emailcreation 

type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp

forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action

OR

action path=/emailcreation 

type=com.onstar.myonstar.process.web.controller.EmailCreationAction 
name=emailCreationForm 
validate=true
scope=request
input=/emailcreation.mo 
forward name=emailcreation_page
path=/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp
redirect=false/
/action

Second one is going into the loop and first one is not getting the
values from database as the request is going to JSP not to action class
i.e the formbean values are not populate.

How can I overcome this problem.

Thanks in Advance 

Regards
Pankaj Borgaonkar
Wipro Technologies


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited
is 
'privileged' and 'confidential' and intended for use only by the
individual
or entity to which it is addressed. You are notified that any use,
copying 
or dissemination of the information contained in the E-MAIL in any
manner 
whatsoever is strictly prohibited.


***





 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


form Date exampel ?

2003-07-10 Thread Linus Nikander
Can anyone point me to an struts form: example where a Date is retreived,
presented to the user in a form for manipulation, and then submitted to an
action for further processing again. I tried using a getter/setter with a
Date type presented in a html:text property= field to the user. The getter
works fine and presents the date in 2003-xx-xx format. But when i resubmit
the data i get an error. It struck me that I can't be the only one who has
been faced with the problem, has anyone got a better (workin) solution  ?

//Linus Nikander - [EMAIL PROTECTED]




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



Re: Should dtd's be kept locally and referenced locally or just takefrom the web?

2003-07-10 Thread manglu
Tin,

It's good to use a local DTD just for the same reason that you mentioned 
- link to the DTD site if it is unavailable then the Application would 
have problems.

Alternatives:

(i) Have it available in your local web server( I use this in my 
application)

(ii) Turn of the DTD validation(atleast on the production boxes). As 
the applications are tested before they go into production this could be 
an alternative as well.

HTH
Manglu


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


Tiles : menu tile

2003-07-10 Thread Alessandro Braghieri
Hi all,
I am using the 1.1 version of struts and there's something I don't 
understand about tiles: since they're not like frames and they cannot be 
targeted by a link, how can I tell my menu.jsp (in the menu tile)to open 
the link in the body tile?

Thanks
Alex
_
MSN Foto: condividi, ritocca e stampa le tue foto online  
http://photos.msn.it

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


RE: Validate method going in infinite Loop

2003-07-10 Thread Nagendra Kumar O V S





  
  

  
  
  hi,
  well then..
  do not perform any validations in the validate method. (leave it 
  empty).
  do this email validation in the action class. so if ur email is 
  invalid add that to errors and also get other data from db and then 
  forward to jsp.
  so this will display both ur error and other db data
  
  make sure u create the errors object as usual and u shoud save those 
  errors to the request object using
  saveErrors(errors,request)
  
  --nagi
  
  
  ---Original Message---
  
  
  From: Pankaj Borgaonkar
  Date: Thursday, July 
  10, 2003 12:45:24 PM
  To: Struts Users Mailing 
  List; Nagendra Kumar O V 
  S
  Subject: RE: Validate 
  method going in infinite Loop
  
  Thanks Nagendra
  
  But on the 
  JSP page Iwant to show both the errors as well as the data( 
  form bean variable which are populated in the performAction() method of 
  action class. )
  i.e. in 
  validate method if email address is invalid then I am adding the errors 
  and forwarding to JSP page, this page will show the errors only but not 
  the formbean values 
  as it has not 
  gone into the performAction(). So I need to show the errors also and the 
  data also from database. This data is not used for validating the email 
  address but it is used for showing some suggested email 
  addresses.
  
  Please reply 
  
  Pankaj 
  
  
  

-Original Message-From: Nagendra 
Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Thursday, July 
10, 2003 12:43 PMTo: 
[EMAIL PROTECTED]Subject: Re: Validate method 
going in infinite Loop

  
  

  hi pankaj,
  
  action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo" 
  forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//action
  ** this action mapping goes into a infinite loop , becos, if 
  u find an error ur calling emailcreation.mo(input parameter). that 
  is it is calling itself. and hence infinte loop. everytime u call 
  emailcreation.mo , validate method will be called.
  
  
  action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//action** 
  this seems to be ok , becos ur forwarding the controll to 
  /jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input 
  parameter) and the jsp page should display ur error. and if u want 
  to get data from db(for validation) , get it from validate method 
  only. ur control will never go action class unless all the 
  validations are success..
  
  --nagi
  
  
  ---Original 
  Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, 
  July 10, 2003 12:11:05 PM
  To: [EMAIL PROTECTED]
  Subject: 
  Validate method going in infinite Loop
  Hi All,I am validating email address 
  entered by user, using in validate methodof formBean. If the 
  email address is invalid I am adding the errors. Struts 
  Config entries:action path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//actionORaction 
  path="/emailcreation" 
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo" 
  forward 
  name="emailcreation_page"path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"//actionSecond 
  one is going into the loop and first one is not 

mapping.findForward error/bug?

2003-07-10 Thread Alessio
Hello all,
i work with Struts(v. 1.1 final)/tiles and EJB
in an Action i call an EJB method to have information to display in page,
after this i find if the user is logged if no i forward to action of
login...
the code:
( note: baseAction contains some utility method as find in the session if
there is the user variable created at login...)
public class example extends baseAction
{
 public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
  try{
  ...
InformationManagerLocal im = ...obtain local
Collection col = im.getInfoCourses();
Integer idUser;
   if(super.isLogged(session)){ // control if user is logged
  
   }else{
request.setAttribute(col,col);
// i must passing the collection because the login Action create
the layout the page ( with tiles definition )
// and in the munu i display the info present in collection
return mapping.findForward(login);
// where login is an global forward mapping on /loginA.do ( the
login action )
   }

..
  other EJB method call
...
   return mapping.findForward(success);
  }catch(Exception ex){
   ...
return mapping.findForward(error);
  }
 }
}

Now if i execute this Action i obtain no error but the browser display that
problem, the page not be displayed...
the ejb method work correctly ( i use this in other Action... )
The problem born when i try to call an EJB method and after this i execute
an forward to another Action...in fact if i comment the line Collection col
= im.getInfoCourses(); the Action work correctly and the page is display ok
( except the information present in collection :)
But if i use
 return new ActionForward(mapping.findForward(login).getPath(),true);
the Action work ok ( but the url in browser are different and i dislike
it...)
Is an problem of mapping.findForward (because if i create an ActionForward
it's work)? Is a bug of 1.1 version? Problem with use EJB if i forward to
another Action after call EJB method?
Any Ideas?
Thanks in advance, Alessio




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



Re: Should dtd's be kept locally and referenced locally or just takefrom the web?

2003-07-10 Thread Craig R. McClanahan


On Thu, 10 Jul 2003, Tin Pham wrote:

 Date: Thu, 10 Jul 2003 02:59:35 -0400
 From: Tin Pham [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Should dtd's be kept locally and referenced locally or just take
 from the web?

 Hi,

 Does anybody have any opinions on whether my dtd's should be downloaded and
 referenced locally or put on the web?

 What happens if you go into production and the online reference is down?

 The app server type I am using is WebSphere.


If you've got anything like my typical use case, you'll consider a
third path ... which happens to be the one that Struts and Tomcat both
use.

At home, I've got DSL with the typical always on network connection.
The download speed is fast enough that I wouldn't notice the download time
-- it's sufficientily fast that having to access the DTD remotely is
effectively transparent, so I wouldn't normally notice it.

Now, I get ready to present a session at some conference, including the
execution of a demo application.  On the airplane flying to the
conference, I do one last check to make sure that everything is working
correctly -- but, of course, I'm not connected to the Internet, so every
attempt to execute my application fails because the DTD cannot be
downloaded ... panic!!!

Fortunately, most conferences nowdays provide live Internet connections
for the presenter, so at least my demo app will still work for the live
session ... that is, assuming that the network is actually working during
the time I'm actually presenting my session.  I don't know about you, but
I believe in the a variation of Murphy's Law called the critical need
detector -- at exactly the moment you need it most, something is going to
go wrong.

All of the above is a (hopefully enjoyable) background to a suggestion of
how you can use a network-based system identifier (the third string in a
DOCTYPE declaration) even in a computer disconnected from the network --
if you are using a JAXP-based parser to parse your XMl documents, you can
replace the EntityResolver that actually goes and reads the DTD with one
that references a local copy instead.  Since you can match the public
identifier (the second string) to a local copy of the DTD, your app will
run fine disconnected from the Internet (or even your local company
intranet).

If you'd like to see a real-life example of this technique (which is
directly applicable to anyone who uses commons-digester to parse your XML
documents), check out the use of the Digester.register() method in the
initConfigDigester() method of the org.apache.struts.action.ActionServlet
class -- what happens is that Struts registers a reference to it's local
copy of the DTD based on matching the public identifier in the DOCTYPE of
the document you are parsing.

Tomcat plays the same sort of game when parsing web.xml files -- check out
the logic in the org.apache.catalina.startup.ContextConfig class.  Tomcat
is constrained by the requirement that it needs to accept *any* web.xml
file that includes the DOCTYPE declaration mandated by the servlet
specification, so it basically has to work on a disconnected computer.

This technique lets you establish persistent system identifiers that
happen to work when connected to your corporate intranet, but do not
suddenly fail when you have the chance to show off your cool application
at something like JavaOne :-).

 Thanks.


Craig McClanahanan

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



Re: [OT] Use of Static Methods

2003-07-10 Thread Simon Kelly
I'm gonna get shot down in flames here, but I feel this may be a good way of
looking at the differences between static and non-static methods.

If you look at the compiled code for any OO language at the bytes in memory
level, you can clearly see the differences between the two.
When a compiled program is loaded into memory, three (four) clearly defined
areas are seen. [Cut down a bit as there are other areas, specific to the
language used, see last paragraph (The one starting Of-course..., not
Hope this ...)]

The First (including the fourth :-) is the program byte code (and the start
code, which is hit first when the program starts and is specific to your
machine) which contains all your code.
The second and third parts are the stack and heap which will hold all the
data at run time.

The difference in static and non-static in this layout is thus.

ALL static classes, methods and variables remain within the byte code
section and are run directly from there (and this is the reason static
methods cannot be overridden but only hidden).  Hidden static methods will
reside here even if never called (and this is the reason static methods
cannot be overridden but only hidden).

ALL non-static classes, methods and variables will be instanciated within
the heap, with pointers to any static classes, methods or variables that are
required. These are run-time created 'images' of code within the byte code,
and are built up to match their hierarchical tree from java.lang.Object
down. And this is why they can override methods, as the methods are loaded
into these 'instances' from the bottom of the brach backwards towards
Object. All methods from the lowest class in the tree are created first,
then up the branch one and all these methods are created. Any method in this
second row, and those above, whose foot-print matches a method already
created are ignored (or over-ridden)

I'm afraid this is all ottomh (off the top of my head) but is accurate as a
brief over-view. If anybody really cares about this subject that much, mail
me and I'll write a full papaer on it ;-) [That's a joke, don't ask, I have
enough work as it is :-)]

Of-course, java that we write is in fact an interpreted language and is run
within the JVM which strictly follows the memory layout above. How the JVM
handles the code is specific to how it was programmed. Other OO languages
like C++ et al. strictly adhere to this stucture in memory. PEARL is an
interpretted language, so whether it is OO or not, it is handled by it's own
interpretter which will handle the code as it is designed to do.

Hope this has been enlightening, and I will follow this up with my long
awaited lecture on Struts for coffee makers 101 ;-)

Cheers

Simon



- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 6:00 AM
Subject: RE: [OT] Use of Static Methods




 On Thu, 10 Jul 2003, Andrew Hill wrote:

  Date: Thu, 10 Jul 2003 10:52:53 +0800
  From: Andrew Hill [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Subject: RE: [OT] Use of Static Methods
 
  Put them as methods of a Singleton instance instead of static methods.
  (Ive been using lots of static methods so the fact Im telling you to do
it
  differently to that should indicate something ;-)
 
  -Especially when other people have to use these methods too. The number
of
  times Ive cursed classes like PropertyUtils and BeanUtils for being
statics
  and not singletons because I want to use a slightly different version in
  some places...

 Note that, at least in the case of PropertyUtils and BeanUtils, we have
 learned the error of our ways, and are refactoring things to use the
 singleton (per webapp, but the same philosophy) pattern :-).

 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: PAC pattern (Presentation-Abstraction-Controller)

2003-07-10 Thread Craig R. McClanahan


On Tue, 8 Jul 2003, Dos Santos wrote:

 Date: Tue, 8 Jul 2003 10:30:43 -0700 (PDT)
 From: Dos Santos [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: PAC pattern (Presentation-Abstraction-Controller)

 Are you sure? I've read papers published by the author
 of PAC and she states that they are different.

 PAC has a controller between the abstraction and the
 interface (presentation). MVC has 2 interfaces (View
 and Controller) both of which interact with the
 abstraction (Model). I think that conceptually they
 are different.

 What do you think?


Do you have some references to articles or descriptions about PAC?  In
particular, I'd like to understand how it might be better (for app
developers) than the MVC paradigm that Struts already supports before I am
interested in worrying about how it might be supported.

If it's not better, then why should we bother?

Craig

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



Outputting form:text value as normal text in the .jsp

2003-07-10 Thread Linus Nikander
Is there a way to output the value of an attribute contained in a Form as
normal text on the displaying .jsp page ? The following code illustrates
what I'm trying to do.

html:form action=/saveRegistrationHandlerSettings
html:checkbox property=isRegistrationAllowed/
bean:write name=registrationHandlerForm
property=isRegistrationAllowed /
/html:form

isRegistrationAllowed is a checkbox property. the html:checkbox
property=isRegistrationAllowed/ works fine and displays the set value.
bean:write name=registrationHandlerForm property=isRegistrationAllowed
/ also works fine and renders true or false to the screen.

Essentially that is exactly what I want to do, BUT when using the
bean:write .. tag i have to specify which bean the property is to be
fetched from, thus I make the .jsp dependant on the fact that
registrationHandlerForm is the name of the bean in the request/session. The
form on the other hand knows the name of the bean because of the
struts-config.xml. Is there another way to output the text without
explicitly naming the bean in the .jsp ?

//Linus Nikander - [EMAIL PROTECTED]




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



Re: Outputting form:text value as normal text in the .jsp

2003-07-10 Thread Adam Hardy
I would not put the text to display into the form. Just put it straight 
in the request scope when you obtain it, or in both places if needs be. 
Or alternatively, output it as a read-only text field with CSS styles 
that make the field box invisible.

Adam

Linus Nikander wrote:
Is there a way to output the value of an attribute contained in a Form as
normal text on the displaying .jsp page ? The following code illustrates
what I'm trying to do.
html:form action=/saveRegistrationHandlerSettings
html:checkbox property=isRegistrationAllowed/
bean:write name=registrationHandlerForm
property=isRegistrationAllowed /
/html:form
isRegistrationAllowed is a checkbox property. the html:checkbox
property=isRegistrationAllowed/ works fine and displays the set value.
bean:write name=registrationHandlerForm property=isRegistrationAllowed
/ also works fine and renders true or false to the screen.
Essentially that is exactly what I want to do, BUT when using the
bean:write .. tag i have to specify which bean the property is to be
fetched from, thus I make the .jsp dependant on the fact that
registrationHandlerForm is the name of the bean in the request/session. The
form on the other hand knows the name of the bean because of the
struts-config.xml. Is there another way to output the text without
explicitly naming the bean in the .jsp ?
//Linus Nikander - [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]


Validation Problems

2003-07-10 Thread guruprasad jakka
Dear Struts users,

I have done a simple web-app using validator framework.
the JavaScript validations are proper.But in the server side
validations, i have problems.
Only,the 'required','minlength''maxlength' validations are
working.Rest other validators have no effect even though, i
have
used them in the validation.xml file.
eg- validate email-address has no effect even if i enter a
invalid email-address.

In javascript validations, if I enter a invalid email-id , I am
getting a error,whereas in server side there is no error shown.

Here is my validation.xml file .



form-validation
formset
  formname=registrationForm
 fieldproperty=username
   depends=required,mask,minlength
   msg name=mask
key=loginform.username.invalid/
 arg0 key=loginform.username.displayname/
 arg1 name=minlength key=${var:minlength}
resource=false/
 var
   var-namemask/var-name
   var-value^\w+$/var-value
 /var
 var
   var-nameminlength/var-name
   var-value5/var-value
 /var
 /field
 
 
fieldproperty=password1
   depends=required
 arg0 key=loginform.password1.displayname/
  /field
 
 
 fieldproperty=password2
   depends=required
 arg0 key=loginform.password2.displayname/
  /field
 
 
 fieldproperty=phone
   depends=required
 arg0 key=loginform.phone.displayname/
 
 /field
 fieldproperty=email
   depends=required,email
 arg0 key=loginform.email.displayname/
 /field
  /form
   
   /formset
/form-validation

Please,tell me what would be the problem and how to solve it.



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



Re: [OT] Use of Static Methods

2003-07-10 Thread Craig R. McClanahan


On Thu, 10 Jul 2003, Simon Kelly wrote:

 Date: Thu, 10 Jul 2003 09:56:14 +0200
 From: Simon Kelly [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [OT] Use of Static Methods

 I'm gonna get shot down in flames here, but I feel this may be a good way of
 looking at the differences between static and non-static methods.

A lot of the discussions in this thread have been about philosophy --
let's also take a look at a use case that is more practical to Struts
oriented developers and use that to compare the two approaches.

Many of you will be aware that Struts uses BeanUtils.populate() --
which, in Struts 1.1, references a static method on the BeanUtils class
from version 1.6.1 of BeanUtils -- that performs the copy+convert loop.
It's cool and all that.  One of the many reasons to like Struts :-).

But, more than a few people have complained that the populate()
method throws an exception the first time that it runs into a problem
doing a conversion.  Because the list of request parameters is stored in
something like a Hashtable or HashMap in your servlet container, that
means you have no idea which (if any) conversions were performed
successfully -- you have to throw them away.  What some people would
prefer is the opportunity to do all the conversions that can be done, and
report all the failures in one custom exception at the end of the process.

That doesn't seem to hard, you might say.  All I need to do is create a
MyBeanUtils class with a custom copyProperties() method that behaves the
way *I* want it to, and use it instead of the standard one.  In other
words, your application will call MyBeanUtils.populate() instead of
BeanUtils.populate().

But ... how do you convince *Struts* to use your version of
copyProperties() instead of the standard one ... since it requires
modification of all calling programs to use MyBeanUtils.populate()
instead of BeanUtils.populate()?  This is why the language purists in this
thread have been jumping up and down saying that you cannot override a
static method in a manner that is transparent the calling class.
Requiring the caller to switch the class name is generally not an option.

However, if BeanUtils were to provide a way to ask for an instance of some
class that implemented the bean utils interface, and also provided a
factory mechanism so that you could plug in your own implementations,
you'd be a happy camper.  You could provide your own custom
implementation, and because Struts would ask the appropriate factory
method for an instance of BeanUtils, it would also use your custom
implementation.

For the specific case of BeanUtils, we are halfway there (using the
singleton pattern) already on the HEAD branch of the CVS repository.  It
turns out that we need to do this so that commons-beanutils can be placed
in a shared class loader in a servlet container (i.e. in the common/lib
directory for Tomcat) but allow each web application to have its own bean
named foo with no interference.  What remains to be done is a mechanism
to register your replacement BeanUtilsBean (I'm going to suggest using
commons-discovery for this), but you can count on support for this some
time in the 1.2.x lifecycle.

In the mean time, I suggest you avoid this trap for your application
specific classes, and implement the singleton pattern instead.

Craig

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



Linking Struts with cocoon

2003-07-10 Thread Brook, Andy

Hi all,
 
Has anyone had experience linking struts with cocoon, I've been looking
at the struts-cocoon project (http://www.twdata/struts), specifically
with gaining the ability to output data in different formats
(specifically PDF but M$ XLS/DOC format via POI would be a boon).
 
Unfortunately there seem to be some fundamental problems with using
cocoon under my target environment (Websphere 5).  Does anyone have any
suggestions for data output or is it cocoon or bust?!
 
Thanks,
Andy
[EMAIL PROTECTED]
 

This message (including any attachments) may contain confidential information intended 
for a specific individual and purpose. If you are not the intended recipient, delete 
this message. If you are not the intended recipient, disclosing, copying, 
distributing, or taking any action based on this message is strictly prohibited.


RE: [OT] Use of Static Methods

2003-07-10 Thread Andrew Hill
snip
In the mean time, I suggest you avoid this trap for your application
specific classes, and implement the singleton pattern instead.
/snip

Having made this mistake a fair few times myself I give this suggestion a
big +1

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Sent: Thursday, 10 July 2003 16:42
To: Struts Users Mailing List
Subject: Re: [OT] Use of Static Methods




On Thu, 10 Jul 2003, Simon Kelly wrote:

 Date: Thu, 10 Jul 2003 09:56:14 +0200
 From: Simon Kelly [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: [OT] Use of Static Methods

 I'm gonna get shot down in flames here, but I feel this may be a good way
of
 looking at the differences between static and non-static methods.

A lot of the discussions in this thread have been about philosophy --
let's also take a look at a use case that is more practical to Struts
oriented developers and use that to compare the two approaches.

Many of you will be aware that Struts uses BeanUtils.populate() --
which, in Struts 1.1, references a static method on the BeanUtils class
from version 1.6.1 of BeanUtils -- that performs the copy+convert loop.
It's cool and all that.  One of the many reasons to like Struts :-).

But, more than a few people have complained that the populate()
method throws an exception the first time that it runs into a problem
doing a conversion.  Because the list of request parameters is stored in
something like a Hashtable or HashMap in your servlet container, that
means you have no idea which (if any) conversions were performed
successfully -- you have to throw them away.  What some people would
prefer is the opportunity to do all the conversions that can be done, and
report all the failures in one custom exception at the end of the process.

That doesn't seem to hard, you might say.  All I need to do is create a
MyBeanUtils class with a custom copyProperties() method that behaves the
way *I* want it to, and use it instead of the standard one.  In other
words, your application will call MyBeanUtils.populate() instead of
BeanUtils.populate().

But ... how do you convince *Struts* to use your version of
copyProperties() instead of the standard one ... since it requires
modification of all calling programs to use MyBeanUtils.populate()
instead of BeanUtils.populate()?  This is why the language purists in this
thread have been jumping up and down saying that you cannot override a
static method in a manner that is transparent the calling class.
Requiring the caller to switch the class name is generally not an option.

However, if BeanUtils were to provide a way to ask for an instance of some
class that implemented the bean utils interface, and also provided a
factory mechanism so that you could plug in your own implementations,
you'd be a happy camper.  You could provide your own custom
implementation, and because Struts would ask the appropriate factory
method for an instance of BeanUtils, it would also use your custom
implementation.

For the specific case of BeanUtils, we are halfway there (using the
singleton pattern) already on the HEAD branch of the CVS repository.  It
turns out that we need to do this so that commons-beanutils can be placed
in a shared class loader in a servlet container (i.e. in the common/lib
directory for Tomcat) but allow each web application to have its own bean
named foo with no interference.  What remains to be done is a mechanism
to register your replacement BeanUtilsBean (I'm going to suggest using
commons-discovery for this), but you can count on support for this some
time in the 1.2.x lifecycle.

In the mean time, I suggest you avoid this trap for your application
specific classes, and implement the singleton pattern 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]



RE: Tiles : menu tile

2003-07-10 Thread Joao Batistella
You must link your menu to a Tiles definition that include your body file.

Regard's,
João Paulo.

-Original Message-
From: Alessandro Braghieri [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 8:45 AM
To: [EMAIL PROTECTED]
Subject: Tiles : menu tile


Hi all,
I am using the 1.1 version of struts and there's something I don't 
understand about tiles: since they're not like frames and they cannot be 
targeted by a link, how can I tell my menu.jsp (in the menu tile)to open

the link in the body tile?

Thanks
Alex

_
MSN Foto: condividi, ritocca e stampa le tue foto online  
http://photos.msn.it


-
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] Session Management using EJB

2003-07-10 Thread Nimish Chourey , Tidel Park - Chennai
Hi all ,
I want to know if there are  applications that implements Session
Management using EJB's  rather then using the HttpSession on Web tier .
I want to know the pros and cons of this approach . For all the RD that I
have done , it seems that this approach could be used when you are deploying
your application in a clustered environment , where it is really a over head
to duplicate the sessions on all the servers in the cluster .
Still I am in dilemma , whether to follow this approach or not ??
This is really off topic , but I guess many of the developers here must have
come across this ..
Any sort of help , pointers is really appreciated .


Regards
Nimish


RE: Login Form

2003-07-10 Thread Sean Radford
All,

Please find attached my securityfilter realm adaptor. The other code I
was waiting for hasn't materialised, so I couldn't do any comparison -
but it seems to work for me... Good luck, and any probs just shout.

And nope, I have know idea if the extra functionality is to be resolved
in the near future within an updated container specification. Any one
know how we could 'force' the issue?

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Wed, 2003-07-09 at 15:33, Erez Efrati wrote:
 Sean,
 
 many thanks for keeping up with my questions - appreciate it. And yes
 you are correct. I am using JBoss 3.0.7 / Tomcat 4.1.24. By the way have
 you got any idea if this issue is about to be resolved at the Servlet
 Container Spec ? 
 
 Thanks,
 Erez
 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 11:19 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
  Thanks Sean, 
  
  I looked at it and it does avoid the BIG limitation posed by the
  standard spec in fact. Still I cannot use it since it disables the
  passing of the principal identity through calls to EJB methods.
  
 That's what it says in the introductory documentation, but...
 
 You're using JBoss/Tomcat right? Well give me a day and I'll email you a
 class that should do all you want... It's a RealmAdaptor for
 securityfilter/Jboss that uses the JBoss security extension and so
 correctly instantiates the Principal for the EJB layer. It works for me
 with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
 code from another guy whose done similar and so just want to compare -
 if his stuff doesn't arrive shortly, I'll send mine as it)
 
 
  Now, I am new to the web development and it amazes me that such a
 basic
  feature is missing from the Servlet spec and is not addressed. Why is
 it
  that way? Is it so unusual to want to have the login fields on the
 start
  page??
 
 Not unusual at all... And many Java sites have it that way, but they
 don't necessarily use container authentication and they probably don't
 use EJB's (many people steer clear - deep seated reservations from 1.0
 are still abound).
 
 If I get time I'm going to try and get the Jetty guys to 'surface' their
 web Authenticators to allow developers to roll their own... I've looked
 at the code and shouldn't be too difficult - one or two areas I'm not
 sure about, but...
 
 
  
  Thanks,
  Erez 
  
  
  -Original Message-
  From: Sean Radford [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, July 08, 2003 8:21 PM
  To: Struts Users Mailing List
  Subject: RE: Login Form
  
  Have a look at this (you may find what you want):
  
  http://sourceforge.net/projects/securityfilter/
  
  Sean
  
  
   -Original Message-
   From: Erez Efrati [mailto:[EMAIL PROTECTED] 
   Sent: July 8, 2003 10:11 AM
   To: 'Struts Users Mailing List'
   Subject: Login Form
   
   
   Hi,
   
   My question is a bit off Struts but still since I am using Struts
 and
   it's too urgent for me I thought to try my luck here, maybe someone
  had
   stumbled on this issue too.
   
   I am running JBoss/Tomcat/Struts using the JAAS for handling the
   application security aspects. I have used the
   auth-methodFORM/auth-method clauses inside the Web.xml file.
   
   In my web site I want to have the site home page to have also a
 small
   login form where the user could enter username and password and
 login
  to
   the site. The home page, contains other links as well, which lead to
   other parts of the site or even to external pages on other sites.
   
   From what I've read so far, it seems to me that the FORM method is
   activated only when the web user tries to access a protected page.
  Then
   the Web Server (Tomcat in my case) returns the loginPage stated in
 the
   Web.xml file, and only after the login is performed
 (j_security_check)
   the Tomcat then redirects the web user to the original portected
 page.
   
   Is it possible to have the site home page as the login page still
  using
   mechanisms of FORM and JAAS? If so I would really appreciate any
 help
  on
   how to do it, and what are the configurations required. 
   
   Thanks,
   Erez
   
   
   
  
 -
   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]

/*
 * @author sradford
 * pCreated 07-Jul-2003/p
 * pCopyright  2002-2003, Aegeus Technology Limited.
 * pAll rights reserved./p
 * pUse at you desire with no liability to the author./p
 */
package com.aegeus.securityfilter

import java.security.Principal;
import java.util.HashSet;
import java.util.Set;

RE: [OT] Use of Static Methods

2003-07-10 Thread NYIMI Jose (BMB)


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.
+1

But can you make some comments on the following critics about Singletons I'm reading 
from

http://www.theserverside.com/resources/articles/RodJohnsonInterview/JohnsonChapter4.pdf

Thx,

Jos.


[from page 139]

Avoid a Proliferation of Singletons by Using an Application Registry

The Singleton design pattern is widely useful, but the obvious implementation can be 
dangerous. The
obvious way to implement a singleton is Java is to use a static instance variable 
containing the singleton
instance, a public static method to return the singleton instance, and provide a 
private constructor to
prevent instantiation:

public class MySingleton {

/** Singleton instance */
private static MySingleton instance;

// Static block to instantiate the singleton in a threadsafe way
static {
instance = new MySingleton();
} // static initializer

/** Enforces singleton method. Returns the instance of this object.
* @throws DataImportationException if there was an internal error
* creating the singleton
* @return the singleton instance of this class
*/
public static MySingleton getInstance() {
return instance;
}

/** Private constructor to enforce singleton design pattern.
*/
private MySingleton() {
...
}
// Business methods on instance

Note the use of a static initializer to initialize the singleton instance when the 
class is loaded. This prevents
race conditions possible if the singleton is instantiated in the getInstance() method 
if it's null (a common
cause of errors). It's also possible for the static initializer to catch any 
exceptions thrown by the singleton's
constructor, which can be rethrown in the getInstance() method.
However, this common idiom leads to several problems:

 Dependence on the singleton class is hard-coded into many other classes.

 The singleton must handle its own configuration. As other classes are locked out 
of its
initialization process, the singleton will be responsible for any properties loading 
required.

 Complex applications can have many singletons. Each might handle its configuration 
loading
differently, meaning there's no central repository for configuration.

 Singletons are interface-unfriendly. This is a very bad thing. There's little 
point in making a
singleton implement an interface, because there's then no way of preventing there 
being other
implementations of that interface. The usual implementation of a singleton defines a 
type in a
class, not an interface.

 Singletons aren't amenable to inheritance, because we need to code to a specific 
class, and
because Java doesn't permit the overriding of static methods such as getInstance().

 It's impossible to update the state of singletons at runtime consistently. Any 
updates may be
performed haphazardly in individual Singleton or factory classes. There's no way to 
refresh
the state of all singletons in an application.

A slightly more sophisticated approach is to use a factory, which may use different 
implementation classes for
the singleton. However, this only solves some of these problems.

I don't much like static variables in general. They break OO by introducing dependency 
on a
specific class. The usual implementation of the Singleton design pattern exhibits this 
problem.

In my view, it's a much better solution to have one object that can be used to locate 
other objects. I call this an
application context object, although I've also seen it termed a registry or 
application toolbox. Any object in the
application needs only to get a reference to the single instance of the context object 
to retrieve the single instances
of any application object. Objects are normally retrieved by name. This context object 
doesn't even need to be a
singleton. For example, it's possible to use the Servlet API to place the context in a 
web application's
ServletContext, or we can bind the context object in JNDI and access it using standard 
application server
functionality. Such approaches don't require code changes to the context object 
itself, just a little bootstrap code.

The context object itself will be generic framework code, reusable between multiple 
applications.

The advantages of this approach include:

 It works well with interfaces. Objects that need the 

RE: [OT] Use of Static Methods

2003-07-10 Thread NYIMI Jose (BMB)


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.
+1

But can you make some comments on the following critics about Singletons I'm reading 
from

http://www.theserverside.com/resources/articles/RodJohnsonInterview/JohnsonChapter4.pdf

Thx,

Jos.


[from page 139]

Avoid a Proliferation of Singletons by Using an Application Registry

The Singleton design pattern is widely useful, but the obvious implementation can be 
dangerous. The obvious way to implement a singleton is Java is to use a static 
instance variable containing the singleton instance, a public static method to return 
the singleton instance, and provide a private constructor to prevent instantiation:

public class MySingleton {

/** Singleton instance */
private static MySingleton instance;

// Static block to instantiate the singleton in a threadsafe way static { instance = 
new MySingleton(); } // static initializer

/** Enforces singleton method. Returns the instance of this object.
* @throws DataImportationException if there was an internal error
* creating the singleton
* @return the singleton instance of this class
*/
public static MySingleton getInstance() {
return instance;
}

/** Private constructor to enforce singleton design pattern.
*/
private MySingleton() {
...
}
// Business methods on instance

Note the use of a static initializer to initialize the singleton instance when the 
class is loaded. This prevents race conditions possible if the singleton is 
instantiated in the getInstance() method if it's null (a common cause of errors). It's 
also possible for the static initializer to catch any exceptions thrown by the 
singleton's constructor, which can be rethrown in the getInstance() method. However, 
this common idiom leads to several problems:

 Dependence on the singleton class is hard-coded into many other classes.

 The singleton must handle its own configuration. As other classes are locked out 
of its initialization process, the singleton will be responsible for any properties 
loading required.

 Complex applications can have many singletons. Each might handle its configuration 
loading differently, meaning there's no central repository for configuration.

 Singletons are interface-unfriendly. This is a very bad thing. There's little 
point in making a singleton implement an interface, because there's then no way of 
preventing there being other implementations of that interface. The usual 
implementation of a singleton defines a type in a class, not an interface.

 Singletons aren't amenable to inheritance, because we need to code to a specific 
class, and because Java doesn't permit the overriding of static methods such as 
getInstance().

 It's impossible to update the state of singletons at runtime consistently. Any 
updates may be performed haphazardly in individual Singleton or factory classes. 
There's no way to refresh the state of all singletons in an application.

A slightly more sophisticated approach is to use a factory, which may use different 
implementation classes for the singleton. However, this only solves some of these 
problems.

I don't much like static variables in general. They break OO by introducing dependency 
on a specific class. The usual implementation of the Singleton design pattern exhibits 
this problem.

In my view, it's a much better solution to have one object that can be used to locate 
other objects. I call this an application context object, although I've also seen it 
termed a registry or application toolbox. Any object in the application needs only 
to get a reference to the single instance of the context object to retrieve the single 
instances of any application object. Objects are normally retrieved by name. This 
context object doesn't even need to be a singleton. For example, it's possible to use 
the Servlet API to place the context in a web application's ServletContext, or we can 
bind the context object in JNDI and access it using standard application server 
functionality. Such approaches don't require code changes to the context object 
itself, just a little bootstrap code.

The context object itself will be generic framework code, reusable between multiple 
applications.

The advantages of this approach include:

 It works well with interfaces. Objects that need the 

AW: Reusable Components

2003-07-10 Thread Frédéric Dreier
Actually, the company where i work uses webobjects. It allows to make UI
components (independant and configurable) and organize them in libraries
(related to our products). Clients specific web interfaces are made of these
'standard' component + some graphic stuff.

It look great on paper, but in practice... WO is a proprietary framework
with a long ObjC tradition (even if it is now 100% java). It does not follow
MVC model and many hacks are needed to build some basic features.

Do you think that JSF[+struts] is a valuable alternative? it seems to be a
very 'young' technology.

or Tapesrty ?


regards,

Frederic



-Ursprüngliche Nachricht-
Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 10. Juli 2003 01:34
An: Struts Users Mailing List
Betreff: Re: Reusable Components




On Wed, 9 Jul 2003, Adam Hardy wrote:

 Date: Wed, 09 Jul 2003 22:48:26 +0200
 From: Adam Hardy [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: Reusable Components

 JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled
 into one - or does that miss the point?

Sort of, since JavaServer Faces doesn't directly have an analog for Tiles
or the Validator Framework (although it does support per-component
validations).

Struts does not really have any notion of a UI component that maintains
its own state, or can have child components so that you can build complex
things out of simple things.  The closest analog is an individual property
in a form bean (where Struts promises to save and restore state for you,
and the HTML tags promise to render for you.  The JavaServer Faces
approach to these sorts of issues is substantially more powerful than what
Struts offers -- the smallest difference being that we wouldn't need form
beans at all if Struts were built on top of Faces.

As I've said before, it's feasible for Struts folks to treat Faces simply
as a replacement for the HTML tags, simply to get access to the richer
rendering model and complex components, while continuing to use Struts
features (tiles, validator, actions, ...).  There's an integration library
already available that can do that for you:

  http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/

The proof of concept was to take the standard struts-example.war sources,
and convert the JSP pages (one page at a time) to use Faces tags instead,
without touching the back-end actions.

However, if you start from scratch with JavaServer Faces, you can achieve
lots of the same separation between business logic and presentation logic
that we're all familiar with.  It's worth a look so you can start thinking
about if and how to integrate this kind of thing into your own apps once
it goes final (later this year).

Craig





 Craig R. McClanahan wrote:
 
  On Wed, 9 Jul 2003, Frédéric Dreier wrote:
 
 
 Date: Wed, 9 Jul 2003 10:13:02 +0200
 From: Frédéric Dreier [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: struts user [EMAIL PROTECTED]
 Subject: Reusable Components
 
 Hi,
 
 I really need your help and hints... I was not able to found something
 related on internet.
 
 how can i make reusable 'high-level' components? taglib seems to be
useless
 for such components (that already use JSP's and actions). Tiles is
exactly
 what i need but it does not seems to work if sub-component JSPs are
packed
 in a JAR library..
 
 Does anyone has some link or other resources about it? or even has
another
 solution?
 
 
 
  Reusable user interface components is what JavaServer Faces is all
about,
  and it can be used with Struts:
 
http://java.sun.com/j2ee/javaserverfaces/
 
  One of the features is exactly what you're asking for -- the ability to
  package up components, renderers, and the corresponding tags into a JAR
  file that auto-configures itself when you drop it into /WEB-INF/lib.
 
 
 Thanks in advance,
 
 Frederic
 
 
  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]



-
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] Use of Static Methods

2003-07-10 Thread NYIMI Jose (BMB)
Sorry for my previous mails,
can you make some comments on following critics about Singletons I'm reading at
http://www.theserverside.com/resources/articles/RodJohnsonInterview/JohnsonChapter4.pdf

[from page 139]
Section titled:
Avoid a Proliferation of Singletons by Using an Application Registry.

Thx,

José.

-Original Message-
From: NYIMI Jose (BMB) 
Sent: Thursday, July 10, 2003 11:33 AM
To: Struts Users Mailing List
Subject: RE: [OT] Use of Static Methods




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.

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



RE: What should be in validate() method when using struts validator package

2003-07-10 Thread sriram
Thanks for that. I've gone thru the pdf and am trying to implement client-side 
validations.
 
I've done as explained in that chapter.
I've placed the relevant code in .jsp file and also this line in the end (before 
closing BODY tag).
 
validator:javascript formName=supportviewForm/
 
But this is causing a problem. The form isnot getting displayed completely. It's 
showing the following error:
javax.servlet.ServletException: org/apache/struts/util/MessageResources
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:536)
 
When I remove validator:javascript formName=supportviewForm/ from .jsp page, the 
form is getting displayed properly. What could be the reason?

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: RE: What should be in validate() method when using struts validator package



HI again
this pdf gives u good start to the validator framework
http://www.manning.com/husted/chap12.pdf http://www.manning.com/husted/chap12.pdf 
 
also u can deploy the struts-validator.war that comes with the struts release and go 
thro' the jsps, validator.xml, validator-rules.xml
 
--nagi
 
---Original Message---
 
From: Struts Users Mailing  mailto:[EMAIL PROTECTED] List
Date: Thursday, July 10, 2003 12:10:40 PM
To: 'Struts Users Mailing  mailto:[EMAIL PROTECTED] List'
Subject: RE: What should be in validate() method when using struts validator package
 
Can you please explain how to use validator for client side validations? Any sample 
code on the web (links would be helpful).


Thanks
Sriram

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] 
Sent: Thursday, July 10, 2003 11:59 AM
To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Subject: Re: What should be in validate() method when using struts validator package



hi,
struts validator provides both client side as well as server side validations.
if u want to use the serverside validations , u have to extend the validatorForm 
instead of ActionForm and remove the validate() method all together.
but, in my application, i am using validator for client side validations and on the 
server side i still use plain vanilla Action forms and validation method (for 
validations) for my own business requirements.
so its a matter of choice.

--nagi

---Original Message---

From: Struts Users Mailing mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  List
Date: Thursday, July 10, 2003 11:42:11 AM
To: 'Struts Users Mailing mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  List'
Subject: What should be in validate() method when using struts validator package

What should be in validate() method when we use Struts Validator package?
Should it be an empty method?

My current validate() method (without using Struts Validator) is as follows:(What 
should it be if I implement validations in validator-rules.xml and validations.xml)? 
Pl. suggest.

public ActionErrors validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request) {
// maintenance forms do new, update and delete, but also searches and create new for
// fkey resolvers. Only new and update actually need validation.
if (!lrAction_.equals(New)  !lrAction_.equals(Update)) return null;

ActionErrors errs = new ActionErrors();
SupportValues support = new SupportValues();



try {
support.setContactName(contactName_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_CONTACT_NAME,new 
ActionError(supportviewform.error_contact_name,ex.getMessage()));
}
try {
support.setContactDetail(contactDetail_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_CONTACT_DETAIL,new 
ActionError(supportviewform.error_contact_detail,ex.getMessage()));
}
try {
support.setPhoneNo(phoneNo_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_PHONE_NO,new 
ActionError(supportviewform.error_phone_no,ex.getMessage()));
}
try {
support.setEmailAddr(emailAddr_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_EMAIL_ADDR,new 
ActionError(supportviewform.error_email_addr,ex.getMessage()));
}
try {
support.setSubject(subject_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_SUBJECT,new ActionError(supportviewform.error_subject,ex.getMessage()));
}
try {
support.setMessage(message_);
} catch (IllegalArgumentException ex) {
errs.add(FLD_MESSAGE,new ActionError(supportviewform.error_message,ex.getMessage()));
} 
if (errs.empty()) return null;

// preserve selected values in the form, so on error don't lose them all.
preserveSelectedValues(request);

return errs;
} // end of validate





http://www.incredimail.com/redir.asp?ad_id=309 
http://www.incredimail.com/redir.asp?ad_id=309lang=9 lang=9 IncrediMail - Email 
has finally evolved - http://www.incredimail.com/redir.asp?ad_id=309 
http://www.incredimail.com/redir.asp?ad_id=309lang=9 lang=9 Click Here 





RE: Login Form

2003-07-10 Thread Erez Efrati
Sean,

Thanks for the code. I have downloaded everything and I am about to
start playing with it. But from reading still, I am a bit confused here.

Is this code + SecurityFilter replaces the container security
configuration of JBoss/Tomcat in ejb-jar.xml, web.xml, jboss.xml,
jboss-web.xml ?

Thanks,
Erez

-Original Message-
From: Sean Radford [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: Login Form

All,

Please find attached my securityfilter realm adaptor. The other code I
was waiting for hasn't materialised, so I couldn't do any comparison -
but it seems to work for me... Good luck, and any probs just shout.

And nope, I have know idea if the extra functionality is to be resolved
in the near future within an updated container specification. Any one
know how we could 'force' the issue?

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Wed, 2003-07-09 at 15:33, Erez Efrati wrote:
 Sean,
 
 many thanks for keeping up with my questions - appreciate it. And yes
 you are correct. I am using JBoss 3.0.7 / Tomcat 4.1.24. By the way
have
 you got any idea if this issue is about to be resolved at the Servlet
 Container Spec ? 
 
 Thanks,
 Erez
 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 11:19 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
  Thanks Sean, 
  
  I looked at it and it does avoid the BIG limitation posed by the
  standard spec in fact. Still I cannot use it since it disables the
  passing of the principal identity through calls to EJB methods.
  
 That's what it says in the introductory documentation, but...
 
 You're using JBoss/Tomcat right? Well give me a day and I'll email you
a
 class that should do all you want... It's a RealmAdaptor for
 securityfilter/Jboss that uses the JBoss security extension and so
 correctly instantiates the Principal for the EJB layer. It works for
me
 with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
 code from another guy whose done similar and so just want to compare -
 if his stuff doesn't arrive shortly, I'll send mine as it)
 
 
  Now, I am new to the web development and it amazes me that such a
 basic
  feature is missing from the Servlet spec and is not addressed. Why
is
 it
  that way? Is it so unusual to want to have the login fields on the
 start
  page??
 
 Not unusual at all... And many Java sites have it that way, but they
 don't necessarily use container authentication and they probably don't
 use EJB's (many people steer clear - deep seated reservations from 1.0
 are still abound).
 
 If I get time I'm going to try and get the Jetty guys to 'surface'
their
 web Authenticators to allow developers to roll their own... I've
looked
 at the code and shouldn't be too difficult - one or two areas I'm not
 sure about, but...
 
 
  
  Thanks,
  Erez 
  
  
  -Original Message-
  From: Sean Radford [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, July 08, 2003 8:21 PM
  To: Struts Users Mailing List
  Subject: RE: Login Form
  
  Have a look at this (you may find what you want):
  
  http://sourceforge.net/projects/securityfilter/
  
  Sean
  
  
   -Original Message-
   From: Erez Efrati [mailto:[EMAIL PROTECTED] 
   Sent: July 8, 2003 10:11 AM
   To: 'Struts Users Mailing List'
   Subject: Login Form
   
   
   Hi,
   
   My question is a bit off Struts but still since I am using Struts
 and
   it's too urgent for me I thought to try my luck here, maybe
someone
  had
   stumbled on this issue too.
   
   I am running JBoss/Tomcat/Struts using the JAAS for handling the
   application security aspects. I have used the
   auth-methodFORM/auth-method clauses inside the Web.xml file.
   
   In my web site I want to have the site home page to have also a
 small
   login form where the user could enter username and password and
 login
  to
   the site. The home page, contains other links as well, which lead
to
   other parts of the site or even to external pages on other sites.
   
   From what I've read so far, it seems to me that the FORM method
is
   activated only when the web user tries to access a protected page.
  Then
   the Web Server (Tomcat in my case) returns the loginPage stated in
 the
   Web.xml file, and only after the login is performed
 (j_security_check)
   the Tomcat then redirects the web user to the original portected
 page.
   
   Is it possible to have the site home page as the login page still
  using
   mechanisms of FORM and JAAS? If so I would really appreciate any
 help
  on
   how to do it, and what are the configurations required. 
   
   Thanks,
   Erez
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
[EMAIL PROTECTED]
   
   
  
 

Dispatching actions from html:link-elements with LookupDispatchAction

2003-07-10 Thread Jussi Koiranen
I am trying to use org.apache.struts.actions.LookupDispatchAction class to
dispatch my actions.
I can dispatch actions from buttons nicely, but I do not know how to
dispatch actions from links.
No matter what I try, I always get:
HTTP ERROR: 500 Request[/details] does not contain handler parameter named
action
I have tried to use paramId-parameter to attach request parameter to the
link-element,
but I haven't figured out how to do it correctly.

Is it possible to use LookupDispatchAction to dispatsh actions from links at
all?
If not, what would be proper way to implement similar functionality?
Should I discard whole LookupDispatchAction and use something else instead
of that,
or just handle links differently?

By the way I am trying to avoid javascript and scriptlets at all costs.


Thanks


In JSP-file I have:

html
body
html:form action=details.do
  html:link action=detailslink/html:link
  html:submit property=actionbean:message
key=button.save//html:submit
  html:submit property=actionbean:message
key=button.create//html:submit
/html:form
/body
/html



In struts-config.xml I have action mapping:

  action name=EmpDetailsForm
  path=/details
  type=strutstest.EmpDetailsAction
  input=empList.jsp
  scope=request
  validate=false
  parameter=action
  forward name=success path=/empList.jsp/
  forward name=failure path=/empList.jsp/
  /action



My EmpDetailsAction class is derived from LookupDispatchAction:

  public class EmpDetailsAction extends LookupDispatchAction {

  protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put(button.save, save);
  map.put(button.create, create);
  return map;
  }

  public ActionForward save(ActionMapping   mapping,
ActionForm  form,
HttpServletRequest  request,
HttpServletResponse response)
  throws IOException, ServletException {
  servlet.log(EmpDetailsAction.save);
  return (mapping.findForward(success));
  }

  public ActionForward create(ActionMapping   mapping,
  ActionForm  form,
  HttpServletRequest  request,
  HttpServletResponse response)
  throws IOException, ServletException {
  servlet.log(EmpDetailsAction.create);
  return (mapping.findForward(success));
  }
}




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



Tiles and Struts: JSP page doesn't compile

2003-07-10 Thread Paula Coll Lapido
I am currently implementing tiles on my webapp, using definitions. I have the 
following files:

1. tiles-defs.xml -- defining the main template as follows:

  definition name=brm.consola path=/templates/console.jsp
   put name=useBean value=/
   put name=header value=/templates/header.jsp /
   put name=body value=/blank.html/
   put name=footer value=/templates/footer.jsp /
  /definition

2. console.jsp: the main template:

html:html locale=true
head
 titlebean:message key=global.titulo//title
script language=JavaScript1.2 src=%= 
request.getContextPath()%/js/util.js/script
link rel=stylesheet href=%= request.getContextPath()%/css/brm.css 
type=text/css
tiles:insert attribute=useBean/
/head
body
table width=100% cellspacing=10 cellpadding=0 border=0
 tr
  td
   !-- cabecera --
   tiles:insert attribute=header/
  /td
 /tr
 tr
  td
   !-- cuerpo --
   tiles:insert attribute=body/
  /td
 /tr
 tr
  td
   !-- pie --
   tiles:insert attribute=footer/
  /td
 /tr
/table
/body
/html:html

3. Several pages with associated body pages, for example:

- page.jsp 

%@ taglib uri=/tags/struts-tiles prefix=tiles %

tiles:insert definition=brm.consola flush=true
 tiles:put name=body value=/tbMenu/body/page_body.jsp type=page/
/tiles:insert

- page_body.jsp -

html:form action=findTB.do
html:hidden property=method name=method value=retrieveTB /
table width=100% cellspacing=5 cellpadding=0 border=0
 tr
  tdbean:message key=tb.text.tiposervicio//td
  td
   html:select property=srvc_id
html:optionsCollection name=TBSearchForm property=srvcList/
   /html:select
  /td
 /tr
 tr
  tdbean:message key=tb.text.fechaservicio//td
  td
   html:text name=TBSearchForm property=date_day maxlength=2 size=2/
   html:text name=TBSearchForm property=date_month maxlength=2 size=2/
   html:text name=TBSearchForm property=date_year maxlength=4 size=4/
  /td
 /tr
 tr
  tdnbsp;/td
  td
   html:submit property= 
bean:message key=tb.button.buscar /
   /html:submit
  /td
 /tr
/table
/html:form

The problem I have is that when I invoke my page.jsp, all the content gets rendered 
(the template: console.jsp and the default header, footer, etc.), BUT the inner body 
page, page_body.jsp, IS NOT COMPILED, it's rendered as text output, so my HTML result 
doesn't display the body content (logically, the navigator can't make anything out of 
struts tags!).

Does anyone have an idea of what's happening???

RE: Login Form

2003-07-10 Thread Sean Radford
Erez,

Things you need to do:

1. Get your EJB's installed and working with your JAAS plugin (or one of
the supplied JBoss ones). So standard J2EE settings in ejb-jar.xml, and
a standard jboss.xml (your security-domain in particular).

2. Create your web app as per the security filter instructions. That
means moving the security defintions that are normally in web.xml to the
securityfilter-config.xml file, and defining the Filter in web.xml. And
in jboss-web.xml you need to define the security-domain. Then you just
need to specify 'my' class as the realm in the
securityfilter-config.xml:

realm className=com.aegeus.securityfilter.JBossRealmAdapter/realm

Hope that helps,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Thu, 2003-07-10 at 12:01, Erez Efrati wrote:
 Sean,
 
 Thanks for the code. I have downloaded everything and I am about to
 start playing with it. But from reading still, I am a bit confused here.
 
 Is this code + SecurityFilter replaces the container security
 configuration of JBoss/Tomcat in ejb-jar.xml, web.xml, jboss.xml,
 jboss-web.xml ?
 
 Thanks,
 Erez
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 10, 2003 11:26 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 All,
 
 Please find attached my securityfilter realm adaptor. The other code I
 was waiting for hasn't materialised, so I couldn't do any comparison -
 but it seems to work for me... Good luck, and any probs just shout.
 
 And nope, I have know idea if the extra functionality is to be resolved
 in the near future within an updated container specification. Any one
 know how we could 'force' the issue?
 
 Regards,
 
 Sean



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



Re: large scale deployments

2003-07-10 Thread Affan Qureshi
Hi,
I think the isssue of scalability and a supporting large customer base is
out of scope of what Struts does. You might want to look into techniques
like clustering, load-balancing and distributed app architectures. Struts
has no feature that helps in these situations. However while Struts does not
solve any scalability problems it does not create any itself. The purpose of
Struts is to help you with some common web development problems that you
would have in any environment. In other words the ability or inability if an
application to support large customer base does not depend on Struts.

Regards,
.Affan

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all,

 We're in the depths of 'framework decision time' for a large scale web
 application.  Does anyone on this list use struts for really large
customer
 bases?  (Millions?, 10s of millions?)  What are the sort of problems large
 scale systems have run into (specifically struts related)?

 Thanks,

 -gjb

 e-mail [EMAIL PROTECTED]
 www.convergys.com

 --
 NOTICE:  The information contained in this electronic mail transmission
is
 intended by Convergys Corporation for the use of the named individual or
 entity to which it is directed and may contain information that is
 privileged or otherwise confidential.  If you have received this
electronic
 mail transmission in error, please delete it from your system without
 copying or forwarding it, and notify the sender of the error by reply
email
 or by telephone (collect), so that the sender's address records can be
 corrected.




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



Re: Tiles and Struts: JSP page doesn't compile

2003-07-10 Thread Paula Coll Lapido
Just found the solution: I hadn't included the struts taglibs in my body JSP
page!!

- Original Message - 
From: Paula Coll Lapido [EMAIL PROTECTED]
To: struts-user [EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 12:13 PM
Subject: Tiles and Struts: JSP page doesn't compile


I am currently implementing tiles on my webapp, using definitions. I have
the following files:

1. tiles-defs.xml -- defining the main template as follows:

  definition name=brm.consola path=/templates/console.jsp
   put name=useBean value=/
   put name=header value=/templates/header.jsp /
   put name=body value=/blank.html/
   put name=footer value=/templates/footer.jsp /
  /definition

2. console.jsp: the main template:

html:html locale=true
head
 titlebean:message key=global.titulo//title
script language=JavaScript1.2 src=%=
request.getContextPath()%/js/util.js/script
link rel=stylesheet href=%= request.getContextPath()%/css/brm.css
type=text/css
tiles:insert attribute=useBean/
/head
body
table width=100% cellspacing=10 cellpadding=0 border=0
 tr
  td
   !-- cabecera --
   tiles:insert attribute=header/
  /td
 /tr
 tr
  td
   !-- cuerpo --
   tiles:insert attribute=body/
  /td
 /tr
 tr
  td
   !-- pie --
   tiles:insert attribute=footer/
  /td
 /tr
/table
/body
/html:html

3. Several pages with associated body pages, for example:

- page.jsp 

%@ taglib uri=/tags/struts-tiles prefix=tiles %

tiles:insert definition=brm.consola flush=true
 tiles:put name=body value=/tbMenu/body/page_body.jsp type=page/
/tiles:insert

- page_body.jsp -

html:form action=findTB.do
html:hidden property=method name=method value=retrieveTB /
table width=100% cellspacing=5 cellpadding=0 border=0
 tr
  tdbean:message key=tb.text.tiposervicio//td
  td
   html:select property=srvc_id
html:optionsCollection name=TBSearchForm property=srvcList/
   /html:select
  /td
 /tr
 tr
  tdbean:message key=tb.text.fechaservicio//td
  td
   html:text name=TBSearchForm property=date_day maxlength=2
size=2/
   html:text name=TBSearchForm property=date_month maxlength=2
size=2/
   html:text name=TBSearchForm property=date_year maxlength=4
size=4/
  /td
 /tr
 tr
  tdnbsp;/td
  td
   html:submit property= 
bean:message key=tb.button.buscar /
   /html:submit
  /td
 /tr
/table
/html:form

The problem I have is that when I invoke my page.jsp, all the content gets
rendered (the template: console.jsp and the default header, footer, etc.),
BUT the inner body page, page_body.jsp, IS NOT COMPILED, it's rendered as
text output, so my HTML result doesn't display the body content (logically,
the navigator can't make anything out of struts tags!).

Does anyone have an idea of what's happening???

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



What is the default scope of an ActionForm.

2003-07-10 Thread Ravi Garg
Hi all,
can any of you tell me if I donnot specify any scope of Form in 
Struts-config.xml then for which scope does the instance of form persists?? 

For example:
action-mappings
action path=/testing
type=test.action.TestingAction
name=TestingForm
input=/jsp/Testing.jsp
forward name=success path=/jsp/Test.jsp/
forward name=invalid path=/jsp/Testing.jsp/
  /action
/action-mappings

What will be the scope of TestingForm?

Regards,
Ravi

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



how to installl struts? pls send me steps

2003-07-10 Thread Lalitha Sundaresan

Dear sir/mam,

Pls can anyone tell me as to how do I go abt inatlling the struts from the 
http://jakarta.apache.org http://jakarta.apache.org/ .

I read the instructions on installing struts but I was not bale to find the jar file 
which they ahd mentioned. I have apachetocat3.2 installed in my m/c.

Pls reply,

Cordially urs,

Lalitha.S

 


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


Re: tiles and tabs; post instead of link

2003-07-10 Thread Natalie D Rassmann


Thank you so much I am going to try to integrate this solution
in my code... I will let you know how I make out and especially if
I find anything interesting.
Thanks again,
Natalie
Dudley Irish wrote:

I have just finished converting the example from the tiles
examples
from links to submits. It is a little more complex
than just changing
the code that generates the links to generate submits,
though you have
to do that too.
First let me describe what I was trying to do. I
have a form which
has a number of tabs each of which contains inputs.
So there is the
"header" of the form that has a few inputs, then several
tabs that all
have inputs. My idea was to use the formbean to
carry all this
information around and repopulate fields as necessary.
Please note: I
am not sure this is the best way to do this and I haven't
gotten all
of my functionality working, so I will happily take advice
on how to
do it. Given that, this is how I did it.
I started with tabsLayout.jsp from the examples.
Using a tiles
definition like the following:
 definition name=".population.tabs"
path="/common/layouts/tabsLayout.jsp" >
 put name="formaction"
value="/Population.do" />
 put name="focus"
value="name" />
 put name="selectedIndex"
value="0" />
 put name="parameterName"
value="selected" />
 put name="tabbody"
value="/Population.jsp" />
 putList name="tabList"
>
 item value="One"
link="/filler1.jsp" />
 item value="Two"
link="/filler2.jsp" />
 item value="Three"
link="/filler3.jsp" />
 item value="Four"
link="/filler4.jsp" />
 /putList>
 /definition>
Notice the addition of "formaction" and "focus".
You must also add
useAttribute takes for these like so:
 tiles:useAttribute name="formaction" classname="java.lang.String"/>
 tiles:useAttribute name="focus" classname="java.lang.String"/>
Then in tabsLayout.jsp you start the form with:
 html:form action="" focus="%=focus%>">
Notice the use of formaction and focus, though I think
that focus
might be better off as a form parameter rather than as
a tile
attribute.
Next you add
 bean:define id="selected"

name="populationForm"

property="selected"

type="java.lang.String"/>
to give your Java code access to the form parameter that
identifies
the selected tab. I have not included the details
of the ActionForm,
but you do need to add selected to your form. We
will get to how this
is set below.
The following snipet of code is used to check the value
of selected.
It shows some modifications that have not been fully
tested. In
particular, I am in the process of removing the selectedIndex
tile
attribute.
 %
 String selectedColor="#98ABC7";
 String notSelectedColor="#C0C0C0";
 int index = 0; // Loop index
 int selectedIndex = 0;
 try {
 selectedIndex = Integer.parseInt(selected);
 }
 catch( java.lang.NumberFormatException
ex ) {
 // do nothing
 }
 // Check selectedIndex bounds
 if( selectedIndex  0 || selectedIndex
>= tabList.size() ) selectedIndex = 0;
 String selectedBody = ((org.apache.struts.tiles.beans.MenuItem)tabList.get(selectedIndex)).getLink();
// Selected body
 %>
Then we insert the tabbody, or the "header" as per the
tile
definition. We have to do this here in order to
keep it and all of
the tabs in the same html:form definition.
 %-- Insert the tab body --%>
 tiles:insert attribute="tabbody" flush="true"/>
Then we insert the tabs.
 %-- Insert the tab pages --%>
 table border="0" cellspacing="0" cellpadding="0">
 %-- Draw tabs --%>
 tr>
 td width="10">nbsp;/td>
 td>
 table border="0"
cellspacing="0" cellpadding="5">
 tr>
 logic:iterate id="tab" name="tabList" type="org.apache.struts.tiles.beans.MenuItem"
>
 %
 String color = notSelectedColor;
 if( index == selectedIndex )
 {

selectedBody = tab.getLink();

color = selectedColor;

} // enf if
 index++;
 %>
 td bgcolor="%=color%>">
 input type="submit" value="%=tab.getValue()%>"
name="tab"/>
 /td>
 td width="1" >/td>
 /logic:iterate>
 /tr>
 /table>
 /td>
 td width="10" >nbsp;/td>
 /tr>
This is actually a little simpler than the tiles example.
Next we insert the selected tab:
 %-- Draw body --%>
 tiles:insert name="%=selectedBody%>" flush="true"
/>
And close the form:
 %-- End the form --%>
 /html:form>
All of this will make more sense when you are looking
at the
tabsLayout.jsp from the examples. Now the final
piece the Action.
Here is the code that I have been testing with:
 public ActionForward executeAction(ActionMapping
mapping,

ActionForm form,

HttpServletRequest request,

HttpServletResponse response)
 throws ClientException, Exception
{
 String tab = request.getParameter("tab");
 PopulationForm popForm = (PopulationForm)
form;
 try {
 if (tab == null) {
 popForm.setSelected("0");
 } else if (tab.equals("One"))
{
 popForm.setSelected("0");
 } else if (tab.equals("Two"))
{
 popForm.setSelected("1");
 } else if (tab.equals("Three"))
{
 popForm.setSelected("2");
 } else if (tab.equals("Four"))
{
 popForm.setSelected("3");
 } else {
 popForm.setSelected("0");
 }
 }
 catch (Exception e) {
 setException(request,
e);
 

Re: What is the default scope of an ActionForm.

2003-07-10 Thread Shashank Dixit
The default scope is REQUEST


- Original Message -
From: Ravi Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 4:19 PM
Subject: What is the default scope of an ActionForm.


 Hi all,
 can any of you tell me if I donnot specify any scope of Form in
Struts-config.xml then for which scope does the instance of form persists??

 For example:
 action-mappings
 action path=/testing
 type=test.action.TestingAction
 name=TestingForm
 input=/jsp/Testing.jsp
 forward name=success path=/jsp/Test.jsp/
 forward name=invalid path=/jsp/Testing.jsp/
   /action
 /action-mappings

 What will be the scope of TestingForm?

 Regards,
 Ravi

 -
 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 populate the form

2003-07-10 Thread Ravi Garg
Hi all,
I am new to struts and what I know is that property name in a JSP must be same 
as that of the variable name in formbean. 
I have a JSP which has a various fields which are dynamicaly generated and the 
the number of fields is also not same every time. 
  The biggest problem is that there is no upper limit to number of these fields. 
So form bean cannot be be designed as the number of fields in the JSP is not fixed. Is 
there any solution to this problem?

Regards,
Ravi

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



RE: What is the default scope of an ActionForm.

2003-07-10 Thread Ravi Garg
I've tried this with my and used the same for at more than 1 screen but what happens 
is that whenever it the property name is same as that already used in previous screen 
it automaticaly populates that portion of the screen

-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 4:28 PM
To: Struts Users Mailing List
Subject: Re: What is the default scope of an ActionForm.


The default scope is REQUEST


- Original Message -
From: Ravi Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 4:19 PM
Subject: What is the default scope of an ActionForm.


 Hi all,
 can any of you tell me if I donnot specify any scope of Form in
Struts-config.xml then for which scope does the instance of form persists??

 For example:
 action-mappings
 action path=/testing
 type=test.action.TestingAction
 name=TestingForm
 input=/jsp/Testing.jsp
 forward name=success path=/jsp/Test.jsp/
 forward name=invalid path=/jsp/Testing.jsp/
   /action
 /action-mappings

 What will be the scope of TestingForm?

 Regards,
 Ravi

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



[OT] colours

2003-07-10 Thread Adam Hardy
I'm doing the HTML design for my current project and I'm looking for 
some resource on the web somewhere that will show me what colours go 
together well, i.e. sets of 2 or 3 colours that contrast pleasingly.

I saw someone post a button site called 'steal these' 
http://gtmcknight.com/buttons/index.php where the buttons had colour 
pairs - I'm wondering if there's something else out there that will help 
me avoid my normal tasteless schemes - gan-green with ultra-violet for 
instance.

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


RE: [OT] colours

2003-07-10 Thread Andrew Hill
Maybe this can help:
http://www.visibone.com/colorlab/

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Thursday, 10 July 2003 19:11
To: Struts Users Mailing List
Subject: [OT] colours


I'm doing the HTML design for my current project and I'm looking for 
some resource on the web somewhere that will show me what colours go 
together well, i.e. sets of 2 or 3 colours that contrast pleasingly.

I saw someone post a button site called 'steal these' 
http://gtmcknight.com/buttons/index.php where the buttons had colour 
pairs - I'm wondering if there's something else out there that will help 
me avoid my normal tasteless schemes - gan-green with ultra-violet for 
instance.

Thanks,
Adam


-
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[2]: What is the default scope of an ActionForm.

2003-07-10 Thread Dirk Markert
Hello Ravi,

 default is SESSION.

***

RG I've tried this with my and used the same for at more than 1 screen but what 
happens is that whenever it the property name is same as that already used in previous 
screen it automaticaly
RG populates that portion of the screen

RG -Original Message-
RG From: Shashank Dixit [mailto:[EMAIL PROTECTED]
RG Sent: Thursday, July 10, 2003 4:28 PM
RG To: Struts Users Mailing List
RG Subject: Re: What is the default scope of an ActionForm.


RG The default scope is REQUEST


RG - Original Message -
RG From: Ravi Garg [EMAIL PROTECTED]
RG To: [EMAIL PROTECTED]
RG Sent: Thursday, July 10, 2003 4:19 PM
RG Subject: What is the default scope of an ActionForm.


 Hi all,
 can any of you tell me if I donnot specify any scope of Form in
RG Struts-config.xml then for which scope does the instance of form persists??

 For example:
 action-mappings
 action path=/testing
 type=test.action.TestingAction
 name=TestingForm
 input=/jsp/Testing.jsp
 forward name=success path=/jsp/Test.jsp/
 forward name=invalid path=/jsp/Testing.jsp/
   /action
 /action-mappings

 What will be the scope of TestingForm?

 Regards,
 Ravi

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


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


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


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



Error with commons-validator

2003-07-10 Thread sriram
I'm tying to incorporate client-side validations using struts validator.
 
I've downloaded all related .jar files and placed them in /WEB-INF/lib.
 
I'm using commons-validator.jar (1.0.2).
 
When I'm trying to display the. jsp page in web browser. it's showing some HTML tags 
as mentioned below:
input type=text n
 
and in the console the exception thrown is:
javax.servlet.ServletException: org/apache/struts/util/MessageResources
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:536)
 
And when I remove the statement validator:javascript formName=supportviewForm/ 
from the .jsp page, it's displayed perfectly in the browser.
 
What could be the reason? Is there any version conflict? When I searched in the 
forums, I found that this error could be because incorrect version of 
commons-validator.jar. But I downloaded 1.0.2 and am using that only.
 
Any help is much appreciated.
 
 


Re: Dispatching actions from html:link-elements with LookupDispatchAction

2003-07-10 Thread Kris Schneider
Haven't tried this before, but it might work:

bean:define id=message
  bean:message key=button.save/
/bean:define

html:link action=/details
   paramId=action
   paramName=message
  ...
/html:link

Quoting Jussi Koiranen [EMAIL PROTECTED]:

 I am trying to use org.apache.struts.actions.LookupDispatchAction class to
 dispatch my actions.
 I can dispatch actions from buttons nicely, but I do not know how to
 dispatch actions from links.
 No matter what I try, I always get:
 HTTP ERROR: 500 Request[/details] does not contain handler parameter named
 action
 I have tried to use paramId-parameter to attach request parameter to the
 link-element,
 but I haven't figured out how to do it correctly.
 
 Is it possible to use LookupDispatchAction to dispatsh actions from links
 at
 all?
 If not, what would be proper way to implement similar functionality?
 Should I discard whole LookupDispatchAction and use something else instead
 of that,
 or just handle links differently?
 
 By the way I am trying to avoid javascript and scriptlets at all costs.
 
 
 Thanks
 
 
 In JSP-file I have:
 
 html
 body
 html:form action=details.do
   html:link action=detailslink/html:link
   html:submit property=actionbean:message
 key=button.save//html:submit
   html:submit property=actionbean:message
 key=button.create//html:submit
 /html:form
 /body
 /html
 
 
 
 In struts-config.xml I have action mapping:
 
   action name=EmpDetailsForm
   path=/details
   type=strutstest.EmpDetailsAction
   input=empList.jsp
   scope=request
   validate=false
   parameter=action
   forward name=success path=/empList.jsp/
   forward name=failure path=/empList.jsp/
   /action
 
 
 
 My EmpDetailsAction class is derived from LookupDispatchAction:
 
   public class EmpDetailsAction extends LookupDispatchAction {
 
   protected Map getKeyMethodMap() {
   Map map = new HashMap();
   map.put(button.save, save);
   map.put(button.create, create);
   return map;
   }
 
   public ActionForward save(ActionMapping   mapping,
 ActionForm  form,
 HttpServletRequest  request,
 HttpServletResponse response)
   throws IOException, ServletException {
   servlet.log(EmpDetailsAction.save);
   return (mapping.findForward(success));
   }
 
   public ActionForward create(ActionMapping   mapping,
   ActionForm  form,
   HttpServletRequest  request,
   HttpServletResponse response)
   throws IOException, ServletException {
   servlet.log(EmpDetailsAction.create);
   return (mapping.findForward(success));
   }
 }

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

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



[OT] Setting up torque with struts

2003-07-10 Thread Mark Lowe
This is how to configure torque to work with struts. a few weeks or  
,perhaps, months ago, Ville (vilho[at]students[dot]cc[dot]tut[dot]fi)  
after he'd spent a week bringing together all the required resources,  
he kindly mailed me some instructions on how to do so. I tested his  
instructions and got stuff running. I was waiting for him to post  
something on this but I guess he hasn't had time etc, so i thought I'd  
do it with any additional knowledge I've gained through going through  
the motions.

You can read about torque here:
http://db.apache.org/torque
...and struts here...
http://jakarta.apache.org/struts
Assumptions
I'll also assume that you're familiar with webapp development, and your  
development follows this organization:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

..and that you've got a compliant container running etc.

In anticipation of any questions, I don't know how to configure IDE's  
if you know your IDE then you should know how to set it up. I'd  
recommend a terminal, ant an a trusty text editor.

1. Download a stable release of torque [3.02 seems to be the puppy at  
this time].

2. Untar torque and put it somewhere where you like to work. (e.g.  
~/Projects)..

3. Copy Torque's jar files to /web/WEB-INF/lib
This way all the relevant jars are in the right place, its a bit messy  
as there are several versions of some classes, I anticipated having  
problems here but none thus far.

4. Edit/Add these properties to build-torque.xml and  
[myproject]-schema.xml (see docs)

property name=torque.output.dir value=../src/
property name=torque.doc.dir value=../doc/
property name=lib.dir value=../web/WEB-INF/lib/
The paths will depend on where you prefer to organize your projects.

You can add these in build.properties.. I prefer doing it in XML, but  
I'm sure there are good reasons for using the properties file instead.

 e.g. in [myproject]-schema.xml

database name=sparrow package=com.sparrow.torque

rather than defining package in a properties file, i think its more  
maintainable as a attribute of database.

Also..
make sure that your jdbc jar is specified in your  torque-classpath  
file set list and avoid wild carding. Both struts and torque make use  
of some of the commons sub projects, torque has a greater dependency on  
some old versions of commons-collections and such like. To get running  
I just use both together and i've had no problems as yet, I'd like to  
get the time and look through the torque source and perhaps make it  
less dependent on deprecated code.

5. Then run.

 ant -f build-torque.xml

Hopefully the OM classes have been generated to your source directory,  
and thus can be compiled with you servlets etc.

e.g.

/src/java/com/sparrow/struts
/src/java/com/sparrow/torque
/src/sql
the following tasks fire up the sql scripts and do the DB stuff.
 ant -f build-torque.xml create-db
 ant -f build-torque.xml id-table-init-sql
 ant -f build-torque.xml insert-sql
6. Now create a servlet that fires up you torque generated OM. Also  
copy the Torque.properties file here. I have a different package name  
than my OM so I can remove all the generated stuff without destroying  
my servlet and properties file. This servlet isn't anything new there  
are loads of resources on the torque site referencing this, I just  
changed the name from InitTorque because 'start' seems a perfectly good  
word for folks to read.

package com.sparrow.servlets;

import java.io.InputStream;
import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.*;
import javax.servlet.*;
import org.apache.torque.Torque;
import org.apache.torque.TorqueException;
import org.apache.commons.configuration.PropertiesConfiguration;
public class StartTorque extends HttpServlet {
  public void init(ServletConfig config) throws ServletException {
	super.init(config);
	try {
	
	  InputStream configStream =  
getServletContext().getResourceAsStream(config.getInitParameter(config 
));
	
	  PropertiesConfiguration c = new PropertiesConfiguration();
	  c.load( configStream );
	  Torque.init( c );
	
	}
	  catch (IOException e) {
	  	throw new ServletException( e.toString() );
	}
	  catch ( TorqueException e ) {
	  throw new ServletException( e.toString() );
	}
  }
}

Edit the Torque.properties file to suit your needs. This will read the  
values in Torque.properties file (covered in Torque docs).

e.g.
##i love sparrows!!
torque.database.default=sparrow
torque.database.sparrow.adapter=mysql
## Using Jdbc2Pool
torque.dsfactory.nsalliance.factory =  
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory. sparrow.pool.defaultMaxActive = 10
torque.dsfactory. sparrow.pool.testOnBorrow = true

##change to select * from dual for Oracle etc
torque.dsfactory. sparrow.pool.validationQuery = SELECT 1
torque.dsfactory. sparrow.connection.driver = com.mysql.jdbc.Driver
torque.dsfactory. sparrow.connection.url =  
jdbc:mysql://localhost:3306/sparrow

Re: Workflow engine status

2003-07-10 Thread Alex McLintock
At 06:15 08/07/03 -0700, Kevin K wrote:
I was looking at Jakarta for a workflow engine and I
found this URL -
http://jakarta.apache.org/struts/proposal-workflow.html.
What I can't find is when this proposal was written
and if this workflow engine is included in the latest
release of Struts.
Sorry if this is a bit late but the people behind the Lenya software are 
investigating whether
they can use different workflow engines through some sort of standard API. 
Admittedly
Lenya has nothing to do with Struts but it may be of some help.

Lenya is an Apache Incubator project which is essentially an XML content 
management system
based upon Apache Cocoon.

Alex
http://www.owal.co.uk/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] colours

2003-07-10 Thread Brown, Melonie S. - Contractor
Title: Re: [OT] colours





I like http://www.defencemechanism.com/color/color_toy_fr.htm 


Adam Hardy wrote:
 I'm doing the HTML design for my current project and I'm looking for 
 some resource on the web somewhere that will show me what colours go 
 together well, i.e. sets of 2 or 3 colours that contrast pleasingly.
 
 I saw someone post a button site called 'steal these' 
 http://gtmcknight.com/buttons/index.php where the buttons had colour 
 pairs - I'm wondering if there's something else out there that will help 
 me avoid my normal tasteless schemes - gan-green with ultra-violet for 
 instance.
 
 Thanks,
 Adam



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

Re: Re[2]: What is the default scope of an ActionForm.

2003-07-10 Thread Mark Lowe
I'm not sure whether it defaults to session, I was under the impression 
it was scoped to the request, but as i pretty much always define the 
scope i wouldn't know.

However when you scope to request the same can happen if redirect is 
set to false, as the action isn't a new request as such.. My guess is 
that if you set redirect to true this will fix your problem..

Cheers mark

On Thursday, July 10, 2003, at 12:15 PM, Dirk Markert wrote:

Hello Ravi,

 default is SESSION.

***

RG I've tried this with my and used the same for at more than 1 
screen but what happens is that whenever it the property name is same 
as that already used in previous screen it automaticaly
RG populates that portion of the screen

RG -Original Message-
RG From: Shashank Dixit [mailto:[EMAIL PROTECTED]
RG Sent: Thursday, July 10, 2003 4:28 PM
RG To: Struts Users Mailing List
RG Subject: Re: What is the default scope of an ActionForm.
RG The default scope is REQUEST

RG - Original Message -
RG From: Ravi Garg [EMAIL PROTECTED]
RG To: [EMAIL PROTECTED]
RG Sent: Thursday, July 10, 2003 4:19 PM
RG Subject: What is the default scope of an ActionForm.

Hi all,
can any of you tell me if I donnot specify any scope of Form in
RG Struts-config.xml then for which scope does the instance of form 
persists??
For example:
action-mappings
action path=/testing
type=test.action.TestingAction
name=TestingForm
input=/jsp/Testing.jsp
forward name=success path=/jsp/Test.jsp/
forward name=invalid path=/jsp/Testing.jsp/
  /action
/action-mappings
What will be the scope of TestingForm?

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


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

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



Regards,
Dirk
+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+
-
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] Use of Static Methods

2003-07-10 Thread Jerry Jalenak
To everyone:  WOW!  Talk about opening a can of worms!  It's been quite
interesting reading the different viewpoints regarding the use of statics vs
singletons, whether Perl is OO or not, etc. etc. etc.  It's this kind of
discussion that makes this list one (if not THE) best list on the web.

Ted: Thanks for answering the specific question.  As much as I've enjoyed
the thread, all I really wanted to know is if my approach for these 'helper'
methods was appropriate or not.  I'm not sure what you mean by 'whether
instantiating Password is an issue' - I can't think of a case where
instantiating any class would be an issue, so I guess I could change the
Password class to be a 'normal' class.  The 'getEncryptedPassword()' method
is used by several different classes, so I don't really want to make it part
of a specific class - that's one of the reasons I moved it to a 'helper'
class and made it static.  I guess the only question I have remaining is
whether there is a problem with maintaining 'thread safety' with the use of
a static method   Is there a chance that two or more users can get to
the method at the same time and clobber each other?


Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 5:34 PM
To: Struts Users Mailing List
Subject: Re: [OT] Use of Static Methods


It's mainly a question of whether instantiating Password is an issue. If 
  not, then make it a normal method.

Ideally, getEncryptedPassword should be a method of whatever class needs 
to call it.

The benefit of static methods is that they can be called without 
instantiating the class that contains them. So long as instantiation is 
not an issue, then make it a normal method on whichever class needs to 
use it. (Or make Password a member class of whichever classes need to 
call it, and instantiate it when the parent class is instantiated.)

-Ted.


Jerry Jalenak wrote:
 back-from-lunch
 
 Thanks to everyone for weighing in on this.  I certainly didn't expect
this
 type of discussion.
 
 Let me give an example of what we are trying to do, and see if this is
 appropriate or not.  For various reasons we have a 'roll your own' logon
 authentication process.  Part of the process takes the users password, and
 using a stored digest key, we encrypt it and then compare it to the stored
 (encrypted) password.  If they match, great.  If not, then we return an
 error.  The code that we use to do the encryption looks like the
following:
 
   public static byte[] getEncryptedPassword(byte[] digestKey, String
 password)
   {
   try
   {
   MessageDigest md =
 MessageDigest.getInstance(SHA1);
   md.update(digestKey);
   md.update(password.getBytes());
   return (md.digest());
   }
   catch(Exception e)
   {
   return (null);
   }
   }
 
 The class name is 'Password', so to call this method we use something like
 'Password.getEncryptedPassword(storedDigestKey, enteredPassword)'.  Is
this
 type of method appropriate for a 'static' method?  Or should this be a
 singleton?  Or a normal class?
 
 
 
 Jerry Jalenak
 Team Lead, Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496
 
 [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 12:35 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Use of Static Methods
 
 
 I and a lot of other developers would disagree with the statement
 Static methods are evil for many reasons including philosophical (they're
 not OO) and practical (you can't override their behavior).
 
 1) Whenever you write a method that only accesses static data of a class,
 you should declare the method as static.
 
 2) It is not correct to say that static methods can't be overriden. They
can
 be overridden with another static method. You can't override a static
method
 to be non-static, however.
 
 3) There are many cases where using the static modifier on a method is
 totally appropriate. Typically, they are used on methods that provide a
very
 specific functionality that will never change. Using the static modifier
on
 such methods also reduces the overall memory footprint of an application.
 
 Regards,
 
 Richard
 
 
 
  
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 9:22 AM
 To: Struts Users Mailing List
 Subject: RE: [OT] Use of Static Methods
 
 
 
One of my programmers asked me whether or not it is OK to define 
helper methods as 'static' - and I realized that I didn't know the 
answer.  So I guess the question is, in a web application, can common 
code be factored out
to a helper class and marked 

JavascriptValidatorTag error

2003-07-10 Thread sriram
I'm getting the following exception when I'm trying to use 'Struts Validator' in .jsp 
file. (I get this exception when I try to display the .jsp in the browser) - this 
exception is shown on jboss console.


java.lang.NullPointerException
at org.apache.struts.validator.taglib.html.JavascriptValidatorTag.doStar
tTag(Unknown Source)



If I remove validator:javascript formName=supportviewForm/ from the .jsp page, 
then the page is being displayed properly.

What could be the reason? How to sovle this?


RE: [OT] Use of Static Methods

2003-07-10 Thread Andrew Hill
snip
It's this kind of discussion that makes this list one (if not THE) best list
on the web.
/snip

+1

snip
I guess the only question I have remaining is whether there is a problem
with maintaining 'thread safety' with the use of a static method
/snip

As for thread safety, thats all about the data rather than methods. Any
number of threads can be running the same chunk of code simultaneously but
if its not reading or writing stuff that other threads can access then its
safe, otherwise you need to take precautions.

For singleton helpers this would of course include member variables of that
class (just like with Actions) - which are essentially singleton helpers
called by the request processor...

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
Sent: Thursday, 10 July 2003 20:54
To: 'Struts Users Mailing List'
Subject: RE: [OT] Use of Static Methods


To everyone:  WOW!  Talk about opening a can of worms!  It's been quite
interesting reading the different viewpoints regarding the use of statics vs
singletons, whether Perl is OO or not, etc. etc. etc.  It's this kind of
discussion that makes this list one (if not THE) best list on the web.

Ted: Thanks for answering the specific question.  As much as I've enjoyed
the thread, all I really wanted to know is if my approach for these 'helper'
methods was appropriate or not.  I'm not sure what you mean by 'whether
instantiating Password is an issue' - I can't think of a case where
instantiating any class would be an issue, so I guess I could change the
Password class to be a 'normal' class.  The 'getEncryptedPassword()' method
is used by several different classes, so I don't really want to make it part
of a specific class - that's one of the reasons I moved it to a 'helper'
class and made it static.  I guess the only question I have remaining is
whether there is a problem with maintaining 'thread safety' with the use of
a static method   Is there a chance that two or more users can get to
the method at the same time and clobber each other?


Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 5:34 PM
To: Struts Users Mailing List
Subject: Re: [OT] Use of Static Methods


It's mainly a question of whether instantiating Password is an issue. If
  not, then make it a normal method.

Ideally, getEncryptedPassword should be a method of whatever class needs
to call it.

The benefit of static methods is that they can be called without
instantiating the class that contains them. So long as instantiation is
not an issue, then make it a normal method on whichever class needs to
use it. (Or make Password a member class of whichever classes need to
call it, and instantiate it when the parent class is instantiated.)

-Ted.


Jerry Jalenak wrote:
 back-from-lunch

 Thanks to everyone for weighing in on this.  I certainly didn't expect
this
 type of discussion.

 Let me give an example of what we are trying to do, and see if this is
 appropriate or not.  For various reasons we have a 'roll your own' logon
 authentication process.  Part of the process takes the users password, and
 using a stored digest key, we encrypt it and then compare it to the stored
 (encrypted) password.  If they match, great.  If not, then we return an
 error.  The code that we use to do the encryption looks like the
following:

   public static byte[] getEncryptedPassword(byte[] digestKey, String
 password)
   {
   try
   {
   MessageDigest md =
 MessageDigest.getInstance(SHA1);
   md.update(digestKey);
   md.update(password.getBytes());
   return (md.digest());
   }
   catch(Exception e)
   {
   return (null);
   }
   }

 The class name is 'Password', so to call this method we use something like
 'Password.getEncryptedPassword(storedDigestKey, enteredPassword)'.  Is
this
 type of method appropriate for a 'static' method?  Or should this be a
 singleton?  Or a normal class?



 Jerry Jalenak
 Team Lead, Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496

 [EMAIL PROTECTED]


 -Original Message-
 From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 12:35 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Use of Static Methods


 I and a lot of other developers would disagree with the statement
 Static methods are evil for many reasons including philosophical (they're
 not OO) and practical (you can't override their behavior).

 1) Whenever you write a method that only accesses static data of a class,
 you should declare the method as static.

 2) It is not correct to say that static methods can't be overriden. They
can
 be overridden 

AW: JavascriptValidatorTag error

2003-07-10 Thread Kern P., DP ITS, SCP, M
Hello,

if you are using struts 1.1 i think the following is ok

html:javascript formName=someForm /

but no gurantee...this works for me.

regards

Pete

-Ursprüngliche Nachricht-
Von: sriram [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 10. Juli 2003 14:55
An: 'Struts Users Mailing List'
Betreff: JavascriptValidatorTag error


I'm getting the following exception when I'm trying to use 'Struts
Validator' in .jsp file. (I get this exception when I try to display the
.jsp in the browser) - this exception is shown on jboss console.


java.lang.NullPointerException
at
org.apache.struts.validator.taglib.html.JavascriptValidatorTag.doStar
tTag(Unknown Source)



If I remove validator:javascript formName=supportviewForm/ from the
.jsp page, then the page is being displayed properly.

What could be the reason? How to sovle this?

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



Re: PAC pattern (Presentation-Abstraction-Controller)

2003-07-10 Thread Dos Santos
Hi Craig, thanks for your interest.

One of the things that I know about PAC is that you
can build an application in a hierarchical fashion
through communication among controllers. Is this
possible with MVC? Do you know where I can get
information on the subject?

Secondly, the interface and model are completely
separated from each other.

You can find info on PAC at the following sites:

http://www.ub.tu-cottbus.de/hss/diss/fak1/lewerenz_j/html/ch2.html

http://www.cs.queensu.ca/~cisc322/lectures/322Week07.pdf
(page 5)

There is a french site created by the author of PAC,
if you're interested let me know.

I have several pdf documents, (in English), too.

Thanks again.

--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 
 
 On Tue, 8 Jul 2003, Dos Santos wrote:
 
  Date: Tue, 8 Jul 2003 10:30:43 -0700 (PDT)
  From: Dos Santos [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
  To: Struts Users Mailing List
 [EMAIL PROTECTED]
  Subject: Re: PAC pattern
 (Presentation-Abstraction-Controller)
 
  Are you sure? I've read papers published by the
 author
  of PAC and she states that they are different.
 
  PAC has a controller between the abstraction and
 the
  interface (presentation). MVC has 2 interfaces
 (View
  and Controller) both of which interact with the
  abstraction (Model). I think that conceptually
 they
  are different.
 
  What do you think?
 
 
 Do you have some references to articles or
 descriptions about PAC?  In
 particular, I'd like to understand how it might be
 better (for app
 developers) than the MVC paradigm that Struts
 already supports before I am
 interested in worrying about how it might be
 supported.
 
 If it's not better, then why should we bother?
 
 Craig
 

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Struts 1.1 - FileNotFoundException

2003-07-10 Thread sriram
I'm trying to use struts 1.1. When i deploy the application, I'm getting the following 
error:
 
18:43:29,867 ERROR [ActionServlet] Parsing error processing resource path
java.io.FileNotFoundException: JAR entry 
org/apache/struts/resources/struts-config_1_1.dtd not found 
 
Is the struts.jar I'm using corrupted? I tried by downloading struts.jar, but the 
error still persists.
 
Pl. suggest a solution to this.


Re: [OT] colours

2003-07-10 Thread Adam Hardy
How do you find these things? I searched google and got nowhere.

Brown, Melonie S. - Contractor wrote:
I like _http://www.defencemechanism.com/color/color_toy_fr.htm_ 

Adam Hardy wrote:
  I'm doing the HTML design for my current project and I'm looking for
  some resource on the web somewhere that will show me what colours go
  together well, i.e. sets of 2 or 3 colours that contrast pleasingly.
 
  I saw someone post a button site called 'steal these'
  _http://gtmcknight.com/buttons/index.php_ where the buttons had colour
  pairs - I'm wondering if there's something else out there that will help
  me avoid my normal tasteless schemes - gan-green with ultra-violet for
  instance.
 
  Thanks,
  Adam


-
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: Using JSTL tags instead of Struts tags

2003-07-10 Thread Kamholz, Keith (corp-staff) USX
I'd be interested in finding out about this too.


-Original Message-
From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 7:30 AM
To: 'Struts Users Mailing List'
Subject: Using JSTL tags instead of Struts tags


A previous thread had encouraged me to look into JSTL.  It looks like there
are several tags which I could use instead of Struts tags.  Has anyone come
across any documentation about experiences doing this (benefits, drawbacks,
caveats)?  Anyone care to share their experience?

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


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

2003-07-10 Thread Erez Efrati
Thanks a lot Sean, I will try it and let you know how it works.

Thanks for your great help,
Erez


-Original Message-
From: Sean Radford [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 12:28 PM
To: Struts Users Mailing List
Subject: RE: Login Form

Erez,

Things you need to do:

1. Get your EJB's installed and working with your JAAS plugin (or one of
the supplied JBoss ones). So standard J2EE settings in ejb-jar.xml, and
a standard jboss.xml (your security-domain in particular).

2. Create your web app as per the security filter instructions. That
means moving the security defintions that are normally in web.xml to the
securityfilter-config.xml file, and defining the Filter in web.xml. And
in jboss-web.xml you need to define the security-domain. Then you just
need to specify 'my' class as the realm in the
securityfilter-config.xml:

realm className=com.aegeus.securityfilter.JBossRealmAdapter/realm

Hope that helps,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Thu, 2003-07-10 at 12:01, Erez Efrati wrote:
 Sean,
 
 Thanks for the code. I have downloaded everything and I am about to
 start playing with it. But from reading still, I am a bit confused
here.
 
 Is this code + SecurityFilter replaces the container security
 configuration of JBoss/Tomcat in ejb-jar.xml, web.xml, jboss.xml,
 jboss-web.xml ?
 
 Thanks,
 Erez
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 10, 2003 11:26 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 All,
 
 Please find attached my securityfilter realm adaptor. The other code I
 was waiting for hasn't materialised, so I couldn't do any comparison -
 but it seems to work for me... Good luck, and any probs just shout.
 
 And nope, I have know idea if the extra functionality is to be
resolved
 in the near future within an updated container specification. Any one
 know how we could 'force' the issue?
 
 Regards,
 
 Sean



-
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: Using JSTL tags instead of Struts tags

2003-07-10 Thread David Graham
I don't have any documentation but the only Struts taglibs I use are html
and tiles.  I replaced my usage of the bean tags with the fmt:message
tag and the Struts logic tags are all replaced with a combination of the
c:if and c:forEach tags plus the expression language.

The JSPs are remarkably easy to maintain and debug using this strategy
because there aren't any scriptlets or complicated business logic in them.

David

--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.
 
 
 -Original Message-
 From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags
 
 
 A previous thread had encouraged me to look into JSTL.  It looks like
 there
 are several tags which I could use instead of Struts tags.  Has anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?
 
 Joshua
 
 
 This communication, including attachments, is for the exclusive use of 
 addressee and may contain proprietary, confidential or privileged 
 information. If you are not the intended recipient, any use, copying, 
 disclosure, dissemination or distribution is strictly prohibited. If 
 you are not the intended recipient, please notify the sender 
 immediately by return email and delete this communication and destroy
 all
 copies.
 
 
 -
 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]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [OT] colours

2003-07-10 Thread Mark Lowe
there are some interesting links on the university of Portsmouth's  
psychology dept. form their colour displays research...

http://web.port.ac.uk/departments/psychology/other/colour.htm#col_dem

including this link

http://colourharmony.massey.ac.nz/

On Thursday, July 10, 2003, at 02:29 PM, Adam Hardy wrote:

How do you find these things? I searched google and got nowhere.

Brown, Melonie S. - Contractor wrote:
I like _http://www.defencemechanism.com/color/color_toy_fr.htm_ Adam  
Hardy wrote:
  I'm doing the HTML design for my current project and I'm looking  
for
  some resource on the web somewhere that will show me what colours  
go
  together well, i.e. sets of 2 or 3 colours that contrast  
pleasingly.
 
  I saw someone post a button site called 'steal these'
  _http://gtmcknight.com/buttons/index.php_ where the buttons had  
colour
  pairs - I'm wondering if there's something else out there that  
will help
  me avoid my normal tasteless schemes - gan-green with ultra-violet  
for
  instance.
 
  Thanks,
  Adam
-- 
--
-
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: Using JSTL tags instead of Struts tags

2003-07-10 Thread Kamholz, Keith (corp-staff) USX
There isn't really any business logic with the struts tags either, and
there's generally no need for scriptlets.  I don't know anything about JSTL,
but I'm just not seeing the advantage here.  At least not yet.

- Keith


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 9:51 AM
To: Struts Users Mailing List
Subject: RE: Using JSTL tags instead of Struts tags


I don't have any documentation but the only Struts taglibs I use are html
and tiles.  I replaced my usage of the bean tags with the fmt:message
tag and the Struts logic tags are all replaced with a combination of the
c:if and c:forEach tags plus the expression language.

The JSPs are remarkably easy to maintain and debug using this strategy
because there aren't any scriptlets or complicated business logic in them.

David

--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.
 
 
 -Original Message-
 From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags
 
 
 A previous thread had encouraged me to look into JSTL.  It looks like
 there
 are several tags which I could use instead of Struts tags.  Has anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?
 
 Joshua
 
 
 This communication, including attachments, is for the exclusive use of 
 addressee and may contain proprietary, confidential or privileged 
 information. If you are not the intended recipient, any use, copying, 
 disclosure, dissemination or distribution is strictly prohibited. If 
 you are not the intended recipient, please notify the sender 
 immediately by return email and delete this communication and destroy
 all
 copies.
 
 
 -
 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]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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: How to differentiate between timed-out user and new user?

2003-07-10 Thread Erik Price


Paananen, Tero wrote:
So when you say persistent user repository, do you
mean something that the programmer manually store in
the DB or is there some API that we can query
it on the web server?


manually store in the DB (or flat files, whatever),
unless you're using a product that provides this sort
of stuff out-of-the-box.
Any arguments against using an application-scoped attribute, or a simple 
Singleton that keeps track of this?  It doesn't seem like something that 
would be important enough to persist beyond an application restart.

Just curious.

Erik

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


Re: How to differentiate between timed-out user and new user?

2003-07-10 Thread Erik Price


K.C. Baltz wrote:

I use a SessionListener to record the SessionIDs when they are created.  
I'm not sure yet how I'm going to handle the Set filling up with 
SessionIDs.  I'll have to find some way to expire them.
Someone just told me recently (on this list) about using SoftReference 
and WeakReference, which will expire on their own when the memory is 
needed.  But if you want them to be expired on a regular basis, perhaps 
you could just write a simple TimerTask-based daemon to go through and 
remove them?  Also instead of a Set you could use a Map, using the 
SessionID as the key and the login time as the value so you can see how 
old any given SessionID is.

Just some ideas off the top of my head.



Erik

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


RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread David Graham
--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 There isn't really any business logic with the struts tags either, and
 there's generally no need for scriptlets.  I don't know anything about
 JSTL,
 but I'm just not seeing the advantage here.  At least not yet.

Start using it and you will :-).  The expression language is the best
thing since sliced bread.

David

 
 - Keith
 
 
 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags
 
 
 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the fmt:message
 tag and the Struts logic tags are all replaced with a combination of the
 c:if and c:forEach tags plus the expression language.
 
 The JSPs are remarkably easy to maintain and debug using this strategy
 because there aren't any scriptlets or complicated business logic in
 them.
 
 David
 
 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
  I'd be interested in finding out about this too.
  
  
  -Original Message-
  From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 10, 2003 7:30 AM
  To: 'Struts Users Mailing List'
  Subject: Using JSTL tags instead of Struts tags
  
  
  A previous thread had encouraged me to look into JSTL.  It looks like
  there
  are several tags which I could use instead of Struts tags.  Has anyone
  come
  across any documentation about experiences doing this (benefits,
  drawbacks,
  caveats)?  Anyone care to share their experience?
  
  Joshua
  
  
  This communication, including attachments, is for the exclusive use of
 
  addressee and may contain proprietary, confidential or privileged 
  information. If you are not the intended recipient, any use, copying, 
  disclosure, dissemination or distribution is strictly prohibited. If 
  you are not the intended recipient, please notify the sender 
  immediately by return email and delete this communication and destroy
  all
  copies.
  
  
  -
  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]
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



JSTL and JSF What does the future hold?

2003-07-10 Thread Davidson, Glenn
Many of us a new to Struts and have limited time to learn new technologies.
I have heard some (not a lot) of hype for Java Server Faces. Being new and
having to learn this technology what recommendation can you give? Should we
skip JSTL? Should we jump to JSF? Many of you on this list are actually
creating these new technologies and we look to you for some guidance. 

Thanks

Glenn



RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread Hookom, Jacob

Start using it and you will :-).  The expression language is the best
thing since sliced bread.

David
I agree, I'm even using the EL parser to do stuff on completely different
layers for scripting logic.  Also, you can VERY easily use JSTL's parsing
objects in your own tags to make them a little more flexible.
Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the fmt:message
 tag and the Struts logic tags are all replaced with a combination of the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
  I'd be interested in finding out about this too.
 
 
  -Original Message-
  From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 10, 2003 7:30 AM
  To: 'Struts Users Mailing List'
  Subject: Using JSTL tags instead of Struts tags
 
 
  A previous thread had encouraged me to look into JSTL.  It looks like
  there
  are several tags which I could use instead of Struts tags.  Has anyone
  come
  across any documentation about experiences doing this (benefits,
  drawbacks,
  caveats)?  Anyone care to share their experience?
 
  Joshua
 
 
  This communication, including attachments, is for the exclusive use of

  addressee and may contain proprietary, confidential or privileged
  information. If you are not the intended recipient, any use, copying,
  disclosure, dissemination or distribution is strictly prohibited. If
  you are not the intended recipient, please notify the sender
  immediately by return email and delete this communication and destroy
  all
  copies.
 
 
  -
  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]
 


 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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: JSTL and JSF What does the future hold?

2003-07-10 Thread David Graham
--- Davidson, Glenn [EMAIL PROTECTED] wrote:
 Many of us a new to Struts and have limited time to learn new
 technologies.
 I have heard some (not a lot) of hype for Java Server Faces. Being new
 and
 having to learn this technology what recommendation can you give? Should
 we
 skip JSTL? 

JSF is not a replacement for JSTL.  You should most definitely use the
JSTL  tags in your app instead of Struts specific tags.

 Should we jump to JSF? 

JSF hasn't been released yet so you can't jump to it just yet.  I highly
recommend trying it out though.

David

 Many of you on this list are actually
 creating these new technologies and we look to you for some guidance. 
 
 Thanks
 
 Glenn
 
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



applying a style on a bean:message

2003-07-10 Thread Ionel Gardais
Hi,

How to apply a CSS style to a bean:message ?

I didn't find any style= parameter to the tag.

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


RE: applying a style on a bean:message

2003-07-10 Thread James Childers
Wrap it with an HTML span tag. e.g.:

span class=someCSSclassbean:message attribute=value attribute2=value2 
//span

-= J

 -Original Message-
 From: Ionel Gardais [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:11 AM
 To: Struts Users Mailing List
 Subject: applying a style on a bean:message
 
 
 Hi,
 
 How to apply a CSS style to a bean:message ?
 
 I didn't find any style= parameter to the tag.
 
 thanks,
 ionel
 
 
 -
 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] Use of Static Methods

2003-07-10 Thread Erik Price


NYIMI Jose (BMB) wrote:

In my view, it's a much better solution to have one object that can be used to locate 
other objects. I call this an
application context object, although I've also seen it termed a registry or application 
toolbox. Any object in the
application needs only to get a reference to the single instance of the context object 
to retrieve the single instances
of any application object. Objects are normally retrieved by name. This context object 
doesn't even need to be a
singleton. For example, it's possible to use the Servlet API to place the context in a 
web application's
ServletContext, or we can bind the context object in JNDI and access it using standard 
application server
functionality. Such approaches don't require code changes to the context object 
itself, just a little bootstrap code.


This sounds a lot like the ServiceLocator pattern.

http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html





Erik

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


org/apache/struts/resources/struts-config_1_1.dtd not found

2003-07-10 Thread sriram
I tried using struts1.1 by downloading the latest copy of struts.jar from the web, but 
I'm getting the following error:
 
18:43:29,867 ERROR [ActionServlet] Parsing error processing resource path
java.io.FileNotFoundException: JAR entry 
org/apache/struts/resources/struts-config_1_1.dtd not found 

Any suggestions?


Unable to catch ServletException

2003-07-10 Thread White, Joshua A (HTSC, CASD)
I have a struts tag which is throwing a servletexception.  I have tried to
catch this exception by defining it as a global exception and waiting for it
to bubble up but the jsp page prints the stack trace to the screen
regardless.  Any ideas?

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



Re: PAC pattern (Presentation-Abstraction-Controller)

2003-07-10 Thread Carlos Duque
As I noted in an earlier email, the patterns are in common use essentially 
the same.  The terminology is slightly different but the two have merged:

Here is the Sun description of the pattern:

http://java.sun.com/blueprints/patterns/MVC-detailed.html

and another layout

http://ootips.org/mvc-pattern.html

You will note the essential similarity in functionality, just a difference 
in nomenclature among PAC and MVC.

For more info, I suggest you review Martin Fowler's excellent Patterns of 
Enterprise Application 
Architecture. 
http://www.amazon.com/exec/obidos/tg/detail/-/0321127420/qid=1057847031/sr=8-1/ref=sr_8_1/103-0958753-9067852?v=glances=booksn=507846

Carlos

At 06:18 AM 7/10/2003, you wrote:
Hi Craig, thanks for your interest.

One of the things that I know about PAC is that you
can build an application in a hierarchical fashion
through communication among controllers. Is this
possible with MVC? Do you know where I can get
information on the subject?
Secondly, the interface and model are completely
separated from each other.
You can find info on PAC at the following sites:

http://www.ub.tu-cottbus.de/hss/diss/fak1/lewerenz_j/html/ch2.html

http://www.cs.queensu.ca/~cisc322/lectures/322Week07.pdf
(page 5)
There is a french site created by the author of PAC,
if you're interested let me know.
I have several pdf documents, (in English), too.

Thanks again.

--- Craig R. McClanahan [EMAIL PROTECTED] wrote:


 On Tue, 8 Jul 2003, Dos Santos wrote:

  Date: Tue, 8 Jul 2003 10:30:43 -0700 (PDT)
  From: Dos Santos [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
  To: Struts Users Mailing List
 [EMAIL PROTECTED]
  Subject: Re: PAC pattern
 (Presentation-Abstraction-Controller)
 
  Are you sure? I've read papers published by the
 author
  of PAC and she states that they are different.
 
  PAC has a controller between the abstraction and
 the
  interface (presentation). MVC has 2 interfaces
 (View
  and Controller) both of which interact with the
  abstraction (Model). I think that conceptually
 they
  are different.
 
  What do you think?
 

 Do you have some references to articles or
 descriptions about PAC?  In
 particular, I'd like to understand how it might be
 better (for app
 developers) than the MVC paradigm that Struts
 already supports before I am
 interested in worrying about how it might be
 supported.

 If it's not better, then why should we bother?

 Craig


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

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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: Unable to catch ServletException

2003-07-10 Thread Mike Jasnowski
I imagine this exception is not originating from your tag. Does the
servletexception wrapp another exception which may be from your tag?

-Original Message-
From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:25 AM
To: 'Struts Users Mailing List'
Subject: Unable to catch ServletException


I have a struts tag which is throwing a servletexception.  I have tried to
catch this exception by defining it as a global exception and waiting for it
to bubble up but the jsp page prints the stack trace to the screen
regardless.  Any ideas?

Joshua


This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and destroy all
copies.


-
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: Using JSTL tags instead of Struts tags

2003-07-10 Thread Mark Lowe
I started using JSTL but found that it encouraged site builders to 
start embedding logic in JSP's. While I can see that JSLT is more 
powerful, isn't it true to say that it encourages breaking with the 
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet 
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise 
of the folks who developed struts, but whenever I read use JSLT it 
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:

Start using it and you will :-).  The expression language is the best
thing since sliced bread.
David
I agree, I'm even using the EL parser to do stuff on completely 
different
layers for scripting logic.  Also, you can VERY easily use JSTL's 
parsing
objects in your own tags to make them a little more flexible.
Jacob

- Keith

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 9:51 AM
To: Struts Users Mailing List
Subject: RE: Using JSTL tags instead of Struts tags
I don't have any documentation but the only Struts taglibs I use are
html
and tiles.  I replaced my usage of the bean tags with the 
fmt:message
tag and the Struts logic tags are all replaced with a combination of 
the
c:if and c:forEach tags plus the expression language.

The JSPs are remarkably easy to maintain and debug using this strategy
because there aren't any scriptlets or complicated business logic in
them.
David

--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
I'd be interested in finding out about this too.

-Original Message-
From: White, Joshua A (HTSC, CASD)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 7:30 AM
To: 'Struts Users Mailing List'
Subject: Using JSTL tags instead of Struts tags
A previous thread had encouraged me to look into JSTL.  It looks like
there
are several tags which I could use instead of Struts tags.  Has 
anyone
come
across any documentation about experiences doing this (benefits,
drawbacks,
caveats)?  Anyone care to share their experience?

Joshua

This communication, including attachments, is for the exclusive use 
of

addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and destroy
all
copies.
-
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]


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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]


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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]


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


RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread Mike Jasnowski
I would think you'd run into that possibility with either Struts or JSTL.
Our designers love JSTL because it's succinct and a bit more obvious in what
object.property you are working with. But it's sometimes up to me and other
engineers to steer the designers away from bad practices.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: Using JSTL tags instead of Struts tags


I started using JSTL but found that it encouraged site builders to
start embedding logic in JSP's. While I can see that JSLT is more
powerful, isn't it true to say that it encourages breaking with the
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise
of the folks who developed struts, but whenever I read use JSLT it
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:


 Start using it and you will :-).  The expression language is the best
 thing since sliced bread.

 David
 I agree, I'm even using the EL parser to do stuff on completely
 different
 layers for scripting logic.  Also, you can VERY easily use JSTL's
 parsing
 objects in your own tags to make them a little more flexible.
 Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the
 fmt:message
 tag and the Struts logic tags are all replaced with a combination of
 the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.


 -Original Message-
 From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags


 A previous thread had encouraged me to look into JSTL.  It looks like
 there
 are several tags which I could use instead of Struts tags.  Has
 anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?

 Joshua


 This communication, including attachments, is for the exclusive use
 of

 addressee and may contain proprietary, confidential or privileged
 information. If you are not the intended recipient, any use, copying,
 disclosure, dissemination or distribution is strictly prohibited. If
 you are not the intended recipient, please notify the sender
 immediately by return email and delete this communication and destroy
 all
 copies.


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



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



-
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: JSTL and JSF What does the future hold?

2003-07-10 Thread Davidson, Glenn
Thanks David,

I have seen several warnings on this mailing list about the danger of
embedding logic into the JSP code. Do you have any comment on this danger?

Thanks

Glenn

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:14 AM
To: Struts Users Mailing List
Subject: Re: JSTL and JSF What does the future hold?


--- Davidson, Glenn [EMAIL PROTECTED] wrote:
 Many of us a new to Struts and have limited time to learn new
 technologies.
 I have heard some (not a lot) of hype for Java Server Faces. Being new
 and
 having to learn this technology what recommendation can you give? Should
 we
 skip JSTL? 

JSF is not a replacement for JSTL.  You should most definitely use the
JSTL  tags in your app instead of Struts specific tags.

 Should we jump to JSF? 

JSF hasn't been released yet so you can't jump to it just yet.  I highly
recommend trying it out though.

David

 Many of you on this list are actually
 creating these new technologies and we look to you for some guidance. 
 
 Thanks
 
 Glenn
 
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Réf. : RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread meissa . Sakho

can someone point me out a tutorial or a good book about JSLT.

Meissa




Mike Jasnowski [EMAIL PROTECTED]
10/07/2003 16:33
Veuillez répondre à Struts Users Mailing List


Pour :  Struts Users Mailing List [EMAIL PROTECTED]
cc :
Objet : RE: Using JSTL tags instead of Struts tags


I would think you'd run into that possibility with either Struts or JSTL.
Our designers love JSTL because it's succinct and a bit more obvious in
what
object.property you are working with. But it's sometimes up to me and
other
engineers to steer the designers away from bad practices.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: Using JSTL tags instead of Struts tags


I started using JSTL but found that it encouraged site builders to
start embedding logic in JSP's. While I can see that JSLT is more
powerful, isn't it true to say that it encourages breaking with the
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise
of the folks who developed struts, but whenever I read use JSLT it
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:


 Start using it and you will :-).  The expression language is the best
 thing since sliced bread.

 David
 I agree, I'm even using the EL parser to do stuff on completely
 different
 layers for scripting logic.  Also, you can VERY easily use JSTL's
 parsing
 objects in your own tags to make them a little more flexible.
 Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the
 fmt:message
 tag and the Struts logic tags are all replaced with a combination of
 the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.


 -Original Message-
 From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags


 A previous thread had encouraged me to look into JSTL.  It looks like
 there
 are several tags which I could use instead of Struts tags.  Has
 anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?

 Joshua


 This communication, including attachments, is for the exclusive use
 of

 addressee and may contain proprietary, confidential or privileged
 information. If you are not the intended recipient, any use, copying,
 disclosure, dissemination or distribution is strictly prohibited. If
 you are not the intended recipient, please notify the sender
 immediately by return email and delete this communication and destroy
 all
 copies.


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



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



-
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] Use of Static Methods

2003-07-10 Thread NYIMI Jose (BMB)
 This sounds a lot like the ServiceLocator pattern.
 
http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html

But ServiceLocator uses Singleton. Have a look the following link at page 126
http://developer.java.sun.com/developer/Books/j2ee/dpa/j2ee_dpa_Ch3.pdf

Here the author is talking about an object that doesn't need to be singleton.
That is the difference. At least as i understood it :)

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


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



DefinitionDispatcherAction problem

2003-07-10 Thread ale bra
Hi all,
I've got problems with DefinitionDispatcherAction taking a definition as a 
parameter.
I have a global forward which redirects to an action of type 
DefinitionDispatcherAction :

global-forwards
   forward name=login path=/LinkToMain.do?def=MyLink/
/global-forwards
action-mappings
   action path=/LinkToMain 
type=org.apache.struts.tiles.actions.DefinitionDispatcherAction 
parameter=def
 forward name=error path=/Login/
   /action
...
/action-mappings

The definition MyLink is in tiles-defs :
...
   definition name=MyLink extends=.mainLayout
   put name=title  value=Another Title /
   put name=body   value=/EmployeeList.do /
   /definition
...
I've a link on my menu.jsp pointing to to global-forward :

html:link forward=login  ITEM
/html:link
I thought that these settings should have given me the result to have the 
definition MyLink displayed in the browser.
Well, I don't get any error but the result is an EMPTY PAGE!

Where I'm wrong??

Thanks
Alex
___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
_
MSN Foto: condividi, ritocca e stampa le tue foto online 
http://photos.msn.it

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


Simplest way to clear DynaActionForm?

2003-07-10 Thread Alex Shneyderman
What is the fastest/simplest way of clearing the DynaAcitonForm?

I am looking for something like:

DynaActionForm form = init here;

:
:

logic goe s here

if (need to manually clear the form) {
   form.clear (); // 
}

Thanks,
Alex.


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



RE: Réf. : RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread Raible, Matt
www.jstlbook.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 8:45 AM
To: Struts Users Mailing List
Subject: Réf. : RE: Using JSTL tags instead of Struts tags



can someone point me out a tutorial or a good book about JSLT.

Meissa




Mike Jasnowski [EMAIL PROTECTED]
10/07/2003 16:33
Veuillez répondre à Struts Users Mailing List



Pour :  Struts Users Mailing List
[EMAIL PROTECTED]
cc :

Objet : RE: Using JSTL tags instead of Struts tags


I would think you'd run into that possibility with either Struts or
JSTL.
Our designers love JSTL because it's succinct and a bit more obvious in

what
object.property you are working with. But it's sometimes up to me and

other
engineers to steer the designers away from bad practices.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: Using JSTL tags instead of Struts tags


I started using JSTL but found that it encouraged site builders to
start embedding logic in JSP's. While I can see that JSLT is more
powerful, isn't it true to say that it encourages breaking with the
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise
of the folks who developed struts, but whenever I read use JSLT it
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:


 Start using it and you will :-).  The expression language is the best
 thing since sliced bread.

 David
 I agree, I'm even using the EL parser to do stuff on completely
 different
 layers for scripting logic.  Also, you can VERY easily use JSTL's
 parsing
 objects in your own tags to make them a little more flexible.
 Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the
 fmt:message
 tag and the Struts logic tags are all replaced with a combination of
 the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this
strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.


 -Original Message-
 From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags


 A previous thread had encouraged me to look into JSTL.  It looks
like
 there
 are several tags which I could use instead of Struts tags.  Has
 anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?

 Joshua


 This communication, including attachments, is for the exclusive use
 of

 addressee and may contain proprietary, confidential or privileged
 information. If you are not the intended recipient, any use,
copying,
 disclosure, dissemination or distribution is strictly prohibited. If
 you are not the intended recipient, please notify the sender
 immediately by return email and delete this communication and
destroy
 all
 copies.



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



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



-
To unsubscribe, e-mail: [EMAIL 

RE: Réf. : RE: Using JSTL tags instead of Struts tags

2003-07-10 Thread Davidson, Glenn
Go to www.java.sun.com and type JSTL in the search box and you will get a
list of resources available. There are tutorials and references to books
articles etc. 

Glenn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:45 AM
To: Struts Users Mailing List
Subject: Réf. : RE: Using JSTL tags instead of Struts tags



can someone point me out a tutorial or a good book about JSLT.

Meissa




Mike Jasnowski [EMAIL PROTECTED]
10/07/2003 16:33
Veuillez répondre à Struts Users Mailing List



Pour :  Struts Users Mailing List [EMAIL PROTECTED]
cc :

Objet : RE: Using JSTL tags instead of Struts tags


I would think you'd run into that possibility with either Struts or JSTL.
Our designers love JSTL because it's succinct and a bit more obvious in

what
object.property you are working with. But it's sometimes up to me and

other
engineers to steer the designers away from bad practices.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: Using JSTL tags instead of Struts tags


I started using JSTL but found that it encouraged site builders to
start embedding logic in JSP's. While I can see that JSLT is more
powerful, isn't it true to say that it encourages breaking with the
view-controller demarcation?

I find the struts tags on the other hand, used with zero scriptlet
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise
of the folks who developed struts, but whenever I read use JSLT it
seems to me  a step backwards.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:


 Start using it and you will :-).  The expression language is the best
 thing since sliced bread.

 David
 I agree, I'm even using the EL parser to do stuff on completely
 different
 layers for scripting logic.  Also, you can VERY easily use JSTL's
 parsing
 objects in your own tags to make them a little more flexible.
 Jacob


 - Keith


 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 9:51 AM
 To: Struts Users Mailing List
 Subject: RE: Using JSTL tags instead of Struts tags


 I don't have any documentation but the only Struts taglibs I use are
 html
 and tiles.  I replaced my usage of the bean tags with the
 fmt:message
 tag and the Struts logic tags are all replaced with a combination of
 the
 c:if and c:forEach tags plus the expression language.

 The JSPs are remarkably easy to maintain and debug using this strategy
 because there aren't any scriptlets or complicated business logic in
 them.

 David

 --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
 I'd be interested in finding out about this too.


 -Original Message-
 From: White, Joshua A (HTSC, CASD)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 7:30 AM
 To: 'Struts Users Mailing List'
 Subject: Using JSTL tags instead of Struts tags


 A previous thread had encouraged me to look into JSTL.  It looks like
 there
 are several tags which I could use instead of Struts tags.  Has
 anyone
 come
 across any documentation about experiences doing this (benefits,
 drawbacks,
 caveats)?  Anyone care to share their experience?

 Joshua


 This communication, including attachments, is for the exclusive use
 of

 addressee and may contain proprietary, confidential or privileged
 information. If you are not the intended recipient, any use, copying,
 disclosure, dissemination or distribution is strictly prohibited. If
 you are not the intended recipient, please notify the sender
 immediately by return email and delete this communication and destroy
 all
 copies.


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



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.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]



 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com

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

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

RE: [OT] Setting up torque with struts

2003-07-10 Thread James Childers
Thanks Mark. This should probably be archived somewhere outside of the mailing list. 
Do you have any plans to put it on a web page somewhere?

-= J

 -Original Message-
 From: Mark Lowe [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 6:53 AM
 To: Struts List
 Cc: Garry Dillon; Jeremy Pocock; Simon Brown; Simon Fox;
 [EMAIL PROTECTED]
 Subject: [OT] Setting up torque with struts
 
 
 This is how to configure torque to work with struts. a few weeks or  
 ,perhaps, months ago, Ville 
 (vilho[at]students[dot]cc[dot]tut[dot]fi)  
 after he'd spent a week bringing together all the required 
 resources,  
 he kindly mailed me some instructions on how to do so. I tested his  
 instructions and got stuff running. I was waiting for him to post  
 something on this but I guess he hasn't had time etc, so i 
 thought I'd  
 do it with any additional knowledge I've gained through going 
 through  
 the motions.
 
 You can read about torque here:
 http://db.apache.org/torque
 
 ...and struts here...
 http://jakarta.apache.org/struts
 
 Assumptions
 I'll also assume that you're familiar with webapp 
 development, and your  
 development follows this organization:
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
 
 ..and that you've got a compliant container running etc.
 
 In anticipation of any questions, I don't know how to 
 configure IDE's  
 if you know your IDE then you should know how to set it up. I'd  
 recommend a terminal, ant an a trusty text editor.
 
 1. Download a stable release of torque [3.02 seems to be the 
 puppy at  
 this time].
 
 2. Untar torque and put it somewhere where you like to work. (e.g.  
 ~/Projects)..
 
 3. Copy Torque's jar files to /web/WEB-INF/lib
 This way all the relevant jars are in the right place, its a 
 bit messy  
 as there are several versions of some classes, I anticipated having  
 problems here but none thus far.
 
 4. Edit/Add these properties to build-torque.xml and  
 [myproject]-schema.xml (see docs)
 
 property name=torque.output.dir value=../src/
 property name=torque.doc.dir value=../doc/
 property name=lib.dir value=../web/WEB-INF/lib/
 
 The paths will depend on where you prefer to organize your projects.
 
 You can add these in build.properties.. I prefer doing it in 
 XML, but  
 I'm sure there are good reasons for using the properties file instead.
 
   e.g. in [myproject]-schema.xml
 
 database name=sparrow package=com.sparrow.torque
 
 rather than defining package in a properties file, i think its more  
 maintainable as a attribute of database.
 
 Also..
 make sure that your jdbc jar is specified in your  
 torque-classpath  
 file set list and avoid wild carding. Both struts and torque 
 make use  
 of some of the commons sub projects, torque has a greater 
 dependency on  
 some old versions of commons-collections and such like. To 
 get running  
 I just use both together and i've had no problems as yet, I'd 
 like to  
 get the time and look through the torque source and perhaps make it  
 less dependent on deprecated code.
 
 5. Then run.
 
   ant -f build-torque.xml
 
 Hopefully the OM classes have been generated to your source 
 directory,  
 and thus can be compiled with you servlets etc.
 
 e.g.
 
 /src/java/com/sparrow/struts
 /src/java/com/sparrow/torque
 /src/sql
 
 the following tasks fire up the sql scripts and do the DB stuff.
   ant -f build-torque.xml create-db
   ant -f build-torque.xml id-table-init-sql
   ant -f build-torque.xml insert-sql
 
 6. Now create a servlet that fires up you torque generated OM. Also  
 copy the Torque.properties file here. I have a different 
 package name  
 than my OM so I can remove all the generated stuff without 
 destroying  
 my servlet and properties file. This servlet isn't anything 
 new there  
 are loads of resources on the torque site referencing this, I just  
 changed the name from InitTorque because 'start' seems a 
 perfectly good  
 word for folks to read.
 
 package com.sparrow.servlets;
 
 import java.io.InputStream;
 import java.io.IOException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.*;
 import javax.servlet.*;
 
 import org.apache.torque.Torque;
 import org.apache.torque.TorqueException;
 import org.apache.commons.configuration.PropertiesConfiguration;
 
 
 public class StartTorque extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
   super.init(config);
   try {
   
 InputStream configStream =  
 getServletContext().getResourceAsStream(config.getInitParamete
 r(config 
 ));
   
 PropertiesConfiguration c = new PropertiesConfiguration();
 c.load( configStream );
 Torque.init( c );
   
   }
 catch (IOException e) {
   throw new ServletException( e.toString() );
   }
 catch ( TorqueException e ) {
 throw new ServletException( e.toString() );
   }
}
 }
 
 Edit the Torque.properties file 

Re: Using JSTL tags instead of Struts tags

2003-07-10 Thread David Graham
--- Mark Lowe [EMAIL PROTECTED] wrote:
 I started using JSTL but found that it encouraged site builders to 
 start embedding logic in JSP's. While I can see that JSLT is more 
 powerful, isn't it true to say that it encourages breaking with the 
 view-controller demarcation?

No, it doesn't encourage poor programming.  Anyone can abuse the tags but
it's up to your designers to use them for view logic.  If you provide
beans that perform the business logic, the page designers will have no
reason to implement that logic in the view.

 
 I find the struts tags on the other hand, used with zero scriptlet 
 tolerance, forces you to do all the work in your action servlets.
 
 I'm open to views against mine, and I also wouldn't dismiss the advise 
 of the folks who developed struts, but whenever I read use JSLT it 
 seems to me  a step backwards.

It's a huge step *forwards* from the Struts tags.  The JSTL is far more
powerful and easier to use.  Plus, it's a standard so every Java web
developer is expected to know it.

David

 
 On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:
 
 
  Start using it and you will :-).  The expression language is the best
  thing since sliced bread.
 
  David
  I agree, I'm even using the EL parser to do stuff on completely 
  different
  layers for scripting logic.  Also, you can VERY easily use JSTL's 
  parsing
  objects in your own tags to make them a little more flexible.
  Jacob
 
 
  - Keith
 
 
  -Original Message-
  From: David Graham [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 10, 2003 9:51 AM
  To: Struts Users Mailing List
  Subject: RE: Using JSTL tags instead of Struts tags
 
 
  I don't have any documentation but the only Struts taglibs I use are
  html
  and tiles.  I replaced my usage of the bean tags with the 
  fmt:message
  tag and the Struts logic tags are all replaced with a combination of 
  the
  c:if and c:forEach tags plus the expression language.
 
  The JSPs are remarkably easy to maintain and debug using this
 strategy
  because there aren't any scriptlets or complicated business logic in
  them.
 
  David
 
  --- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
  I'd be interested in finding out about this too.
 
 
  -Original Message-
  From: White, Joshua A (HTSC, CASD)
  [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 10, 2003 7:30 AM
  To: 'Struts Users Mailing List'
  Subject: Using JSTL tags instead of Struts tags
 
 
  A previous thread had encouraged me to look into JSTL.  It looks
 like
  there
  are several tags which I could use instead of Struts tags.  Has 
  anyone
  come
  across any documentation about experiences doing this (benefits,
  drawbacks,
  caveats)?  Anyone care to share their experience?
 
  Joshua
 
 
  This communication, including attachments, is for the exclusive use 
  of
 
  addressee and may contain proprietary, confidential or privileged
  information. If you are not the intended recipient, any use,
 copying,
  disclosure, dissemination or distribution is strictly prohibited. If
  you are not the intended recipient, please notify the sender
  immediately by return email and delete this communication and
 destroy
  all
  copies.
 
 
 
 -
  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]
 
 
 
  __
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
  http://sbc.yahoo.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]
 
 
 
  __
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
  http://sbc.yahoo.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]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



html spaces

2003-07-10 Thread Ben Anderson
maybe this is a more genearl html/xml question - not really sure

   c:set var=link
   bean:message key=path/
   bean:message key=file
   /c:set
so this sets link to equal /mypath/somewhere/ myfile.htm
obviously this puts a space in there and won't work.
I know this will work:
   c:set var=link
   bean:message key=path/bean:message key=file
   /c:set
but does anyone know if there's a way to continue to the next line without 
inserting a space?
Thanks,
Ben Anderson

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

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


Re: html spaces

2003-07-10 Thread David Graham
--- Ben Anderson [EMAIL PROTECTED] wrote:
 maybe this is a more genearl html/xml question - not really sure
 
 c:set var=link
 bean:message key=path/
 bean:message key=file
 /c:set

Why are you using the JSTL's c:set tag but not the fmt:message tag? 
fmt:message is a straightforward replacement of the bean:message tag.

David

 
 so this sets link to equal /mypath/somewhere/ myfile.htm
 obviously this puts a space in there and won't work.
 I know this will work:
 c:set var=link
 bean:message key=path/bean:message key=file
 /c:set
 but does anyone know if there's a way to continue to the next line
 without 
 inserting a space?
 Thanks,
 Ben Anderson
 
 _
 STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Blank JSP Instead of Exception

2003-07-10 Thread Aaron Longwell
I'm building a new Struts app... and for the first half of development, 
uncaught exceptions would be reported by the container (on a web page 
that's visible to the end user).

Suddenly yesterday all exceptions stopped being reported to the web 
output, and are now only appearing as a StackTrace in stderr.log. The 
exceptions are Jsp compile errors (i.e I've typed an attribute wrong 
in a JSTL tag). It's really annoying to have to scan the stderr.log 
every time to debug a Jsp... how did I turn off error reporting?

I don't recall any substantial changes to my struts or web.xml 
configs and my code prints no stack traces... where is the stack 
trace coming from?

Also, how is it possible that I get valid HTML from the page, even when 
a JspException occurred compiling the page (here is actual output):

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=Content-Type content=text/html; 
charset=windows-1252/HEAD
BODY/BODY/HTML

I am using tiles for the layout of the page.

Thanks for any help,
Aaron
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using JSTL tags instead of Struts tags

2003-07-10 Thread Aaron Longwell


David Graham wrote:

--- Mark Lowe [EMAIL PROTECTED] wrote:
 

I started using JSTL but found that it encouraged site builders to 
start embedding logic in JSP's. While I can see that JSLT is more 
powerful, isn't it true to say that it encourages breaking with the 
view-controller demarcation?
   

No, it doesn't encourage poor programming.  Anyone can abuse the tags but
it's up to your designers to use them for view logic.  If you provide
beans that perform the business logic, the page designers will have no
reason to implement that logic in the view.
 

I find the struts tags on the other hand, used with zero scriptlet 
tolerance, forces you to do all the work in your action servlets.

I'm open to views against mine, and I also wouldn't dismiss the advise 
of the folks who developed struts, but whenever I read use JSLT it 
seems to me  a step backwards.
   

It's a huge step *forwards* from the Struts tags.  The JSTL is far more
powerful and easier to use.  Plus, it's a standard so every Java web
developer is expected to know it.
David
 

PLUS... They are WAY WAY SHORTER syntactically... as an aesthetics freak 
(also a designer), I prefer the JSTL syntax.

On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote:

   

Start using it and you will :-).  The expression language is the best
thing since sliced bread.
David
I agree, I'm even using the EL parser to do stuff on completely 
different
layers for scripting logic.  Also, you can VERY easily use JSTL's 
parsing
objects in your own tags to make them a little more flexible.
Jacob

 

- Keith

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 9:51 AM
To: Struts Users Mailing List
Subject: RE: Using JSTL tags instead of Struts tags
I don't have any documentation but the only Struts taglibs I use are
html
and tiles.  I replaced my usage of the bean tags with the 
fmt:message
tag and the Struts logic tags are all replaced with a combination of 
the
c:if and c:forEach tags plus the expression language.

The JSPs are remarkably easy to maintain and debug using this
   

strategy
   

because there aren't any scriptlets or complicated business logic in
them.
David

--- Kamholz, Keith   (corp-staff) USX [EMAIL PROTECTED] wrote:
   

I'd be interested in finding out about this too.

-Original Message-
From: White, Joshua A (HTSC, CASD)
 

[mailto:[EMAIL PROTECTED]
   

Sent: Thursday, July 10, 2003 7:30 AM
To: 'Struts Users Mailing List'
Subject: Using JSTL tags instead of Struts tags
A previous thread had encouraged me to look into JSTL.  It looks
 

like
   

there
are several tags which I could use instead of Struts tags.  Has 
anyone
come
across any documentation about experiences doing this (benefits,
drawbacks,
caveats)?  Anyone care to share their experience?

Joshua

This communication, including attachments, is for the exclusive use 
of
 

addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use,
 

copying,
   

disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and
 

destroy
   

all
copies.


 

-
   

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]
 

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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]
   

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.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]
 

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



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: html spaces

2003-07-10 Thread Eric Jain
 but does anyone know if there's a way to continue to the next line
 without inserting a space?

You could use JSP/XML syntax, that would give you this behavior.

--
Eric Jain


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



RE: [OT] Use of Static Methods

2003-07-10 Thread NYIMI Jose (BMB)
snip
But ServiceLocator uses Singleton
/snip
I meant ServiceLocator is implemented as a Singleton ...

José.

 -Original Message-
 From: NYIMI Jose (BMB) 
 Sent: Thursday, July 10, 2003 4:46 PM
 To: Struts Users Mailing List
 Subject: RE: [OT] Use of Static Methods
 
 
  This sounds a lot like the ServiceLocator pattern.
  
 http://java.sun.com/blueprints/corej2eepatterns/Patterns/Serv
 iceLocator.html
 
 But ServiceLocator uses Singleton. Have a look the following 
 link at page 126 
 http://developer.java.sun.com/developer/Books/j2ee/dpa/j2ee_dp
a_Ch3.pdf

Here the author is talking about an object that doesn't need to be singleton. That is 
the difference. At least as i understood it :)

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


-
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: Using JSTL tags instead of Struts tags

2003-07-10 Thread Laurent PETIT
Hello,

From: David Graham [EMAIL PROTECTED]
 No, it doesn't encourage poor programming.  Anyone can abuse the tags but
 it's up to your designers to use them for view logic.  If you provide
 beans that perform the business logic, the page designers will have no
 reason to implement that logic in the view.

Yeah, maybe in a perfect world, with always up to date good developers, it
may be possible that they won't abuse technologies and break layers ...

... in a perfect world, maybe.

But my 'little' experience told me that if there's a way to do things
quicker (at the cost of 'good programming practices'), you will end up with
an unmaintainable piece of program ...

So I really understand what Mark is afraid of, because I had to be a
maintainer of such bad layered applications.

(I find in practice, it's almost impossible to keep bad programmers -or not
up to date with the more recent technos- away from applications)

--
Laurent




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



Struts 1.1 Bug? PlugIn Objects Not Serializable

2003-07-10 Thread Hohlen, John C
 I'm encountering a serialization error due to Plug-In objects, in my case, the 
 org.apache.struts.validator.ValidatorPlugIn not being serializable.  An array of 
 plug-ins are stored in application scope in the 
 ActionServlet.initModulePlugIns() method.  However, the PlugIn interface does 
 not implement serializable nor do any of the implementing subclasses 
 (ModuleConfigVerifier, TilesPlugin, ValidatorPlugIn).  Anybody have any ideas for a 
 possible workaround?
 JOHN
 P.S. I checked Bugzilla database and did not see this error.  I will add if others 
 concur with this.
 
 

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



struts doc

2003-07-10 Thread Taner Diler
hi,

I want to develop my web applications by using struts. I found some
tutorials. but they do not include

enough sample codes about developing applications that are not complicated.
so if you have good documents or

know any internet web sites, could you inform me about it?

thanks for your attention...





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



RE: struts doc

2003-07-10 Thread Marcos Oliva
Hello Taner,

You can start with this 
http://stealthis.athensgroup.com/presentations/Model_Layer_Framework/Str
uts_Whitepaper.doc.

-Original Message-
From: Taner Diler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 8:26 AM
To: Struts Users Mailing List
Subject: struts doc

hi,

I want to develop my web applications by using struts. I found some
tutorials. but they do not include

enough sample codes about developing applications that are not
complicated.
so if you have good documents or

know any internet web sites, could you inform me about it?

thanks for your attention...





-
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: logic:empty inside logic:iterate

2003-07-10 Thread Joe Zendle
Hi this is a repost. Can anyone help? This looks like a bug to me. I'm
about to try JSTL to compare. I'm using struts 1.1, java 1.4.2, tomcat
4.1.24

Cheers.

-Original Message-
From: Joe Zendle 
Sent: Wednesday, July 09, 2003 3:20 PM
To: Struts Users Mailing List
Subject: logic:empty inside logic:iterate

I'm trying to display a checkbox only if a field is not empty. This
logic is applied in a logic:iterate tag as in the code below. No
matter what the property values are, the checkbox is always displayed as
if the logic check is not made. I have tried logic:empty,
logic:notEmpty, logic:equals, logic:notEquals and I always get the same
result - the checkbox is always displayed. Am I doing something in
non-kosher manner?

Thanks in advance.

Joe 

table border=0 cellpadding=0 cellspacing=0 class=form_block
width=544
tr
  td class=form_titleAddress/td
  td class=form_titleDescription/td
  td class=form_titleDelete/td/tr
  logic:iterate id=address indexId=i name=EmailSettingsForm
property=addresses
tr
td
   html:text property='%= addresses[ + i + ].emailAddress %'
/  
/td
td
  html:text property='%= addresses[ + i + ].description %'/
/td
  logic:notEmpty name=address property=emailAddress/
html:checkbox property='%= addresses[ + i + ].deleteFlag
%'/
  /logic:notEmpty
   /td
   /tr
/logic:iterate
tr
td colspan=3nbsp;/td
/tr
tr
td colspan=3h6nbsp;/h6/td
/tr
trtdnbsp;/tdtd class=form_field html:submit
property=btnSubmit value=OK/ html:reset value=Cancel
//tdtdnbsp;/td/tr
/table


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



  1   2   3   >