how to add a lib? what modification should i make?

2002-12-20 Thread cnyinhua
I want to add a taglib as htmlel. My IDE is Jbuilder 8.0 trial, struts
is 1.1.
Thankx
 
Best regard!
 
Frank
Software Engineer
Bleum Incorporated
9E East Building, Hi-Tech King World
668 East Beijing Road.
Shanghai, P.R.C.21
Phone: (8621) 5308 1196
http:// www.bleum.com
 



RE: multithreaded env

2002-12-20 Thread Andrew Hill
A webapp running in a servlet container (this includes any struts app) is by
nature multithreaded.

As you know, in a struts app most of the work is done not in servlets you
implement, but rather in Action classes.

These are also multithreaded. Struts will create a single instance of your
Action and all requests for that Action will be processed by that instance.
This means that at any given moment you could have any number of threads
simultaneously running that Action's code.

The implication of this is that you have to be careful of what you do with
class member variables. (ie. Dont use them!)

for example, consider the following rather contrived Action:

public class WotsitAction extends Action
{
  private String _foo; //member variable - Dangerous!

  public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
   HttpServletRequest request,
HttpServletResponse response)
throws Exception
  {
WotsitForm wotsitForm = (WotsitForm)form;
_foo = wotsitForm.getFoo(); //line 1
doSomething(_foo); //line 2
//etc
  }
}

Now let us imagine we have two users who both submit different values for
foo at nearly the same instant. User A submits a value of A, and User B
submits a value of B. Let us assume that user A submits first. The action
code is invoked and line 1 causes _foo to be set to A.

Meanwhile user B has also submitted. His request goes to the same instance
of the WotsitAction.

Let us imagine that user B's thread executes line 1 a picosecond after user
A, just before user A's thread starts line 2. As a result _foo is now set to
B, because both threads are sharing the same action instance and thus the
same _foo variable.

Now BOTH users threads will be using the value of B to doSomething(). This
is obviously not what we intended...

Whats rather scary about this is that the errors that will result may well
not be picked up in your basic testing, but rather will surface much later
when load testing is conducted, or even worse when the app is in production.
They will be intermittent errors and could take a considerable amount of
time to track down...

In this example for the code to work as intended it is necessary that the
member variable _foo is replaced by a method variable. Ie:

public class WotsitAction extends Action
{
  public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
   HttpServletRequest request,
HttpServletResponse response)
throws Exception
  {
WotsitForm wotsitForm = (WotsitForm)form;
String foo = wotsitForm.getFoo(); //line 1
doSomething(foo); //line 2
//etc
  }
}

In this case both threads still share the action instance, but foo is now
local to the execute method and each thread has its own foo. Things will now
work as intended...
Basically dont use class member variables in your actions (unless you are
specifically intending to share information between threads with them. Even
in that case it would not be a good idea as you have other such
considerations as clustering, the need to synchronize reads and writes
etc...).

Now you may be thinking you could instead of refactoring all that code in
the first version of WotsitAction just make the execute  other public
methods synchronized, and indeed you technically could.

That however has nasty performance implications. Imagine the execute()
method takes 10 seconds to do its thing. Imagine also that 6 users submit at
once. With execute synchronized, only one of the threads can be executing
the synchronized code at a time. Some of those users could be waiting up to
a minute for their request to complete... Furthermore thread wakeup
notification doesnt happen in any particular order. If lots more requests
keep pouring in all the time its conceivable some request threads could
'never' get a chance to run execute()

These sort of issues need to be considered for any shared objects. For
example stuff you put into ServletContext can be accessed by many threads at
the same time. Likewise with stuff in the SessionContext. The request
context on the other hand is not shared with other threads (unless you make
your own threads - (dont do that in a webapp! - its naughty)). Request
scoped actionform instances are therefore unique to that request. Session
scoped actionforms may be 'problematic' under some circumstances. (Refer to
my discussion in this list with Eddie recently under the thread Multiple
forms in session to see why)

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 15:05
To: Struts Users Mailing List
Subject: multithreaded env


Hi All,

I am working on a struts application. But I am not sure that it will work
properly in multithreaded environment.

Can anybody suggest me what is the best way to make sure that application
work fine in such environment.

Thank You.


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

[Announce / help] STRUTS - Help needed on open source project

2002-12-20 Thread Harshal D

THIS IS NOT A TECHNICAL QUESTION.

 

Hello,

 

I am a contributor to www.theopenstack.com

 

We are trying to simplify  promote use of open source technology in building 
‘enterprise application’. The goal is to pre-define a stack and demonstrate the use of 
open source technologies for enterprise applications. We will be demonstrating how to 
build the same example application, step-by-step, by adding features such as DB 
access, caching, ERP integration, Service oriented architecture support  
Collaboration. 

 

We are a bunch of business tier application developers and seriously lack STRUTS 
skills. We really need contributors in this area.

 

Please check out the website, about us  projects links to explore further if you are 
interested.

 

 Thanks

 

Harshal



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: multithreaded env

2002-12-20 Thread Amit Badheka
Hi Andrew,

Thanks a lot for such a great information.
It has cleared lots of my doubts.

But, I will be very thankful if you can put some more light on case if I
want to do serialization or file handling.

thanks.

Amit Badheka.

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 1:50 PM
Subject: RE: multithreaded env


 A webapp running in a servlet container (this includes any struts app) is
by
 nature multithreaded.

 As you know, in a struts app most of the work is done not in servlets you
 implement, but rather in Action classes.

 These are also multithreaded. Struts will create a single instance of your
 Action and all requests for that Action will be processed by that
instance.
 This means that at any given moment you could have any number of threads
 simultaneously running that Action's code.

 The implication of this is that you have to be careful of what you do with
 class member variables. (ie. Dont use them!)

 for example, consider the following rather contrived Action:

 public class WotsitAction extends Action
 {
   private String _foo; file://member variable - Dangerous!

   public ActionForward execute(ActionMapping mapping, ActionForm
actionForm,
HttpServletRequest request,
 HttpServletResponse response)
   throws Exception
   {
 WotsitForm wotsitForm = (WotsitForm)form;
 _foo = wotsitForm.getFoo(); file://line 1
 doSomething(_foo); file://line 2
 file://etc
   }
 }

 Now let us imagine we have two users who both submit different values for
 foo at nearly the same instant. User A submits a value of A, and User B
 submits a value of B. Let us assume that user A submits first. The
action
 code is invoked and line 1 causes _foo to be set to A.

 Meanwhile user B has also submitted. His request goes to the same instance
 of the WotsitAction.

 Let us imagine that user B's thread executes line 1 a picosecond after
user
 A, just before user A's thread starts line 2. As a result _foo is now set
to
 B, because both threads are sharing the same action instance and thus
the
 same _foo variable.

 Now BOTH users threads will be using the value of B to doSomething().
This
 is obviously not what we intended...

 Whats rather scary about this is that the errors that will result may well
 not be picked up in your basic testing, but rather will surface much later
 when load testing is conducted, or even worse when the app is in
production.
 They will be intermittent errors and could take a considerable amount of
 time to track down...

 In this example for the code to work as intended it is necessary that the
 member variable _foo is replaced by a method variable. Ie:

 public class WotsitAction extends Action
 {
   public ActionForward execute(ActionMapping mapping, ActionForm
actionForm,
HttpServletRequest request,
 HttpServletResponse response)
   throws Exception
   {
 WotsitForm wotsitForm = (WotsitForm)form;
 String foo = wotsitForm.getFoo(); file://line 1
 doSomething(foo); file://line 2
 file://etc
   }
 }

 In this case both threads still share the action instance, but foo is now
 local to the execute method and each thread has its own foo. Things will
now
 work as intended...
 Basically dont use class member variables in your actions (unless you are
 specifically intending to share information between threads with them.
Even
 in that case it would not be a good idea as you have other such
 considerations as clustering, the need to synchronize reads and writes
 etc...).

 Now you may be thinking you could instead of refactoring all that code in
 the first version of WotsitAction just make the execute  other public
 methods synchronized, and indeed you technically could.

 That however has nasty performance implications. Imagine the execute()
 method takes 10 seconds to do its thing. Imagine also that 6 users submit
at
 once. With execute synchronized, only one of the threads can be executing
 the synchronized code at a time. Some of those users could be waiting up
to
 a minute for their request to complete... Furthermore thread wakeup
 notification doesnt happen in any particular order. If lots more requests
 keep pouring in all the time its conceivable some request threads could
 'never' get a chance to run execute()

 These sort of issues need to be considered for any shared objects. For
 example stuff you put into ServletContext can be accessed by many threads
at
 the same time. Likewise with stuff in the SessionContext. The request
 context on the other hand is not shared with other threads (unless you
make
 your own threads - (dont do that in a webapp! - its naughty)). Request
 scoped actionform instances are therefore unique to that request. Session
 scoped actionforms may be 'problematic' under some circumstances. (Refer
to
 my discussion in this list with Eddie recently under the thread 

Exception while displaying RSS content feed..

2002-12-20 Thread Shashidhar Bhattaram
Hi, I tried creating a new portlet to display news using the content
feed at
http://www.news4sites.com/service/newsfeed.php?tech=rssid=265

Then I created a .xreg file with the following content...

?xml version=1.0 encoding=UTF-8?
registry
portlet-entry name=CricketWorld hidden=false type=ref
parent=RSS application=false
meta-info
titleCricket News/title
/meta-info

classnameorg.apache.jetspeed.portal.portlets.NewRSSPortlet/classname
url
CachedOnURL=truehttp://www.news4sites.com/service/newsfeed.php?tech=r
ssid=265/url
/portlet-entry
/registry

After re-starting the server, when I try to access the home page, I get
the following error..

java.lang.NoClassDefFoundError
at
org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(T
emplateSessionValidator.java:105)
at
org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform(J
etspeedSessionValidator.java:103)
at org.apache.turbine.modules.Action.perform(Action.java:87)
at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
.

...

Any clues?

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




Workflow Extension Goes Back a Page Problem

2002-12-20 Thread Jerry Yu
Hi, I am trying to use Matthias' workflow extension in my webApp. One 
problem I have is anyone did anything that can let the user goes back a 
page?  I tried to put a GoBack button on my apps and set the state of 
it. But seems, it won't let me pass it.  Does anyone have any idea how 
to do this?  Thanks in advance

Best Regards,
Jerry


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



Re: beanutils.populate with formbeans and vectors

2002-12-20 Thread Michael Olszynski
Hi Richard,

thanks a lot for your code. This works also fine with me (I tried that
before) But if you switch from

bean:write name=myObject property=address/
to
html:text name=myObject property=address/

and then submit these values to antoher form, or you change it and submit it
to the same form, I get the beanutils. populate error. The output is always
fine, but the input is a mess.

I hope you also have a solution for this!

Thanks a lot

Michael
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!
- Original Message -
From: Richard Yee [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 10:03 PM
Subject: Re: beanutils.populate with formbeans and vectors


 Michael,
 This code works:

 TestActionForm.java
 ---
 package com.test;

 import java.util.*;
 import org.apache.struts.action.*;

 public class TestActionForm extends ActionForm
 {
   private ArrayList myItems = new ArrayList();
   public TestActionForm()
   {
 myItems.add(new MyObject(John Doe, 1 Main
 St.));
 myItems.add(new MyObject(Jane Doe, 2 Main
 St.));
   }

   public Collection getMyItems() {
 return myItems;
   }

   public void setMyItems(ArrayList items) {
 myItems = items;
   }

   public Object getItem(int index) {
  if (index = myItems.size())
return new MyObject();
  return myItems.get(index);

   }

   /**
* setter for indexed property in myItems
*/
 public void setMyItem(int index, Object value) {
   int size=myItems.size();
   if (index = size) {
 for(int i=size; i=index; i++) {
   myItems.add(new MyObject());
 }
   }
   myItems.set(index,value);
 }
 }

 TestAction.java
 ---
 package com.test;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Vector;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;

 public class TestAction extends Action
 {
   /**
* This is the main action called from the Struts
 framework.
* @param mapping The ActionMapping used to select
 this instance.
* @param form The optional ActionForm bean for this
 request.
* @param request The HTTP Request we are
 processing.
* @param response The HTTP Response we are
 processing.
*/
   public ActionForward perform(ActionMapping mapping,
 ActionForm form, HttpServletRequest request,
 HttpServletResponse response) throws IOException,
 ServletException
   {
 TestActionForm testForm = (TestActionForm) form;
 System.out.println(TestAction.perform());
 return mapping.findForward(success);
   }
 }

 MyObject.java
 -
 package com.test;

 import javax.servlet.http.HttpServletRequest;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.upload.FormFile;

 public class MyObject
 {

   private String name = null;
   private String address = null;

   public MyObject() {
 name = ;
 address = ;
   }

   public MyObject(String _name, String _address)
   {
 name = _name;
 address = _address;
   }

   /**
* getter method for name
*/
   public String getName() {
 return (name);
   }
   /**
* setter method for name
* @param - name;
*/
   public void setName(String _name) {
 name = _name;
   }

   /**
* getter method for address
*/
   public String getAddress() {
 return (address);
   }
   /**
* setter method for address
* @param - address;
*/
   public void setAddress(String _address) {
 address = _address;
   }

   public String toString() {
 return name + ,  + address + /n;
   }
 }



 In the JSP page

 logic:iterate name=testActionForm
 property=myItems id=myObject
 in iterate bean:write name=myObject property=name
 / bean:write name=myObject property=address
 /br
 /logic:iterate

 The output:
 in iterate John Doe 1 Main St.
 in iterate Jane Doe 2 Main St.


 Hope that helps,

 Richard






 --- Michael Olszynski [EMAIL PROTECTED] wrote:
  I do it like this:
 
  logic:iterate id=timeProofList indexId=listIdx
  name=timeProofForm
  property=timeProofList
  tr
td html:text name=timeProofList
  property=fromHour indexed=true/:
 html:text name=timeProofList
  property=fromMinute
  indexed=true/ /td
   /tr
  /logic:iterate
 
  --
  Fehlerfreie Software wirkt weniger komplex und
  diskreditiert damit den
  Entwickler!
  - Original Message -
  From: Richard Yee [EMAIL 

Positioning and naming of resource (.properties) files.

2002-12-20 Thread Simon Kelly
Hi all,

I am currently having a small problem with the placing of .properties files
within the structure of the struts war file created by build.xml.

I have placed my two .properties files (ApplicationResources.properties and
ApplicationResources_de.properties) within the WEB-INF/src/java/resources
directory and built the war file.  This has then placed the two files in the
WEB-INF/Classes/resources directory.

I have also included an init-param entry in web.xml as follows

[code]
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param
[/code]

and have the following lines in my .sjp

[code]
(snip...)
head
html:base/
title
bean:message key=index.title/
/title
/head
(snip...)
[/code]

But I am getting the following error when I access the page.

[error-msg]
javax.servlet.ServletException: Missing message for key index.title
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
at org.apache.jsp.BookView_jsp._jspService(BookView_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
(snip...)
[/error-msg]

Could someone tell me which bit I have written wrong please.

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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




NoClassDefFcoudError whenever i make changes to the config files

2002-12-20 Thread Shashidhar Bhattaram
Hi,

Whenever I make changes to the config files in Jetspeed and restart the
server, the first time I am shown a NoClassDefFoundError It
disappears once I restart the server again. Any idea why this happens?

Regards

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




RE: ValidatorForm

2002-12-20 Thread Shabbir Khadir Mohammed
Hi
Iam ALso getting same type of Error.
Can somebody helpout.

Shabbir

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 7:42 AM
To: Struts Users Mailing List
Subject: ValidatorForm


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

package com.makmal.struts.forms;

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


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


 private String loginName;
 private String passwordValue;

 public LoginForm() {
 }

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

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

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



}



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


**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.

***


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


Trying to get struts working.

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

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

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


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



Re: Trying to get struts working.

2002-12-20 Thread Sangeetha . Nagarjunan

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



   

Peng Tuck Kwok 

pengtuck@makm   To: Struts Users Mailing List 
[EMAIL PROTECTED]
al.net  cc:   

 Subject: Trying to get struts working.

12/20/02 03:39 

PM 

Please respond 

to Struts 

Users Mailing  

List  

   

   





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

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

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


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






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




RE: ValidatorForm

2002-12-20 Thread Sangeetha . Nagarjunan

Hi,
please map your jsp control elements to your bean setter / getter
properties.
Hope  this helps
Thanks
Sangeetha Nagarjunan
IT Solutions India Pvt. Ltd.
Bangalore
080 - 6655122 X 2119



   

Shabbir Khadir

MohammedTo: Struts Users Mailing List 
[EMAIL PROTECTED]  
shabbir.mohammed@   cc:   

wipro.com   Subject: RE: ValidatorForm

   

12/20/02 03:36 PM  

Please respond to  

Struts Users  

Mailing List  

   

   





Hi
Iam ALso getting same type of Error.
Can somebody helpout.

Shabbir

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 7:42 AM
To: Struts Users Mailing List
Subject: ValidatorForm


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

package com.makmal.struts.forms;

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


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


 private String loginName;
 private String passwordValue;

 public LoginForm() {
 }

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

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

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



}



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

(See attached file: Wipro_Disclaimer.txt)--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




Wipro_Disclaimer.txt
Description: Binary data
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Re: Trying to get struts working.

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

[EMAIL PROTECTED] wrote:

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



   
Peng Tuck Kwok 
pengtuck@makm   To: Struts Users Mailing List [EMAIL PROTECTED]
al.net  cc:   
 Subject: Trying to get struts working.
12/20/02 03:39 
PM 
Please respond 
to Struts 
Users Mailing  
List  
   
   




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

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

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


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






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





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




Re: Trying to get struts working.

2002-12-20 Thread Sangeetha . Nagarjunan

eg:
If in your jsp page, name of a control is : .isModified
then in teh Form it should have a :
setIsModified, getIsModified defined
Sangeetha Nagarjunan
IT Solutions India Pvt. Ltd.
Bangalore
080 - 6655122 X 2119



   

Peng Tuck Kwok 

pengtuck@makm   To: Struts Users Mailing List 
[EMAIL PROTECTED]
al.net  cc:   

 Subject: Re: Trying to get struts 
working.
12/20/02 03:58 

PM 

Please respond 

to Struts 

Users Mailing  

List  

   

   





Can you elaborate a bit more on that ? Much appreciated.

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





 Peng Tuck Kwok

 pengtuck@makm   To: Struts Users Mailing
List [EMAIL PROTECTED]
 al.net  cc:

  Subject: Trying to get
struts working.
 12/20/02 03:39

 PM

 Please respond

 to Struts

 Users Mailing

 List









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

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

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


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






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





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






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




Re: beanutils.populate with formbeans and vectors

2002-12-20 Thread Michael Olszynski
Hi Richard

you have following methods in your Action form (see below)

shouldn´t
public Object getItem(int index) {
be called
public Object getMyItems(int index) {

and
 public void setMyItem(int index, Object value) {
be called
 public void setMyItems(int index, Object value) {

?
Are these methods ever called from struts? How are the naming conventions?


Thanks Michael




 TestActionForm.java
 ---
 package com.test;

 import java.util.*;
 import org.apache.struts.action.*;

 public class TestActionForm extends ActionForm
 {
   private ArrayList myItems = new ArrayList();
   public TestActionForm()
   {
 myItems.add(new MyObject(John Doe, 1 Main
 St.));
 myItems.add(new MyObject(Jane Doe, 2 Main
 St.));
   }

   public Collection getMyItems() {
 return myItems;
   }

   public void setMyItems(ArrayList items) {
 myItems = items;
   }

   public Object getItem(int index) {
  if (index = myItems.size())
return new MyObject();
  return myItems.get(index);

   }

   /**
* setter for indexed property in myItems
*/
 public void setMyItem(int index, Object value) {
   int size=myItems.size();
   if (index = size) {
 for(int i=size; i=index; i++) {
   myItems.add(new MyObject());
 }
   }
   myItems.set(index,value);
 }
 }

 TestAction.java
 ---
 package com.test;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Vector;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;

 public class TestAction extends Action
 {
   /**
* This is the main action called from the Struts
 framework.
* @param mapping The ActionMapping used to select
 this instance.
* @param form The optional ActionForm bean for this
 request.
* @param request The HTTP Request we are
 processing.
* @param response The HTTP Response we are
 processing.
*/
   public ActionForward perform(ActionMapping mapping,
 ActionForm form, HttpServletRequest request,
 HttpServletResponse response) throws IOException,
 ServletException
   {
 TestActionForm testForm = (TestActionForm) form;
 System.out.println(TestAction.perform());
 return mapping.findForward(success);
   }
 }

 MyObject.java
 -
 package com.test;

 import javax.servlet.http.HttpServletRequest;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.upload.FormFile;

 public class MyObject
 {

   private String name = null;
   private String address = null;

   public MyObject() {
 name = ;
 address = ;
   }

   public MyObject(String _name, String _address)
   {
 name = _name;
 address = _address;
   }

   /**
* getter method for name
*/
   public String getName() {
 return (name);
   }
   /**
* setter method for name
* @param - name;
*/
   public void setName(String _name) {
 name = _name;
   }

   /**
* getter method for address
*/
   public String getAddress() {
 return (address);
   }
   /**
* setter method for address
* @param - address;
*/
   public void setAddress(String _address) {
 address = _address;
   }

   public String toString() {
 return name + ,  + address + /n;
   }
 }



 In the JSP page

 logic:iterate name=testActionForm
 property=myItems id=myObject
 in iterate bean:write name=myObject property=name
 / bean:write name=myObject property=address
 /br
 /logic:iterate

 The output:
 in iterate John Doe 1 Main St.
 in iterate Jane Doe 2 Main St.


 Hope that helps,

 Richard






 --- Michael Olszynski [EMAIL PROTECTED] wrote:
  I do it like this:
 
  logic:iterate id=timeProofList indexId=listIdx
  name=timeProofForm
  property=timeProofList
  tr
td html:text name=timeProofList
  property=fromHour indexed=true/:
 html:text name=timeProofList
  property=fromMinute
  indexed=true/ /td
   /tr
  /logic:iterate
 
  --
  Fehlerfreie Software wirkt weniger komplex und
  diskreditiert damit den
  Entwickler!
  - Original Message -
  From: Richard Yee [EMAIL PROTECTED]
  To: Struts Users Mailing List
  [EMAIL PROTECTED]
  Sent: Thursday, December 19, 2002 7:16 PM
  Subject: Re: beanutils.populate with formbeans and
  vectors
 
 
   Michael,
   How are you accessing the indexed property in the
  JSP?
  
   -Richard
  
   --- Michael Olszynski [EMAIL PROTECTED]
  wrote:
Hi Richard,
   
thanks again for your quick reply. I thought I
  

Error : Cannot find message resources

2002-12-20 Thread amit kaushik
hi everybody,i am new to struts created a multilingual application and maintained 
to different properties file in /WEB-INF/classes folder names test.properties and 
test_de.properties.when i am using the properties file through struts it's showing me 
the following error.My JSP code is..%@ page language=java %%@ taglib 
uri=/WEB-INF/struts-bean.tld prefix=bean%%@ taglib 
uri=/WEB-INF/struts-html.tld prefix=html%%@ taglib 
uri=/WEB-INF/struts-logic.tld prefix=logic%html:html 
locale=trueheadhtml:base/title bean:message key=index.title / 
/titleheadbody bgcolor=whiteh2 align=center Amit Kaushik 
/h2/body/html:htmlPlease suggest any solution  Any help would be 
appreciated.Error is . 
org.apache.jasper.JasperException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)



velocity vs strust

2002-12-20 Thread Cédric Linez
Hello,

Can I include a file in jsp with struts like velocity with #include or #parse ?


---
Cédric LINEZ 
SYSTEM PLUS - 9 rue Alfred KASTLER
44307 NANTES 



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




RE: Error : Cannot find message resources

2002-12-20 Thread Arnaud HERITIER
Do you use struts 1.0 or 1.1 ??

Did you define a message-ressources in the struts XML config file ???

You should declare something like :

message-resources parameter=test null=false /


Arnaud

 -Message d'origine-
 De : amit kaushik [mailto:[EMAIL PROTECTED]]
 Envoyé : vendredi 20 décembre 2002 11:25
 À : struts
 Objet : Error : Cannot find message resources


 hi everybody,i am new to struts created a multilingual
 application and maintained to different properties file in
 /WEB-INF/classes folder names test.properties and
 test_de.properties.when i am using the properties file
 through struts it's showing me the following error.My JSP
 code is..%@ page language=java %%@ taglib
 uri=/WEB-INF/struts-bean.tld prefix=bean%%@ taglib
 uri=/WEB-INF/struts-html.tld prefix=html%%@ taglib
 uri=/WEB-INF/struts-logic.tld prefix=logic%html:html
 locale=trueheadhtml:base/title bean:message
 key=index.title / /titleheadbody bgcolor=whiteh2
 align=center Amit Kaushik /h2/body/html:htmlPlease
 suggest any solution  Any help would be
 appreciated.Error is .
 org.apache.jasper.JasperException: Cannot find message
 resources under key org.apache.struts.action.MESSAGE
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:248)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:289)
   at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.java:260)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardC
 ontextValve.java:191)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
 org.apache.catalina.core.StandardContext.invoke(StandardContex
 t.java:2396)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHost
 Valve.java:180)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643)
   at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
 spatcherValve.java:170)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:641)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
 Valve.java:172)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:641)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
 gineValve.java:174)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValv
 eContext.invokeNext(StandardPipeline.java:643)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
 org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
 java:223)
   at
 org.apache.coyote.http11.Http11Processor.process(Http11Process
 or.java:405)
   at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
 r.processConnection(Http11Protocol.java:380)
   at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
 nt.java:508)
   at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
 ThreadPool.java:533)
   at java.lang.Thread.run(Thread.java:536)



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




RE: velocity vs strust

2002-12-20 Thread Arnaud HERITIER
Not only with Struts but in JSP in general you can use :

jsp:include ...

or

%@ include ...

ref : http://java.sun.com/products/jsp/download.html#specs

Arnaud

 -Message d'origine-
 De : Cédric Linez [mailto:[EMAIL PROTECTED]]
 Envoyé : vendredi 20 décembre 2002 12:08
 À : Struts mailing list
 Objet : velocity vs strust


 Hello,

 Can I include a file in jsp with struts like velocity with
 #include or #parse ?


 ---
 Cédric LINEZ
 SYSTEM PLUS - 9 rue Alfred KASTLER
 44307 NANTES



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



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




Re: Error : Cannot find message resources

2002-12-20 Thread amit kaushik
hi,

got the error..

thanks
Amit Kaushik


- Original Message -
From: Arnaud HERITIER [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 4:47 PM
Subject: RE: Error : Cannot find message resources


 Do you use struts 1.0 or 1.1 ??

 Did you define a message-ressources in the struts XML config file ???

 You should declare something like :

 message-resources parameter=test null=false /


 Arnaud

  -Message d'origine-
  De : amit kaushik [mailto:[EMAIL PROTECTED]]
  Envoyé : vendredi 20 décembre 2002 11:25
  À : struts
  Objet : Error : Cannot find message resources
 
 
  hi everybody,i am new to struts created a multilingual
  application and maintained to different properties file in
  /WEB-INF/classes folder names test.properties and
  test_de.properties.when i am using the properties file
  through struts it's showing me the following error.My JSP
  code is..%@ page language=java %%@ taglib
  uri=/WEB-INF/struts-bean.tld prefix=bean%%@ taglib
  uri=/WEB-INF/struts-html.tld prefix=html%%@ taglib
  uri=/WEB-INF/struts-logic.tld prefix=logic%html:html
  locale=trueheadhtml:base/title bean:message
  key=index.title / /titleheadbody bgcolor=whiteh2
  align=center Amit Kaushik /h2/body/html:htmlPlease
  suggest any solution  Any help would be
  appreciated.Error is .
  org.apache.jasper.JasperException: Cannot find message
  resources under key org.apache.struts.action.MESSAGE
  at
  org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  Wrapper.java:248)
  at
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  .java:289)
  at
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(ApplicationFilterChain.java:247)
  at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterChain.java:193)
  at
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
  rapperValve.java:260)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:643)
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:480)
  at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
  org.apache.catalina.core.StandardContextValve.invoke(StandardC
  ontextValve.java:191)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:643)
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:480)
  at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
  org.apache.catalina.core.StandardContext.invoke(StandardContex
  t.java:2396)
  at
  org.apache.catalina.core.StandardHostValve.invoke(StandardHost
  Valve.java:180)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:643)
  at
  org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
  spatcherValve.java:170)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:641)
  at
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
  Valve.java:172)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:641)
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:480)
  at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
  gineValve.java:174)
  at
  org.apache.catalina.core.StandardPipeline$StandardPipelineValv
  eContext.invokeNext(StandardPipeline.java:643)
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:480)
  at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
  org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
  java:223)
  at
  org.apache.coyote.http11.Http11Processor.process(Http11Process
  or.java:405)
  at
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
  r.processConnection(Http11Protocol.java:380)
  at
  org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
  nt.java:508)
  at
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
  ThreadPool.java:533)
  at java.lang.Thread.run(Thread.java:536)
 


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




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




Re: Compliment Frameworks

2002-12-20 Thread V. Cekvenich


ROSSEL Olivier wrote:

O/R is not always needed. Sometimes you just want to work with a 
relational master/detail (ie, next row(); next row();).


My concern is not to have to think in term of (for example) 
Primary Key/Foreign Key or Conposite Key...

Sometimes the business requirements are that you have a master detail ( 
a 2 dimensional array in O/R), or a many to many.
RowSet.next() can be easily overridden.
Relational algebra can explain some business easily, that O/R can't.

In general, to write a good db application, one needs to know the db.
.V


This is too much low level for me. And some programmers I talk
to really don't care about my DB model. 

That's why I am looking for tools that provide an abstract layer between
DB and business objects worlds.

I think O/R is exactly that. 
I don't see exactly what JDO is. An API by Sun for those kind of
problems?

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




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




no getter method exception

2002-12-20 Thread Michael Olszynski
Hi I get a no getter method exception (stackTrace below)

But I do have the getter method!!!



This is my Formbean:

public class TimeProofFormBean extends ActionForm {

   private Vector timeProofList = new Vector();

  public Vector getTimeProofList() {
 System.out.println(getTimeProofList());
return this.timeProofList;
}

public void setTimeProofList( Vector v ) {
System.out.println(setTimeProofList( Vector v ));
this.timeProofList = v;
}

   // getter for indexed property 

  public Object getTimeProofList(int index) {
  System.out.println(public Object getTimeProofList(int index) +index);
 if (index = timeProofList.size())
   return new TimeProofTableBean();
 return timeProofList.get(index);
   }


// setter for indexed property 

   public void setTimeProofList(int index,  Object value) {
 System.out.println(setTimeProofList(int index, Object value) );
 int size=timeProofList.size();
 if (index = size) {
   for(int i=size; i=index; i++) {
 timeProofList.add(new TimeProofTableBean());
   }
 }
 timeProofList.set(index,value);
   }

}


13:06:10,823 ERROR [Engine] ApplicationDispatcher[/Zeiterfassung_Applikation] Se
rvlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: No getter method for property timeProofList o
f bean timeProofForm
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
ispatcher.java:575)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
patcher.java:498)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
.java:820)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
a:395)
at org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:191)
at org.apache.jsp.template_jsp._jspx_meth_template_get_4(template_jsp.ja
va:221)
at org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:
118)
at org.apache.jsp.template_jsp._jspService(template_jsp.java:62)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den Entwickler!


RE: no getter method exception

2002-12-20 Thread Andrew Hill
Ah think I see your problem. Its not that you dont have a getter, its that
you have too many!
The bean introspection stuff gets funny about multiple getters and setters
and often refuses to recognise the property :-(

Afaik multiple getters and setters is agaisnt the JavaBean spec. If you ask
me the spec is a damn pain in this regard, but thats the way it is.

-Original Message-
From: Michael Olszynski [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 20:13
To: 'Struts Users Mailing List'
Subject: no getter method exception


Hi I get a no getter method exception (stackTrace below)

But I do have the getter method!!!



This is my Formbean:

public class TimeProofFormBean extends ActionForm {

   private Vector timeProofList = new Vector();

  public Vector getTimeProofList() {
 System.out.println(getTimeProofList());
return this.timeProofList;
}

public void setTimeProofList( Vector v ) {
System.out.println(setTimeProofList( Vector v ));
this.timeProofList = v;
}

   // getter for indexed property

  public Object getTimeProofList(int index) {
  System.out.println(public Object getTimeProofList(int index) +index);
 if (index = timeProofList.size())
   return new TimeProofTableBean();
 return timeProofList.get(index);
   }


// setter for indexed property

   public void setTimeProofList(int index,  Object value) {
 System.out.println(setTimeProofList(int index, Object value) );
 int size=timeProofList.size();
 if (index = size) {
   for(int i=size; i=index; i++) {
 timeProofList.add(new TimeProofTableBean());
   }
 }
 timeProofList.set(index,value);
   }

}


13:06:10,823 ERROR [Engine]
ApplicationDispatcher[/Zeiterfassung_Applikation] Se
rvlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: No getter method for property
timeProofList o
f bean timeProofForm
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
ispatcher.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
patcher.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
.java:820)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
a:395)
at
org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:191)
at
org.apache.jsp.template_jsp._jspx_meth_template_get_4(template_jsp.ja
va:221)
at
org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:
118)
at org.apache.jsp.template_jsp._jspService(template_jsp.java:62)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!


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




RE: no getter method exception

2002-12-20 Thread Andrew Hill
(Multiple getters and setters for the same property name I mean)

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 20:22
To: Struts Users Mailing List
Subject: RE: no getter method exception


Ah think I see your problem. Its not that you dont have a getter, its that
you have too many!
The bean introspection stuff gets funny about multiple getters and setters
and often refuses to recognise the property :-(

Afaik multiple getters and setters is agaisnt the JavaBean spec. If you ask
me the spec is a damn pain in this regard, but thats the way it is.

-Original Message-
From: Michael Olszynski [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 20:13
To: 'Struts Users Mailing List'
Subject: no getter method exception


Hi I get a no getter method exception (stackTrace below)

But I do have the getter method!!!



This is my Formbean:

public class TimeProofFormBean extends ActionForm {

   private Vector timeProofList = new Vector();

  public Vector getTimeProofList() {
 System.out.println(getTimeProofList());
return this.timeProofList;
}

public void setTimeProofList( Vector v ) {
System.out.println(setTimeProofList( Vector v ));
this.timeProofList = v;
}

   // getter for indexed property

  public Object getTimeProofList(int index) {
  System.out.println(public Object getTimeProofList(int index) +index);
 if (index = timeProofList.size())
   return new TimeProofTableBean();
 return timeProofList.get(index);
   }


// setter for indexed property

   public void setTimeProofList(int index,  Object value) {
 System.out.println(setTimeProofList(int index, Object value) );
 int size=timeProofList.size();
 if (index = size) {
   for(int i=size; i=index; i++) {
 timeProofList.add(new TimeProofTableBean());
   }
 }
 timeProofList.set(index,value);
   }

}


13:06:10,823 ERROR [Engine]
ApplicationDispatcher[/Zeiterfassung_Applikation] Se
rvlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: No getter method for property
timeProofList o
f bean timeProofForm
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
ispatcher.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
patcher.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
.java:820)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
a:395)
at
org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:191)
at
org.apache.jsp.template_jsp._jspx_meth_template_get_4(template_jsp.ja
va:221)
at
org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:
118)
at org.apache.jsp.template_jsp._jspService(template_jsp.java:62)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
89)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!


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


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




Re: no getter method exception

2002-12-20 Thread Michael Olszynski
But how shall I make indexed getters and setters? A lot of guys told me that
I do have to make indexed getters and setters in my formbean, otherwise I
get an indexoutofboundsexception. (See my last 5 posts on benutils.populate)

Do you have any idea how to solve this problem?

Thanks a lot Michael
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!
- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 1:22 PM
Subject: RE: no getter method exception


 Ah think I see your problem. Its not that you dont have a getter, its that
 you have too many!
 The bean introspection stuff gets funny about multiple getters and setters
 and often refuses to recognise the property :-(

 Afaik multiple getters and setters is agaisnt the JavaBean spec. If you
ask
 me the spec is a damn pain in this regard, but thats the way it is.

 -Original Message-
 From: Michael Olszynski [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 20:13
 To: 'Struts Users Mailing List'
 Subject: no getter method exception


 Hi I get a no getter method exception (stackTrace below)

 But I do have the getter method!!!



 This is my Formbean:

 public class TimeProofFormBean extends ActionForm {

private Vector timeProofList = new Vector();

   public Vector getTimeProofList() {
  System.out.println(getTimeProofList());
 return this.timeProofList;
 }

 public void setTimeProofList( Vector v ) {
 System.out.println(setTimeProofList( Vector v ));
 this.timeProofList = v;
 }

// getter for indexed property

   public Object getTimeProofList(int index) {
   System.out.println(public Object getTimeProofList(int index) +index);
  if (index = timeProofList.size())
return new TimeProofTableBean();
  return timeProofList.get(index);
}


 // setter for indexed property

public void setTimeProofList(int index,  Object value) {
  System.out.println(setTimeProofList(int index, Object value) );
  int size=timeProofList.size();
  if (index = size) {
for(int i=size; i=index; i++) {
  timeProofList.add(new TimeProofTableBean());
}
  }
  timeProofList.set(index,value);
}

 }


 13:06:10,823 ERROR [Engine]
 ApplicationDispatcher[/Zeiterfassung_Applikation] Se
 rvlet.service() for servlet jsp threw exception
 org.apache.jasper.JasperException: No getter method for property
 timeProofList o
 f bean timeProofForm
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
 .java:248)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
 89)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
 atcher.java:684)
 at
 org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
 ispatcher.java:575)
 at
 org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
 patcher.java:498)
 at
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
 .java:820)
 at
 org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
 a:395)
 at
 org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:191)
 at
 org.apache.jsp.template_jsp._jspx_meth_template_get_4(template_jsp.ja
 va:221)
 at
 org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:
 118)
 at org.apache.jsp.template_jsp._jspService(template_jsp.java:62)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
 .java:204)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
 89)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
 atcher.java:684)
 --
 Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
 Entwickler!


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




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




Error messages for JavaScript validation

2002-12-20 Thread Laurent Vanzeune

When using client-side validation (JavaScript) with multiple Struts
sub-applications, the error messages are not found in the message resource
file of the sub-application. It works when I add these messages in the
message resources file of the main application.

Any idea?

Thanks,
Laurent.


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




Re: Workflow Extension Goes Back a Page Problem

2002-12-20 Thread Matthias Bauer
Hi Jerry,

consider the slightly modified configuration taken from the test 
application shipped with the workflow extension, I attached below: It 
defines a sequence of actions like that:

-- beginWf1Transition --  State=1 -- wf1St2Transition-- State=2 
--wf1St3Transition-- State=3 --endWf1Transition--

the action wf1St3BackToSt2 allows to go back from State 3 to State 2.

  action path=/beginWf1Transition
  type=com.livinglogic.struts.workflow.test.Wf1Action
set-property property=authtype 
value=com.livinglogic.struts.workflow.test.Authentication /
set-property property=primaryWorkflow value=wf1 /
set-property property=newState value=1 /
set-property property=nextState value=2 /
forward name=success path=/inHome.jspp /
  /action

  action path=/wf1St2Transition
  type=com.livinglogic.struts.workflow.test.Wf1Action
set-property property=authtype 
value=com.livinglogic.struts.workflow.test.Authentication /
set-property property=primaryWorkflow value=wf1 /
set-property property=prevState value=1 /
set-property property=newState value=2 /
set-property property=nextState value=3 /
forward name=success path=/inHome.jspp /
  /action

  action path=/wf1St3Transition
  type=com.livinglogic.struts.workflow.test.Wf1Action
set-property property=authtype 
value=com.livinglogic.struts.workflow.test.Authentication /
set-property property=primaryWorkflow value=wf1 /
set-property property=prevState value=2 /
set-property property=newState value=3 /
set-property property=nextState value=0 /
set-property property=nextState value=2 /
forward name=success path=/inHome.jspp /
  /action

  action path=/endWf1Transition
  type=com.livinglogic.struts.workflow.test.Wf1Action
set-property property=authtype 
value=com.livinglogic.struts.workflow.test.Authentication /
set-property property=primaryWorkflow value=wf1 /
set-property property=prevState value=3 /
set-property property=newState value=0 /
set-property property=endWorkflow value=true /
forward name=success path=/inHome.jspp /
  /action


  action path=/wf1St3BackToSt2
  type=com.livinglogic.struts.workflow.test.Wf1Action
set-property property=authtype 
value=com.livinglogic.struts.workflow.test.Authentication /
set-property property=primaryWorkflow value=wf1 /
set-property property=prevState value=3 /
set-property property=newState value=2 /
set-property property=nextState value=3 /
forward name=success path=/inHome.jspp /
  /action



Hope that helps,

--- Matthias


Jerry Yu wrote:


Hi, I am trying to use Matthias' workflow extension in my webApp. One 
problem I have is anyone did anything that can let the user goes back 
a page?  I tried to put a GoBack button on my apps and set the state 
of it. But seems, it won't let me pass it.  Does anyone have any idea 
how to do this?  Thanks in advance

Best Regards,
Jerry


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





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




RE: [Announce / help] STRUTS - Help needed on open source project

2002-12-20 Thread James Mitchell
So what exactly do you want?  Free labor?


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Harshal D [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 3:40 AM
 To: Struts Users Mailing List
 Subject: [Announce / help] STRUTS - Help needed on open 
 source project 
 
 
 
 THIS IS NOT A TECHNICAL QUESTION.
 
  
 
 Hello,
 
  
 
 I am a contributor to www.theopenstack.com
 
  
 
 We are trying to simplify  promote use of open source 
 technology in building 'enterprise application'. The goal is 
 to pre-define a stack and demonstrate the use of open source 
 technologies for enterprise applications. We will be 
 demonstrating how to build the same example application, 
 step-by-step, by adding features such as DB access, caching, 
 ERP integration, Service oriented architecture support  
 Collaboration. 
 
  
 
 We are a bunch of business tier application developers and 
 seriously lack STRUTS skills. We really need contributors in 
 this area.
 
  
 
 Please check out the website, about us  projects links to 
 explore further if you are interested.
 
  
 
  Thanks
 
  
 
 Harshal
 
 
 
 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now
 


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




How does LookupDispatchAction lookup.

2002-12-20 Thread ROSSEL Olivier
I want to use LookupDispatchAction.
Reading one of Ted's tips, it seems that the value returned by my
submit buttons MUST be stored in a .properties file, and looked up
inside my JSP:

html:submit property=submit
 bean:message key=button.add/
/html:submit

There's no way to have a hard-coded value? or a value
coming from somewhere else?
Then how do I code the getKeyMethodMap?

I would have liked to return such a map:
 Add Item = add
Delete Item = delete

Is it possible?



---cut here---


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

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




RE: Trying to get struts working.

2002-12-20 Thread Hurdle, Robert H, PERSCOM
I had a similar problem.  I believe it was due to not referencing the
getter/setter form correctly in the jsp or validation.xml file.  The chapter
in Struts in Action on validation was very helpful - its available at
http://www.manning.com/getpage.html?project=hustedfilename=chapters.html
(chap 12).

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 5:36 AM
To: Struts Users Mailing List
Subject: Re: Trying to get struts working.



eg:
If in your jsp page, name of a control is : .isModified
then in teh Form it should have a :
setIsModified, getIsModified defined
Sangeetha Nagarjunan
IT Solutions India Pvt. Ltd.
Bangalore
080 - 6655122 X 2119



 

Peng Tuck Kwok

pengtuck@makm   To: Struts Users Mailing List
[EMAIL PROTECTED]
al.net  cc:

 Subject: Re: Trying to get
struts working.
12/20/02 03:58

PM

Please respond

to Struts

Users Mailing

List

 

 





Can you elaborate a bit more on that ? Much appreciated.

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





 Peng Tuck Kwok

 pengtuck@makm   To: Struts Users Mailing
List [EMAIL PROTECTED]
 al.net  cc:

  Subject: Trying to get
struts working.
 12/20/02 03:39

 PM

 Please respond

 to Struts

 Users Mailing

 List









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

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

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


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






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





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






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




RE: [Announce / help] STRUTS - Help needed on open source project

2002-12-20 Thread Micael
Are there complimentary sampans?

At 09:13 AM 12/20/02 -0500, you wrote:

So what exactly do you want?  Free labor?


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg.
- Bjarne Stroustrup


 -Original Message-
 From: Harshal D [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 3:40 AM
 To: Struts Users Mailing List
 Subject: [Announce / help] STRUTS - Help needed on open
 source project



 THIS IS NOT A TECHNICAL QUESTION.



 Hello,



 I am a contributor to www.theopenstack.com



 We are trying to simplify  promote use of open source
 technology in building 'enterprise application'. The goal is
 to pre-define a stack and demonstrate the use of open source
 technologies for enterprise applications. We will be
 demonstrating how to build the same example application,
 step-by-step, by adding features such as DB access, caching,
 ERP integration, Service oriented architecture support 
 Collaboration.



 We are a bunch of business tier application developers and
 seriously lack STRUTS skills. We really need contributors in
 this area.



 Please check out the website, about us  projects links to
 explore further if you are interested.



  Thanks



 Harshal



 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now



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




LEGAL NOTICE

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


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



RE: html:select woes

2002-12-20 Thread John . E . Gregg
I see now that my opening form tag ended with a /.  Duh.  What a
difference a day makes.

thanks

john

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 5:55 PM
To: Struts Users Mailing List
Subject: RE: html:select woes


You need to have an html:form element.  It needs to encapsulate your
select and submit elements.  It needs to specify your action path. Look
at the struts-exercise-taglib and numerous other examples for building a
form with form elements.

 -Original Message-
 From: [EMAIL PROTECTED]
 
 Hi all,
 
 I'm trying to figure out how to use the html:select tag and am having 
 no luck.  When I execute the jsp, I'm getting Cannot find bean
 under name
 org.apache.struts.taglib.html.BEAN.  I've looked at the docs and the
 html-select.jsp example but can't see what's different about 
 my case.  My
 struts-config file has this:
 
 form-bean name=loggersForm type=com.wfsc.cam.ui.LoggersForm/
 
 and this:
 
 action path=/loggers 
 type=com.wfsc.cam.actions.HelloAction 
 name=loggersForm 
 input=/jsp/loggers.jsp 
 validate=false
 scope=session
   forward name=hello path=/jsp/loggers.jsp/
 /action
 
 I've tried with and without the input attr.  My LoggersForm class 
 extends ActionForm and has one String property called newLevel
 that's null by
 default.  I also have a reset() method that nulls-out 
 newLevel.  My jsp does
 this:
 
 html:html
 jsp:useBean id=loggersForm scope=session
 class=com.wfsc.cam.ui.LoggersForm/html:form action=/loggers.do/ 
 html:select property=newLevel html:option 
 value=oneOne/html:option /html:select
 html:submitSubmit/html:select
 /html:html
 
 The only relevant difference I can see between this and the 
 html-select.jsp example is that my jsp is under /jsp, but I've tried 
 it both ways and it
 doesn't seem to matter.
 
 I'd appreciate a clue.
 
 thanks
 
 john

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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread Wendy Smoak
 I want to use LookupDispatchAction.
 Reading one of Ted's tips, it seems that the value returned by my
 submit buttons MUST be stored in a .properties file, and looked up
 inside my JSP:
 html:submit property=submit
  bean:message key=button.add/
 /html:submit
 There's no way to have a hard-coded value? or a value
 coming from somewhere else?
 Then how do I code the getKeyMethodMap?
 I would have liked to return such a map:
  Add Item = add
 Delete Item = delete
 Is it possible?

I don't know if you can get around the .properties file; it's an integral
part of using Struts.  As to how to do the getKeyMethodMap method, here's
mine:

 protected Map getKeyMethodMap()
   {
  Map map = new HashMap();
  map.put( button.add.prospect, addProspect );
  map.put( button.delete.prospect, deleteProspect );
  // ... more map.put's deleted to save space
  return map;
   }

button.add.prospect is in the .properties file, and addProspect is the name
of the method to call.

If there's any chance of this action being called *without* the parameter
you've specified, you might want to override the execute method and provide
a default behavior:

 public ActionForward execute( ... ) {
  if ( request.getParameter( mapping.getParameter() ) == null ) {
return ( mapping.findForward( failure ) );
  }
  } else {
 //parameter is present, let LookupDispatchAction do its thing:
 return super.execute( mapping, form, request, response );
  }
 }

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



RE: How does LookupDispatchAction lookup.

2002-12-20 Thread James Mitchell
I think you are missing the point of what LookupDispatchAction is about.
It solves a specific problem with i18n'd button labels.

It sounds like you might be more interested in DispatchAction.


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 9:28 AM
 To: '[EMAIL PROTECTED]'
 Subject: How does LookupDispatchAction lookup.
 
 
 I want to use LookupDispatchAction.
 Reading one of Ted's tips, it seems that the value returned 
 by my submit buttons MUST be stored in a .properties file, 
 and looked up inside my JSP:
 
 html:submit property=submit
  bean:message key=button.add/
 /html:submit
 
 There's no way to have a hard-coded value? or a value
 coming from somewhere else?
 Then how do I code the getKeyMethodMap?
 
 I would have liked to return such a map:
  Add Item = add
 Delete Item = delete
 
 Is it possible?
 
 
 
 ---cut here---
 
 
 This e-mail is intended only for the above addressee. It may 
 contain privileged information. If you are not the addressee 
 you must not copy, distribute, disclose or use any of the 
 information in it. If you have received it in error please 
 delete it and immediately notify the sender. Security Notice: 
 all e-mail, sent to or from this address, may be accessed by 
 someone other than the recipient, for system management and 
 security reasons. This access is controlled under Regulation 
 of Investigatory Powers Act 2000, Lawful Business Practises.
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




question about the internationalization

2002-12-20 Thread Tom

Is it true that the Struts framework only facilitate
internationalization with Unicode or UTF8 encoding
method? In other words, it is not possible to use
different encoding methods for different locales.
For example of the locale and encoding pairs

en_US iso8859_1
eniso8859_1
zh_TW BIG5
zh_HK BIG5
zhBIG5
zh_CN GB2312

Regards,
Tom


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

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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread Alvarado, Juan (c)
take a look at this posting. It explains to you how it works.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51209.html

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 9:28 AM
To: '[EMAIL PROTECTED]'
Subject: How does LookupDispatchAction lookup.


I want to use LookupDispatchAction.
Reading one of Ted's tips, it seems that the value returned by my
submit buttons MUST be stored in a .properties file, and looked up
inside my JSP:

html:submit property=submit
 bean:message key=button.add/
/html:submit

There's no way to have a hard-coded value? or a value
coming from somewhere else?
Then how do I code the getKeyMethodMap?

I would have liked to return such a map:
 Add Item = add
Delete Item = delete

Is it possible?



---cut here---


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

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




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




RE: beanutils.populate with formbeans and vectors

2002-12-20 Thread Yee, Richard K,,DMDCWEST
No, they need to be different. The getMyItem(int index) and setItems(int
index, Object obj) could be named anything ie. getFoo(int index) etc.
See
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on_form_classes

Regards,

Richard


 -Original Message-
 From: Michael Olszynski [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 2:24 AM
 To:   Struts Users Mailing List
 Subject:  Re: beanutils.populate with formbeans and vectors
 
 Hi Richard
 
 you have following methods in your Action form (see below)
 
 shouldn´t
 public Object getItem(int index) {
 be called
 public Object getMyItems(int index) {
 
 and
  public void setMyItem(int index, Object value) {
 be called
  public void setMyItems(int index, Object value) {
 
 ?
 Are these methods ever called from struts? How are the naming conventions?
 
 
 Thanks Michael
 
 
 
 
  TestActionForm.java
  ---
  package com.test;
 
  import java.util.*;
  import org.apache.struts.action.*;
 
  public class TestActionForm extends ActionForm
  {
private ArrayList myItems = new ArrayList();
public TestActionForm()
{
  myItems.add(new MyObject(John Doe, 1 Main
  St.));
  myItems.add(new MyObject(Jane Doe, 2 Main
  St.));
}
 
public Collection getMyItems() {
  return myItems;
}
 
public void setMyItems(ArrayList items) {
  myItems = items;
}
 
public Object getItem(int index) {
   if (index = myItems.size())
 return new MyObject();
   return myItems.get(index);
 
}
 
/**
 * setter for indexed property in myItems
 */
  public void setMyItem(int index, Object value) {
int size=myItems.size();
if (index = size) {
  for(int i=size; i=index; i++) {
myItems.add(new MyObject());
  }
}
myItems.set(index,value);
  }
  }
 
  TestAction.java
  ---
  package com.test;
  import org.apache.struts.action.Action;
  import org.apache.struts.action.ActionForm;
  import org.apache.struts.action.ActionForward;
  import org.apache.struts.action.ActionMapping;
  import org.apache.struts.action.ActionError;
  import org.apache.struts.action.ActionErrors;
  import java.io.IOException;
  import java.util.Collection;
  import java.util.Vector;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
 
  public class TestAction extends Action
  {
/**
 * This is the main action called from the Struts
  framework.
 * @param mapping The ActionMapping used to select
  this instance.
 * @param form The optional ActionForm bean for this
  request.
 * @param request The HTTP Request we are
  processing.
 * @param response The HTTP Response we are
  processing.
 */
public ActionForward perform(ActionMapping mapping,
  ActionForm form, HttpServletRequest request,
  HttpServletResponse response) throws IOException,
  ServletException
{
  TestActionForm testForm = (TestActionForm) form;
  System.out.println(TestAction.perform());
  return mapping.findForward(success);
}
  }
 
  MyObject.java
  -
  package com.test;
 
  import javax.servlet.http.HttpServletRequest;
  import org.apache.struts.action.ActionForm;
  import org.apache.struts.action.ActionError;
  import org.apache.struts.action.ActionErrors;
  import org.apache.struts.action.ActionMapping;
  import org.apache.struts.upload.FormFile;
 
  public class MyObject
  {
 
private String name = null;
private String address = null;
 
public MyObject() {
  name = ;
  address = ;
}
 
public MyObject(String _name, String _address)
{
  name = _name;
  address = _address;
}
 
/**
 * getter method for name
 */
public String getName() {
  return (name);
}
/**
 * setter method for name
 * @param - name;
 */
public void setName(String _name) {
  name = _name;
}
 
/**
 * getter method for address
 */
public String getAddress() {
  return (address);
}
/**
 * setter method for address
 * @param - address;
 */
public void setAddress(String _address) {
  address = _address;
}
 
public String toString() {
  return name + ,  + address + /n;
}
  }
 
 
 
  In the JSP page
 
  logic:iterate name=testActionForm
  property=myItems id=myObject
  in iterate bean:write name=myObject property=name
  / bean:write name=myObject property=address
  /br
  /logic:iterate
 
  The output:
  in iterate John Doe 1 Main St.
  in iterate Jane Doe 2 Main St.
 
 
  Hope that helps,
 
  Richard
 
 
 
 
 
 
  --- Michael Olszynski [EMAIL PROTECTED] wrote:
   I do it like this:
  
   logic:iterate id=timeProofList indexId=listIdx
   name=timeProofForm
   property=timeProofList
   tr
 td html:text name=timeProofList

RE: How does LookupDispatchAction lookup.

2002-12-20 Thread ROSSEL Olivier
 I think you are missing the point of what 
 LookupDispatchAction is about.
 It solves a specific problem with i18n'd button labels.
 
 It sounds like you might be more interested in DispatchAction.

Ted says that JavaScript is needed  with Dispatch Action.
My problem with DispatchAction is that the name of the
java method IS the value of a request parameter.
At the moment, the only parameter I can use is the one
of the submit button clicked by the user. And the value
of that submit contains whitespaces.


So is there a solution?
Am i stuck with LookupDispatchAction and .properties ?

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

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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread Alvarado, Juan (c)
I have had the same issues you are having, and I just went with
LookupDispatchAction. I'm not 100% sure if the way I do my apps is the 100%
correct way, but what I do is for any button that has white space as its
value, I store a key in my ApplicationResources.properties and use that key
in conjunction with LookupDispatchAction.

I like the LookupDispatchAction because I avoid having to use javascript on
my client.

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:45 AM
To: 'Struts Users Mailing List'
Subject: RE: How does LookupDispatchAction lookup.


 I think you are missing the point of what 
 LookupDispatchAction is about.
 It solves a specific problem with i18n'd button labels.
 
 It sounds like you might be more interested in DispatchAction.

Ted says that JavaScript is needed  with Dispatch Action.
My problem with DispatchAction is that the name of the
java method IS the value of a request parameter.
At the moment, the only parameter I can use is the one
of the submit button clicked by the user. And the value
of that submit contains whitespaces.


So is there a solution?
Am i stuck with LookupDispatchAction and .properties ?

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

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




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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread James Mitchell
I agree with Juan.  Although you will want to weigh your options,
especially if you have rather large resource bundle(s).



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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 10:57 AM
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.
 
 
 I have had the same issues you are having, and I just went 
 with LookupDispatchAction. I'm not 100% sure if the way I do 
 my apps is the 100% correct way, but what I do is for any 
 button that has white space as its value, I store a key in my 
 ApplicationResources.properties and use that key in 
 conjunction with LookupDispatchAction.
 
 I like the LookupDispatchAction because I avoid having to use 
 javascript on my client.
 
 -Original Message-
 From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 10:45 AM
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.
 
 
  I think you are missing the point of what
  LookupDispatchAction is about.
  It solves a specific problem with i18n'd button labels.
  
  It sounds like you might be more interested in DispatchAction.
 
 Ted says that JavaScript is needed  with Dispatch Action.
 My problem with DispatchAction is that the name of the
 java method IS the value of a request parameter.
 At the moment, the only parameter I can use is the one
 of the submit button clicked by the user. And the value
 of that submit contains whitespaces.
 
 
 So is there a solution?
 Am i stuck with LookupDispatchAction and .properties ?
 
 This e-mail is intended only for the above addressee. It may 
 contain privileged information. If you are not the addressee 
 you must not copy, distribute, disclose or use any of the 
 information in it. If you have received it in error please 
 delete it and immediately notify the sender. Security Notice: 
 all e-mail, sent to or from this address, may be accessed by 
 someone other than the recipient, for system management and 
 security reasons. This access is controlled under Regulation 
 of Investigatory Powers Act 2000, Lawful Business Practises.
 
 --
 To unsubscribe, e-mail: 
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Struts 1.0.2 ActionForm checkbox question

2002-12-20 Thread Jim Coble
I'm using Struts 1.0.2 with Tomcat 4.1.12.  I have an ActionForm with a 
checkbox whose default value I would like to be on.  I accomplished that 
by initializing the underlying bean property to true.  However, I am 
having trouble detecting if the box is unchecked when the form is 
submitted.

In the Struts documentation for the HTML taglib, in the section on 
checkbox (http://jakarta.apache.org/struts/struts-html.html#checkbox), I 
read the following:
WARNING: In order to correctly recognize unchecked checkboxes, the 
ActionForm bean associated with this form must include a statement setting 
the corresponding boolean property to false in the reset() method.

So, I do that; i.e.,
public void reset( ActionMapping mapping, HttpServletRequest request )
{
this.contactInstructor = false;
}
Now I can detect when the box is unchecked but it no longer defaults to 
on (which makes sense, since the reset method now says it's default 
value is false).

So, my question is, is there a way to have an ActionForm checkbox default 
to on _and_ be able to detect that it has been unchecked when the form 
is submitted?

Thanks in advance for any assistance you can provide.
--Jim

==
Jim Coble
Senior Technology Specialist
Center for Instructional Technology
Email: [EMAIL PROTECTED]
Voice: 919-660-5974  Fax: 919-660-5923
Box 90198, Duke University
Durham, NC 27708-0198
==



[FRIDAY] a javascript a day keeps the server away... [WAS: RE: How does LookupDispatchAction lookup.]

2002-12-20 Thread Andrew Hill
Oh come on!

Dont you know that the latest research suggests a little javascript is good
for your heart. Oh wait a second - thats beer.

Well I guess its that day of the week again ;-)

And for a practical example of just how useful javascript can be check out
this oddity I found while looking for a tree widget to use for my
navigation:
http://dhtmlnirvana.com/landoftrees/

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 23:57
To: 'Struts Users Mailing List'
Subject: RE: How does LookupDispatchAction lookup.


I have had the same issues you are having, and I just went with
LookupDispatchAction. I'm not 100% sure if the way I do my apps is the 100%
correct way, but what I do is for any button that has white space as its
value, I store a key in my ApplicationResources.properties and use that key
in conjunction with LookupDispatchAction.

I like the LookupDispatchAction because I avoid having to use javascript on
my client.

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:45 AM
To: 'Struts Users Mailing List'
Subject: RE: How does LookupDispatchAction lookup.


 I think you are missing the point of what
 LookupDispatchAction is about.
 It solves a specific problem with i18n'd button labels.

 It sounds like you might be more interested in DispatchAction.

Ted says that JavaScript is needed  with Dispatch Action.
My problem with DispatchAction is that the name of the
java method IS the value of a request parameter.
At the moment, the only parameter I can use is the one
of the submit button clicked by the user. And the value
of that submit contains whitespaces.


So is there a solution?
Am i stuck with LookupDispatchAction and .properties ?

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

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




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


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




Re: Struts 1.0.2 ActionForm checkbox question

2002-12-20 Thread Eddie Bush
You could have another boolean field which you'd use as an indicator of 
what to do:

boolean firstTime = true;

if (!firstTime)
{
   contractInstructor = false;
}
else
{
   firstTime = false;
}

Jim Coble wrote:

I'm using Struts 1.0.2 with Tomcat 4.1.12.  I have an ActionForm with a 
checkbox whose default value I would like to be on.  I accomplished that 
by initializing the underlying bean property to true.  However, I am 
having trouble detecting if the box is unchecked when the form is 
submitted.

In the Struts documentation for the HTML taglib, in the section on 
checkbox (http://jakarta.apache.org/struts/struts-html.html#checkbox), I 
read the following:
WARNING: In order to correctly recognize unchecked checkboxes, the 
ActionForm bean associated with this form must include a statement setting 
the corresponding boolean property to false in the reset() method.

So, I do that; i.e.,
   public void reset( ActionMapping mapping, HttpServletRequest request )
   {
   this.contactInstructor = false;
   }
Now I can detect when the box is unchecked but it no longer defaults to 
on (which makes sense, since the reset method now says it's default 
value is false).

So, my question is, is there a way to have an ActionForm checkbox default 
to on _and_ be able to detect that it has been unchecked when the form 
is submitted?

Thanks in advance for any assistance you can provide.
--Jim

==
Jim Coble
Senior Technology Specialist
Center for Instructional Technology
Email: [EMAIL PROTECTED]
Voice: 919-660-5974  Fax: 919-660-5923
Box 90198, Duke University
Durham, NC 27708-0198
==

 


--
Eddie Bush





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




Can you change the form action??

2002-12-20 Thread awc
Hi All,

Can you change the value of form action=foo by inspecting a incoming
variable??

I have a four action classes : AddAction, DeleteAction, UpdateAction and
LoadAction and one form = The userForm.

If incoming parameter action=New, I want to change the form action to
form action=/usr/AddUser.do.

If incoming parameter action=Update, I want to change the form action to
form action=/usr/UpdateUser.do.

Is there anyway to do this without using JavaScript??  This way I will
have four action classes and one form for each business objects.

Thanks in advance for any hints.

Anil


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




RE: Can you change the form action??

2002-12-20 Thread Alvarado, Juan (c)
You are a perfect candidate for either DispatchAction or
LookupDispatchAction. LookupDispatchAction will allow you to avoid
javascript.

I suggest you take a look at Ted's site http://husted.com (I think) and
review his tips on the two actions mentioned above.

This post will also help you:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51209.html

-Original Message-
From: awc [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:15 AM
To: Struts Users Mailing List
Subject: Can you change the form action??


Hi All,

Can you change the value of form action=foo by inspecting a incoming
variable??

I have a four action classes : AddAction, DeleteAction, UpdateAction and
LoadAction and one form = The userForm.

If incoming parameter action=New, I want to change the form action to
form action=/usr/AddUser.do.

If incoming parameter action=Update, I want to change the form action to
form action=/usr/UpdateUser.do.

Is there anyway to do this without using JavaScript??  This way I will
have four action classes and one form for each business objects.

Thanks in advance for any hints.

Anil


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




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




RE:[OT] [FRIDAY] a javascript a day keeps the server away...

2002-12-20 Thread James Childers


 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 10:11 AM
 To: Struts Users Mailing List
 Subject: [FRIDAY] a javascript a day keeps the server away... 

 And for a practical example of just how useful javascript can 
 be check out
 this oddity I found while looking for a tree widget to use for my
 navigation:
 http://dhtmlnirvana.com/landoftrees/

Wow, that brings Mozilla completely to its knees. Interesting.

-= J

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




RE: [OT] [FRIDAY] a javascript a day keeps the server away...

2002-12-20 Thread Andrew Hill
rofl. Does too. I note the trees dont seem to have any sounds in mozilla
either.
Works fine and fast in IE5 of course...

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 21, 2002 00:18
To: Struts Users Mailing List
Subject: RE:[OT] [FRIDAY] a javascript a day keeps the server away...




 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 10:11 AM
 To: Struts Users Mailing List
 Subject: [FRIDAY] a javascript a day keeps the server away...

 And for a practical example of just how useful javascript can
 be check out
 this oddity I found while looking for a tree widget to use for my
 navigation:
 http://dhtmlnirvana.com/landoftrees/

Wow, that brings Mozilla completely to its knees. Interesting.

-= J

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


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




kiosk mode browser

2002-12-20 Thread Vincent Stoessel
I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many platforms 
and it can be customized without paying for a development license. By 
kiosk mode, I mean that the broswer would retain all the functionality 
of modern browser but not have the buttons or url window that end users 
sometime mistakingly use to reload, go back or otherwise shoot 
themselves in the foot. Opinions?
--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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



Struts Validator printing out starting JavaScript Tag Problem

2002-12-20 Thread Scott Reisdorf
Hi All,
I am having problems using the Struts Validator Plugin and getting it to 
print out the starting JavaScript Tag - Script Language=Javascript
For some reason, if i don't specify the field as depends=required in my 
validation.xml file,  it does not print the start of my Javascript tag 
Script Language=Javascript ;however, when i do add the required as a 
dependency, it works just fine... any solutions for this?

-scott


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



RE: kiosk mode browser

2002-12-20 Thread Andrew Hill
This being something corporations et al.. could have their people use to
access corporate intranet apps without bollocksign everything using back
buttons or navigating anywhere they please just by typing in a url?

That could be quite popular.
Mozilla would certainly be the best base to work from too.

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 21, 2002 00:27
To: Struts Users
Subject: kiosk mode browser


I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many platforms
and it can be customized without paying for a development license. By
kiosk mode, I mean that the broswer would retain all the functionality
of modern browser but not have the buttons or url window that end users
sometime mistakingly use to reload, go back or otherwise shoot
themselves in the foot. Opinions?
--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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


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




RE: how can I use the tag value in another tag?

2002-12-20 Thread Karr, David
Note that using the EL (JSTL expression language, with Struts-EL and
JSTL) is not really script.  It's considered a good idea to avoid
using runtime JSP expression scriptlets, which these are not.  If you
don't use either Struts-EL or the JSTL, it's difficult to do this sort
of thing without using scriptlets, and you will find that real
scriptlets to do this will be messier than EL expressions.

 -Original Message-
 From: cnyinhua [mailto:[EMAIL PROTECTED]]
 
 Thank you.
 I hope the jsp file can have script as little as possible. Do you have
 some other way to implement it?
 
 cnyinhua wrote:
 
 Hi, all
 I'm new in struts.
 Now I want to show some information in a tag, which is showed by
 another
 tag.
 html:link page=/testaction.do?page=bean:write name=turnpage
 property=pagenumber-1previous
 /html:link
 
 You can't embed one tag within another like you're doing 
 here.  Take a 
 look at the struts-el contributed taglib by David M. Karr -- you can 
 (usually) find it in the contrib folder of the Struts 
 distribution.  (I 
 say usually because there's some weird build anomoly that's 
 causing it 
 to disappear from time to time).  Using struts-el, you could do 
 something like:
 
 htmlel:link 
 page=/testaction.do?page=${turnpage.pagenumber}-1previous/
 htmlel:lin
 k

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




RE: kiosk mode browser

2002-12-20 Thread Chen, Gin
IMHO, kiosk mode is probably the worst thing a website can do.
Its just plain intrusive.

FYI, this is a humorous take on bad site design.
http://www.webpagesthatsuck.com/

Now from a strut's perspective, the back buttons can usually be handled by
just turning on nocache.
ex:
controller locale=true nocache=true/controller
-Tim

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:27 AM
To: Struts Users
Subject: kiosk mode browser


I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many platforms 
and it can be customized without paying for a development license. By 
kiosk mode, I mean that the broswer would retain all the functionality 
of modern browser but not have the buttons or url window that end users 
sometime mistakingly use to reload, go back or otherwise shoot 
themselves in the foot. Opinions?
-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




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




RE: kiosk mode browser

2002-12-20 Thread Chappell, Simon P
We did that here at Lands' End for the system that we put live in our distribution 
centre.

We use thin client terminals (the brand and model escape me right now) running XP (I 
think, it might be W2K) and Internet Explorer 5.5 (I'm quite certain of this). The 
terminals use a touch screen disply.

We run in kiosk mode and have found it to work very well for us. We are considering 
using Mozilla and Linux in another area, for our Customer Service Representatives, but 
ours used the more traditional Microsoft mix as we had a time crunch.

A well designed web app will run very well in kiosk mode. Who needs those back buttons 
anyway? :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:27 AM
To: Struts Users
Subject: kiosk mode browser


I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many 
platforms 
and it can be customized without paying for a development license. By 
kiosk mode, I mean that the broswer would retain all the functionality 
of modern browser but not have the buttons or url window that 
end users 
sometime mistakingly use to reload, go back or otherwise shoot 
themselves in the foot. Opinions?
-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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



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




RE: kiosk mode browser

2002-12-20 Thread Kevin A. Palfreyman
I'm pretty sure the common browsers already do this.

MS IE
http://support.microsoft.com/default.aspx?scid=KB;en-us;q154780

Mozilla
http://tln.lib.mi.us/~amutch/pro/mozilla/kioskmode.htm
http://kiosk.mozdev.org/

This any help?

Kev

 -Original Message-
 From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
 Sent: 20 December 2002 16:27
 To: Struts Users
 Subject: kiosk mode browser
 
 
 I was was wondering about what people think about  implementing
 a kiosk style browser on the client end of a struts app.
 I was thinking mozilla because it is already ported to so 
 many platforms 
 and it can be customized without paying for a development license. By 
 kiosk mode, I mean that the broswer would retain all the 
 functionality 
 of modern browser but not have the buttons or url window that 
 end users 
 sometime mistakingly use to reload, go back or otherwise shoot 
 themselves in the foot. Opinions?
 -- 
 Vincent Stoessel
 Linux Systems Developer
 vincent xaymaca.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




RE: kiosk mode browser

2002-12-20 Thread Chappell, Simon P
Agreed. Public websites should never try to use kiosk mode or any of the other evil 
things they can do.

Internal web applications, however, can and I would say should, use kiosk mode to help 
protect the users from themselves.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:35 AM
To: 'Struts Users Mailing List'
Subject: RE: kiosk mode browser


IMHO, kiosk mode is probably the worst thing a website can do.
Its just plain intrusive.

FYI, this is a humorous take on bad site design.
http://www.webpagesthatsuck.com/

Now from a strut's perspective, the back buttons can usually 
be handled by
just turning on nocache.
ex:
controller locale=true nocache=true/controller
-Tim

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:27 AM
To: Struts Users
Subject: kiosk mode browser


I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many 
platforms 
and it can be customized without paying for a development license. By 
kiosk mode, I mean that the broswer would retain all the functionality 
of modern browser but not have the buttons or url window that 
end users 
sometime mistakingly use to reload, go back or otherwise shoot 
themselves in the foot. Opinions?
-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




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


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




RE: [FRIDAY] a javascript a day keeps the server away...

2002-12-20 Thread James Mitchell
Holy Footprint Batman!  That page sucked 100% of my system resources
to render!  And I have 1/2 a GIG!!!

I thought I heard a painful moaning sound, and when page finally came
up, I realized it was coming from Phoenix.


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 11:11 AM
 To: Struts Users Mailing List
 Subject: [FRIDAY] a javascript a day keeps the server away... 
 [WAS: RE: How does LookupDispatchAction lookup.]
 
 
 Oh come on!
 
 Dont you know that the latest research suggests a little 
 javascript is good for your heart. Oh wait a second - thats beer.
 
 Well I guess its that day of the week again ;-)
 
 And for a practical example of just how useful javascript can 
 be check out this oddity I found while looking for a tree 
 widget to use for my
 navigation:
 http://dhtmlnirvana.com/landoftrees/
 
 -Original Message-
 From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 23:57
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.
 
 
 I have had the same issues you are having, and I just went 
 with LookupDispatchAction. I'm not 100% sure if the way I do 
 my apps is the 100% correct way, but what I do is for any 
 button that has white space as its value, I store a key in my 
 ApplicationResources.properties and use that key in 
 conjunction with LookupDispatchAction.
 
 I like the LookupDispatchAction because I avoid having to use 
 javascript on my client.
 
 -Original Message-
 From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 10:45 AM
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.
 
 
  I think you are missing the point of what LookupDispatchAction is 
  about. It solves a specific problem with i18n'd button labels.
 
  It sounds like you might be more interested in DispatchAction.
 
 Ted says that JavaScript is needed  with Dispatch Action.
 My problem with DispatchAction is that the name of the
 java method IS the value of a request parameter.
 At the moment, the only parameter I can use is the one
 of the submit button clicked by the user. And the value
 of that submit contains whitespaces.
 
 
 So is there a solution?
 Am i stuck with LookupDispatchAction and .properties ?
 
 This e-mail is intended only for the above addressee. It may 
 contain privileged information. If you are not the addressee 
 you must not copy, distribute, disclose or use any of the 
 information in it. If you have received it in error please 
 delete it and immediately notify the sender. Security Notice: 
 all e-mail, sent to or from this address, may be accessed by 
 someone other than the recipient, for system management and 
 security reasons. This access is controlled under Regulation 
 of Investigatory Powers Act 2000, Lawful Business Practises.
 
 --
 To unsubscribe, e-mail: 
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail: 
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




RE: [FRIDAY] a javascript a day keeps the server away...

2002-12-20 Thread Andrew Hill
I dont know how to best describe that page.
Its like a twisted mixture of lame and compelling at the same time.

I dont know what its designer was on at the time he wrote it, but I want
some...

lol

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 21, 2002 00:48
To: 'Struts Users Mailing List'
Subject: RE: [FRIDAY] a javascript a day keeps the server away...


Holy Footprint Batman!  That page sucked 100% of my system resources
to render!  And I have 1/2 a GIG!!!

I thought I heard a painful moaning sound, and when page finally came
up, I realized it was coming from Phoenix.


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg.
- Bjarne Stroustrup


 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 11:11 AM
 To: Struts Users Mailing List
 Subject: [FRIDAY] a javascript a day keeps the server away...
 [WAS: RE: How does LookupDispatchAction lookup.]


 Oh come on!

 Dont you know that the latest research suggests a little
 javascript is good for your heart. Oh wait a second - thats beer.

 Well I guess its that day of the week again ;-)

 And for a practical example of just how useful javascript can
 be check out this oddity I found while looking for a tree
 widget to use for my
 navigation:
 http://dhtmlnirvana.com/landoftrees/

 -Original Message-
 From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 23:57
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.


 I have had the same issues you are having, and I just went
 with LookupDispatchAction. I'm not 100% sure if the way I do
 my apps is the 100% correct way, but what I do is for any
 button that has white space as its value, I store a key in my
 ApplicationResources.properties and use that key in
 conjunction with LookupDispatchAction.

 I like the LookupDispatchAction because I avoid having to use
 javascript on my client.

 -Original Message-
 From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 10:45 AM
 To: 'Struts Users Mailing List'
 Subject: RE: How does LookupDispatchAction lookup.


  I think you are missing the point of what LookupDispatchAction is
  about. It solves a specific problem with i18n'd button labels.
 
  It sounds like you might be more interested in DispatchAction.

 Ted says that JavaScript is needed  with Dispatch Action.
 My problem with DispatchAction is that the name of the
 java method IS the value of a request parameter.
 At the moment, the only parameter I can use is the one
 of the submit button clicked by the user. And the value
 of that submit contains whitespaces.


 So is there a solution?
 Am i stuck with LookupDispatchAction and .properties ?

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

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




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


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




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


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




[Tiles] Last Nightbuild

2002-12-20 Thread Fabrice BLANQUART
Hi,

I get the last night build in order to test the ModuleAware part of 
tiles.
But I have problem using the TilesRequestProcessor when I switch form one 
module to another. It seems that it can't find my tiles name in the
definitionFactory.

In debug , I discover that the Moduleconfig was switched but not the 
definition factory.

In the initDefinitionsMapping() of the TilesRequestProcessor, it call  
definitionsFactory = 
DefinitionsUtil.getDefinitionsFactory(getServletContext());
wich seems to be deprecated and to not be moduleAware.

Do i have to replace it with 
TilesUtil#createDefinitionsFactory(ServletContext, 
DefinitionsFactoryConfig) ?

--
Fabrice BLANQUART




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



Re: how can I use the tag value in another tag?

2002-12-20 Thread Mark Lepkowski
Why are JSP scriptlets to be avoided?

snip
 It's considered a good idea to avoid
 using runtime JSP expression scriptlets...
/snip



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




Re: kiosk mode browser

2002-12-20 Thread Vincent Stoessel
Oh yes, I should have been more clear.
I would never recommend kiosk for a public, I was talking about very 
specific and targeted internal business apps.




Chappell, Simon P wrote:
Agreed. Public websites should never try to use kiosk mode or any of the other evil things they can do.

Internal web applications, however, can and I would say should, use kiosk mode to help protect the users from themselves.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526




-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:35 AM
To: 'Struts Users Mailing List'
Subject: RE: kiosk mode browser


IMHO, kiosk mode is probably the worst thing a website can do.
Its just plain intrusive.

FYI, this is a humorous take on bad site design.
http://www.webpagesthatsuck.com/

Now from a strut's perspective, the back buttons can usually 
be handled by
just turning on nocache.
ex:
  controller locale=true nocache=true/controller
-Tim

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:27 AM
To: Struts Users
Subject: kiosk mode browser


I was was wondering about what people think about  implementing
a kiosk style browser on the client end of a struts app.
I was thinking mozilla because it is already ported to so many 
platforms 
and it can be customized without paying for a development license. By 
kiosk mode, I mean that the broswer would retain all the functionality 
of modern browser but not have the buttons or url window that 
end users 
sometime mistakingly use to reload, go back or otherwise shoot 
themselves in the foot. Opinions?
--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




--
To unsubscribe, e-mail:   

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


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



--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




Re: kiosk mode browser

2002-12-20 Thread Vincent Stoessel
Kevin A. Palfreyman wrote:

I'm pretty sure the common browsers already do this.

MS IE
http://support.microsoft.com/default.aspx?scid=KB;en-us;q154780

Mozilla
http://tln.lib.mi.us/~amutch/pro/mozilla/kioskmode.htm
http://kiosk.mozdev.org/

This any help?

	Kev




Very cool info, thanks. I still like mozilla a little more
because if I want to run it on a sparc or intel box, I have no
worried and I can customize the throbber to use the client's logo
:)


--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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




DynaActionForm isn't dyna enough

2002-12-20 Thread John . E . Gregg
Hi all,

I'm trying to create a jsp that will display an arbitrary list of items (all
of the same type), each with its own select box to adjust a property.  I
don't know in advance how many of these items there are, so I can't really
specify them in my struts-config file.  It appears, however, that Struts
expects them to be there.  I guess I could do something like abc-N where N
is an index, but I'm concerned about not being able to match the index to
the right instance on the server.  Isn't there a way around this?

thanks

john

john gregg
Wells Fargo Service Corporation
Minneapolis, MN

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




how to get JDBC source defined in struts in another servlet

2002-12-20 Thread Sash Sash

Hi,

I would like to create a servlet that loads specific resources (puts beans into app 
context to be used by jsp's and action classes) when the webapp first launches.  For 
this task I require a JDBC source that is defined in the struts config file.   How can 
I get this datasource in my servlet?  If I understand correctly, the action servlet 
initializes the datasource on startup and is available via findDatasource().  Any 
suggestions?  Can I get an Action Servlet executed once via config file?  Thanks in 
advance for any assistance you can provide!!!



-
Post your free ad now! Yahoo! Canada Personals



Pre-populating Form Bean

2002-12-20 Thread Mark Conlin
 
I would like to pre-populate a form bean for an edit screen.
I have spent the last hour or two reading the archives and still I have
failed to find the help I need.
Any feedback would be appreciated.
 
I have an Action class CustomerAccountDetailsPreEditAction that
pre-populates my form.
However, I do not know how to place the form back into the session or
request so that the jsp page can find it and use it to display values.
 
request.setAttribute(mapping.getName(), myForm);
session.setAttribute(mapping.getName(), myForm); 
 
Both result in an error.
 
Here is the action declaration:
action path=/customer.customerAccountDetails.pre.edit
 
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success
path=customer.edit_accountdetails/
/action
 
 
Here is the form declaration:
form-bean name=customerDetailsForm
type=com.yordata.form.CustomerDetailsForm/
 
 
Thanks for your help,
Mark 



Re: Pre-populating Form Bean

2002-12-20 Thread Eddie Bush
If this is a form which you've declared in your config file, and it's 
associated with this action and you're forwarding to a JSP, you really 
needn't bother sticking it into any scope.  Struts will do this for you. 
Just populate the form and return an ActionForward and let Struts do 
it's thing.

... so far as your error is concerned, I can't imagine why you're 
receiving it.  You did specify a 'name=formName' as an attribute to 
this action, right?  That's how you make the association between the 
action and the form.  I believe this value would probably be null if you 
didn't specify that attribute - and I can see where that would generate 
an error.

Ah - yes.  I see your action declaration now.  Add in 
'name=customerDetailsForm' to your action line.  That will build the 
association for you.  Once you've done this, you no longer have to worry 
about creating the form ... or anything like that - and it's the *only* 
way you're going to get Struts to populate the form for you 
automatically (why would it populate something if it doesn't know there 
is something to populate?).

Good luck!

Mark Conlin wrote:


I would like to pre-populate a form bean for an edit screen.
I have spent the last hour or two reading the archives and still I have
failed to find the help I need.
Any feedback would be appreciated.

I have an Action class CustomerAccountDetailsPreEditAction that
pre-populates my form.
However, I do not know how to place the form back into the session or
request so that the jsp page can find it and use it to display values.

request.setAttribute(mapping.getName(), myForm);
session.setAttribute(mapping.getName(), myForm); 

Both result in an error.

Here is the action declaration:
   action path=/customer.customerAccountDetails.pre.edit

type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
   forward name=success
path=customer.edit_accountdetails/
   /action


Here is the form declaration:
form-bean name=customerDetailsForm
type=com.yordata.form.CustomerDetailsForm/


Thanks for your help,
Mark 

 


--
Eddie Bush





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




Re: Struts Validator printing out starting JavaScript Tag Problem

2002-12-20 Thread Scott Reisdorf
Nevermind I got it to work.
i had my validation.xml file properties wrong.
Sorry.


At 08:30 AM 12/20/2002 -0800, you wrote:

Hi All,
I am having problems using the Struts Validator Plugin and getting it to 
print out the starting JavaScript Tag - Script Language=Javascript
For some reason, if i don't specify the field as depends=required in my 
validation.xml file,  it does not print the start of my Javascript tag 
Script Language=Javascript ;however, when i do add the required as a 
dependency, it works just fine... any solutions for this?

-scott


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



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




RE: [Announce / help] STRUTS - Help needed on open source project

2002-12-20 Thread Harshal D

James,

 

Good question .

 



 

We are NOT FOR PROFIT. We are using .com as well as .org just because we got the 
domain and  .com is easy for our ‘target audience’ – enterprise developers’.

 

To understand furthe please check out:

http://www.theopenstack.com/main/staticpages/index.php?page=20021129161256837

 

Also please look at the survey at:

 

http://www.theopenstack.com/main/index.php?topic=AboutUs

 

as it states 69% CIOs do not use open source for its lack of simplicity / in house 
skills. We are trying to help enterprise IT teams to build these skills. In other 
words we would like to take open source to the ‘Masses’ if we succeed. Currently only 
the ‘technically elite’ use many open source tools.

 
With help from people like you we surely hope we will succeed in that.   Any ideas 
suggestion you have in achieving this are more than welcome.
Harshal.
 
PS:  Lets not keep replying to the list, please send me an email directly.
 James Mitchell [EMAIL PROTECTED] wrote:So what exactly do you want? Free labor?


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Harshal D [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 3:40 AM
 To: Struts Users Mailing List
 Subject: [Announce / help] STRUTS - Help needed on open 
 source project 
 
 
 
 THIS IS NOT A TECHNICAL QUESTION.
 
 
 
 Hello,
 
 
 
 I am a contributor to www.theopenstack.com
 
 
 
 We are trying to simplify  promote use of open source 
 technology in building 'enterprise application'. The goal is 
 to pre-define a stack and demonstrate the use of open source 
 technologies for enterprise applications. We will be 
 demonstrating how to build the same example application, 
 step-by-step, by adding features such as DB access, caching, 
 ERP integration, Service oriented architecture support  
 Collaboration. 
 
 
 
 We are a bunch of business tier application developers and 
 seriously lack STRUTS skills. We really need contributors in 
 this area.
 
 
 
 Please check out the website, about us  projects links to 
 explore further if you are interested.
 
 
 
 Thanks
 
 
 
 Harshal
 
 
 
 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now
 


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



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


no getter method for property phoneList

2002-12-20 Thread Raffy_Lata

I'm getting desperate with my problem.

I have a very simple class named Party defined as

public class Party() {

 public Party()

 ArrayList phoneList_ = new ArrayList();
 ArrayList addressList_ = new ArrayList();

 public ArrayList getPhoneList() {

  return phoneList_;

 }

 public void setPhoneList(ArrayList list) {

  phoneList_ = list;

 }

 public ArrayList getAddressList() {

  return addressList_;

 }

 public void setAddressList(ArrayList list) {

  addressList_ = list;

 }

}


When I do a logic:iterate to iterate on both lists

logic:iterate name=party property=addressList id=test

/logic:iterate


logic:iterate name=party property=phoneList id=test1

/logic:iterate


iterating on addressList is fine

However I get a

: No getter method for property phoneList of bean party

I'm using VaJava 4.0 and I;ve checked everything and can't find anything wrong with my 
classes.

Has anybody encountered and solved this problem before?

Thanks,

Raffy
**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**




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




RE: no getter method for property phoneList

2002-12-20 Thread Wendy Smoak
 I have a very simple class named Party
 iterating on addressList is fine
 However I get a
 : No getter method for property phoneList of bean party

Try setting the 'type' attribute of the logic:iterate tag.

I have no idea why it works for one property and not the other, though!

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



RE: no getter method for property phoneList

2002-12-20 Thread Sri Sankaran
Are there any overloaded setters for phoneList that you haven't shown.  If that is the 
case, you *will* have this problem.

Sri

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 1:18 PM
 To: Struts Users Mailing List
 Subject: no getter method for property phoneList
 
 
 
 I'm getting desperate with my problem.
 
 I have a very simple class named Party defined as
 
 public class Party() {
 
  public Party()
 
  ArrayList phoneList_ = new ArrayList();
  ArrayList addressList_ = new ArrayList();
 
  public ArrayList getPhoneList() {
 
   return phoneList_;
 
  }
 
  public void setPhoneList(ArrayList list) {
 
   phoneList_ = list;
 
  }
 
  public ArrayList getAddressList() {
 
   return addressList_;
 
  }
 
  public void setAddressList(ArrayList list) {
 
   addressList_ = list;
 
  }
 
 }
 
 
 When I do a logic:iterate to iterate on both lists
 
 logic:iterate name=party property=addressList id=test
 
 /logic:iterate
 
 
 logic:iterate name=party property=phoneList id=test1
 
 /logic:iterate
 
 
 iterating on addressList is fine
 
 However I get a
 
 : No getter method for property phoneList of bean party
 
 I'm using VaJava 4.0 and I;ve checked everything and can't 
 find anything wrong with my classes.
 
 Has anybody encountered and solved this problem before?
 
 Thanks,
 
 Raffy
 **
 Please Note:
 The information in this E-mail message, and any files 
 transmitted with it, is confidential and may be legally 
 privileged.  It is intended only for the use of the 
 individual(s) named above.  If you are the intended 
 recipient, be aware that your use of any confidential or 
 personal information may be restricted by state and federal 
 privacy laws.  If you, the reader of this message, are not 
 the intended recipient, you are hereby notified that you 
 should not further disseminate, distribute, or forward this 
 E-mail message. If you have received this E-mail in error, 
 please notify the sender and delete the material from any 
 computer.  Thank you.
 **
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




RE: Pre-populating Form Bean

2002-12-20 Thread Mark Conlin

Okay so I have done the following...
I placed name=customerDetailsForm into my action declaration..
It wanted an input field as well so I added that too.

Now my form comes up and it is still not populated...

My action execute code is below... are you sure I don't need to place
the custForm back into the session somehow ?


Thanks 
Mark 

logger.debug(performAction starting);
ActionErrors errors = new ActionErrors();
ActionForward actionForward = mapping.findForward(FAILURE);
CustomerDetailsForm custForm= (CustomerDetailsForm) form;
HttpSession session = (HttpSession) request.getSession();

custForm = this.setup( session );
actionForward = mapping.findForward(SUCCESS);   

logger.debug(performAction exiting);

Action Declaration:

action path=/customer.customerAccountDetails.edit
type=com.yordata.action.customer.CustomerAccountDetailsEditAction
name=customerDetailsForm
scope=session
input=customer.account_details_view
forward name=success
path=/customer.customerAccountDetails.view.do/
forward name=failure path=customer.edit_accountdetails/
/action


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 2:13 PM
To: Struts Users Mailing List
Subject: Re: Pre-populating Form Bean

If this is a form which you've declared in your config file, and it's 
associated with this action and you're forwarding to a JSP, you really 
needn't bother sticking it into any scope.  Struts will do this for you.

 Just populate the form and return an ActionForward and let Struts do 
it's thing.

... so far as your error is concerned, I can't imagine why you're 
receiving it.  You did specify a 'name=formName' as an attribute to 
this action, right?  That's how you make the association between the 
action and the form.  I believe this value would probably be null if you

didn't specify that attribute - and I can see where that would generate 
an error.

Ah - yes.  I see your action declaration now.  Add in 
'name=customerDetailsForm' to your action line.  That will build the 
association for you.  Once you've done this, you no longer have to worry

about creating the form ... or anything like that - and it's the *only* 
way you're going to get Struts to populate the form for you 
automatically (why would it populate something if it doesn't know there 
is something to populate?).

Good luck!

Mark Conlin wrote:

 
I would like to pre-populate a form bean for an edit screen.
I have spent the last hour or two reading the archives and still I have
failed to find the help I need.
Any feedback would be appreciated.
 
I have an Action class CustomerAccountDetailsPreEditAction that
pre-populates my form.
However, I do not know how to place the form back into the session or
request so that the jsp page can find it and use it to display values.
 
request.setAttribute(mapping.getName(), myForm);
session.setAttribute(mapping.getName(), myForm); 
 
Both result in an error.
 
Here is the action declaration:
action path=/customer.customerAccountDetails.pre.edit
 
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success
path=customer.edit_accountdetails/
/action
 
 
Here is the form declaration:
form-bean name=customerDetailsForm
type=com.yordata.form.CustomerDetailsForm/
 
 
Thanks for your help,
Mark 

  


-- 
Eddie Bush





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


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




RE: no getter method for property phoneList

2002-12-20 Thread Raffy_Lata

No, I don't have any overloaded methods. I even created a getBogusList()
and setBogustList(List) just to make sure I'm not overloading anything and
I had the same problem.






Sri Sankaran [EMAIL PROTECTED] on 12/20/2002 10:34:35 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  RE: no getter method for property phoneList


Are there any overloaded setters for phoneList that you haven't shown.  If
that is the case, you *will* have this problem.

Sri

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 1:18 PM
 To: Struts Users Mailing List
 Subject: no getter method for property phoneList



 I'm getting desperate with my problem.

 I have a very simple class named Party defined as

 public class Party() {

  public Party()

  ArrayList phoneList_ = new ArrayList();
  ArrayList addressList_ = new ArrayList();

  public ArrayList getPhoneList() {

   return phoneList_;

  }

  public void setPhoneList(ArrayList list) {

   phoneList_ = list;

  }

  public ArrayList getAddressList() {

   return addressList_;

  }

  public void setAddressList(ArrayList list) {

   addressList_ = list;

  }

 }


 When I do a logic:iterate to iterate on both lists

 logic:iterate name=party property=addressList id=test

 /logic:iterate


 logic:iterate name=party property=phoneList id=test1

 /logic:iterate


 iterating on addressList is fine

 However I get a

 : No getter method for property phoneList of bean party

 I'm using VaJava 4.0 and I;ve checked everything and can't
 find anything wrong with my classes.

 Has anybody encountered and solved this problem before?

 Thanks,

 Raffy
 **
 Please Note:
 The information in this E-mail message, and any files
 transmitted with it, is confidential and may be legally
 privileged.  It is intended only for the use of the
 individual(s) named above.  If you are the intended
 recipient, be aware that your use of any confidential or
 personal information may be restricted by state and federal
 privacy laws.  If you, the reader of this message, are not
 the intended recipient, you are hereby notified that you
 should not further disseminate, distribute, or forward this
 E-mail message. If you have received this E-mail in error,
 please notify the sender and delete the material from any
 computer.  Thank you.
 **




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



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






**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**




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




JSTL Discussion List?

2002-12-20 Thread Paul Hodgetts, Agile Logic
Is there a discussion list that is either dedicated to
JSTL discussions, or at least has the majority of the
good ones?  I've looked around a bit and haven't found
one yet.

Thanks,
Paul


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




RE: no getter method for property phoneList

2002-12-20 Thread Vinh Tran
Try getting the phoneList all by itself to isolate the problem.  You may in
fact be able to retrieve the list just fine and there is some other issue.

Vinh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 1:42 PM
To: Struts Users Mailing List
Subject: RE: no getter method for property phoneList



No, I don't have any overloaded methods. I even created a getBogusList()
and setBogustList(List) just to make sure I'm not overloading anything and
I had the same problem.






Sri Sankaran [EMAIL PROTECTED] on 12/20/2002 10:34:35 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  RE: no getter method for property phoneList


Are there any overloaded setters for phoneList that you haven't shown.  If
that is the case, you *will* have this problem.

Sri

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 1:18 PM
 To: Struts Users Mailing List
 Subject: no getter method for property phoneList



 I'm getting desperate with my problem.

 I have a very simple class named Party defined as

 public class Party() {

  public Party()

  ArrayList phoneList_ = new ArrayList();
  ArrayList addressList_ = new ArrayList();

  public ArrayList getPhoneList() {

   return phoneList_;

  }

  public void setPhoneList(ArrayList list) {

   phoneList_ = list;

  }

  public ArrayList getAddressList() {

   return addressList_;

  }

  public void setAddressList(ArrayList list) {

   addressList_ = list;

  }

 }


 When I do a logic:iterate to iterate on both lists

 logic:iterate name=party property=addressList id=test

 /logic:iterate


 logic:iterate name=party property=phoneList id=test1

 /logic:iterate


 iterating on addressList is fine

 However I get a

 : No getter method for property phoneList of bean party

 I'm using VaJava 4.0 and I;ve checked everything and can't
 find anything wrong with my classes.

 Has anybody encountered and solved this problem before?

 Thanks,

 Raffy
 **
 Please Note:
 The information in this E-mail message, and any files
 transmitted with it, is confidential and may be legally
 privileged.  It is intended only for the use of the
 individual(s) named above.  If you are the intended
 recipient, be aware that your use of any confidential or
 personal information may be restricted by state and federal
 privacy laws.  If you, the reader of this message, are not
 the intended recipient, you are hereby notified that you
 should not further disseminate, distribute, or forward this
 E-mail message. If you have received this E-mail in error,
 please notify the sender and delete the material from any
 computer.  Thank you.
 **




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



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






**
Please Note:
The information in this E-mail message, and any files transmitted
with it, is confidential and may be legally privileged.  It is
intended only for the use of the individual(s) named above.  If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal
privacy laws.  If you, the reader of this message, are not the
intended recipient, you are hereby notified that you should not
further disseminate, distribute, or forward this E-mail message.
If you have received this E-mail in error, please notify the sender
and delete the material from any computer.  Thank you.
**




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



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




RE: no getter method for property phoneList

2002-12-20 Thread Sri Sankaran
Since you *are* able to iterate over addressList I surmise that there *is* a bean with 
key party.  No problem on that front.

You should therefore be able to similarly get the List for phones.  Can you possibly 
post your Party class here in its entirety?

Sri

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 1:42 PM
 To: Struts Users Mailing List
 Subject: RE: no getter method for property phoneList
 
 
 
 No, I don't have any overloaded methods. I even created a 
 getBogusList() and setBogustList(List) just to make sure I'm 
 not overloading anything and I had the same problem.
 
 
 
 
 
 
 Sri Sankaran [EMAIL PROTECTED] on 12/20/2002 10:34:35 AM
 
 Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]
 
 To:   Struts Users Mailing List [EMAIL PROTECTED]
 cc:
 Subject:  RE: no getter method for property phoneList
 
 
 Are there any overloaded setters for phoneList that you 
 haven't shown.  If that is the case, you *will* have this problem.
 
 Sri
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 20, 2002 1:18 PM
  To: Struts Users Mailing List
  Subject: no getter method for property phoneList
 
 
 
  I'm getting desperate with my problem.
 
  I have a very simple class named Party defined as
 
  public class Party() {
 
   public Party()
 
   ArrayList phoneList_ = new ArrayList();
   ArrayList addressList_ = new ArrayList();
 
   public ArrayList getPhoneList() {
 
return phoneList_;
 
   }
 
   public void setPhoneList(ArrayList list) {
 
phoneList_ = list;
 
   }
 
   public ArrayList getAddressList() {
 
return addressList_;
 
   }
 
   public void setAddressList(ArrayList list) {
 
addressList_ = list;
 
   }
 
  }
 
 
  When I do a logic:iterate to iterate on both lists
 
  logic:iterate name=party property=addressList id=test
 
  /logic:iterate
 
 
  logic:iterate name=party property=phoneList id=test1
 
  /logic:iterate
 
 
  iterating on addressList is fine
 
  However I get a
 
  : No getter method for property phoneList of bean party
 
  I'm using VaJava 4.0 and I;ve checked everything and can't find 
  anything wrong with my classes.
 
  Has anybody encountered and solved this problem before?
 
  Thanks,
 
  Raffy
  
 **
  Please Note:
  The information in this E-mail message, and any files 
 transmitted with 
  it, is confidential and may be legally privileged.  It is intended 
  only for the use of the
  individual(s) named above.  If you are the intended recipient, be 
  aware that your use of any confidential or personal 
 information may be 
  restricted by state and federal privacy laws.  If you, the 
 reader of 
  this message, are not the intended recipient, you are 
 hereby notified 
  that you should not further disseminate, distribute, or forward this
  E-mail message. If you have received this E-mail in error,
  please notify the sender and delete the material from any
  computer.  Thank you.
  
 **
 
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user- [EMAIL PROTECTED]
  For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:  
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
 
 **
 Please Note:
 The information in this E-mail message, and any files 
 transmitted with it, is confidential and may be legally 
 privileged.  It is intended only for the use of the 
 individual(s) named above.  If you are the intended 
 recipient, be aware that your use of any confidential or 
 personal information may be restricted by state and federal 
 privacy laws.  If you, the reader of this message, are not 
 the intended recipient, you are hereby notified that you 
 should not further disseminate, distribute, or forward this 
 E-mail message. If you have received this E-mail in error, 
 please notify the sender and delete the material from any 
 computer.  Thank you.
 **
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




RE: JSTL Discussion List?

2002-12-20 Thread Robert Taylor
http://jakarta.apache.org/taglibs/index.html#MailingLists

robert

 -Original Message-
 From: Paul Hodgetts, Agile Logic [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 1:45 PM
 To: [EMAIL PROTECTED]
 Subject: JSTL Discussion List?
 
 
 Is there a discussion list that is either dedicated to
 JSTL discussions, or at least has the majority of the
 good ones?  I've looked around a bit and haven't found
 one yet.
 
 Thanks,
 Paul
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




RE: how to get JDBC source defined in struts in another servlet

2002-12-20 Thread James Mitchell
I'm sure you could just grab in out of the servletContext.



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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Sash Sash [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 12:52 PM
 To: [EMAIL PROTECTED]
 Subject: how to get JDBC source defined in struts in another servlet
 
 
 
 Hi,
 
 I would like to create a servlet that loads specific 
 resources (puts beans into app context to be used by jsp's 
 and action classes) when the webapp first launches.  For this 
 task I require a JDBC source that is defined in the struts 
 config file.   How can I get this datasource in my servlet?  
 If I understand correctly, the action servlet initializes the 
 datasource on startup and is available via findDatasource().  
 Any suggestions?  Can I get an Action Servlet executed once 
 via config file?  Thanks in advance for any assistance you 
 can provide!!!
 
 
 
 -
 Post your free ad now! Yahoo! Canada Personals
 


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




Re: kiosk mode browser

2002-12-20 Thread Daniel Jaffa
We should all try to protect users from themselves.

- Original Message -
From: Chappell, Simon P [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 11:47 AM
Subject: RE: kiosk mode browser


Agreed. Public websites should never try to use kiosk mode or any of the
other evil things they can do.

Internal web applications, however, can and I would say should, use kiosk
mode to help protect the users from themselves.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526




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




RE: JSTL Discussion List?

2002-12-20 Thread John Bigboote

If you want the archives, go to:

 http://jakarta.apache.org/site/mail2.html

Scroll down to TagLibs.  

HTH
John




--- Robert Taylor [EMAIL PROTECTED] wrote:

http://jakarta.apache.org/taglibs/index.html#MailingLists
 
 robert
 
  -Original Message-
  From: Paul Hodgetts, Agile Logic
 [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 20, 2002 1:45 PM
  To: [EMAIL PROTECTED]
  Subject: JSTL Discussion List?
  
  
  Is there a discussion list that is either
 dedicated to
  JSTL discussions, or at least has the majority of
 the
  good ones?  I've looked around a bit and haven't
 found
  one yet.
  
  Thanks,
  Paul
  
  
  --
  To unsubscribe, e-mail:   
 
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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

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




Cancel Submit Buttons

2002-12-20 Thread Bradley G Smith
Can someone please describe how to enable an action to respond to submit
and cancel buttons differently? The action is derived from the
scaffold.BaseAction class. I have submit working to generate a response. I
would like cancel to redirect to the main menu of the application.

I suppose one solution is to use a dispatch action first to chain to either
the submit action or the cancel action. Is this the best way to do
this? Or am I missing something that BaseAction provides out of the box?

Thanks,

Brad




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




RE: Cancel Submit Buttons

2002-12-20 Thread Siggelkow, Bill
You could do it in your action like;

if (isCancelled(request)) return mapping.findForward(mainMenu);

-Original Message-
From: Bradley G Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 2:13 PM
To: [EMAIL PROTECTED]
Subject: Cancel  Submit Buttons


Can someone please describe how to enable an action to respond to submit
and cancel buttons differently? The action is derived from the
scaffold.BaseAction class. I have submit working to generate a response. I
would like cancel to redirect to the main menu of the application.

I suppose one solution is to use a dispatch action first to chain to either
the submit action or the cancel action. Is this the best way to do
this? Or am I missing something that BaseAction provides out of the box?

Thanks,

Brad




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

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




RE: [Announce / help] STRUTS - Help needed on open source project

2002-12-20 Thread James Mitchell
I can't speak for everyone, but it is not very clear (from the main
page) what your website is about.
I had to go to the faq to grasp what is going on. (hint - add 'what is
open stack' to your main page)

So, basically, (guessing) you guys are like a Marketing dept for Open
Source Java Development???

I think this is a cool idea and I wish you mucho success!!!

I hope someone (IBM?) does something quick.  I just finished installing
the full blown Visual Studio.net Enterprise Developer w/ Visio (yes, I
get paid to do .Net (30%) and Java (%15)mostly because I can't seem
to find a fulltime position in the J2EE sector) and it looks to be quite
a bit more powerful than the previous version.

For me, Eclipse (and plugins) is the closest thing to competing with M$
development tools.  It's nice to see someone pull all these efforts
together.

Good Luck, I'll help when/where I can.


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

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Harshal D [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 20, 2002 1:15 PM
 To: Struts Users Mailing List
 Subject: RE: [Announce / help] STRUTS - Help needed on open 
 source project 
 
 
 
 James,
 
  
 
 Good question .
 
  
 
 
 
  
 
 We are NOT FOR PROFIT. We are using .com as well as .org just 
 because we got the domain and  .com is easy for our 'target 
 audience' - enterprise developers'.
 
  
 
 To understand furthe please check out:
 
 http://www.theopenstack.com/main/staticpages/index.php?page=20
 021129161256837
 
  
 
 Also please look at the survey at:
 
  
 
 http://www.theopenstack.com/main/index.php?topic=AboutUs
 
  
 
 as it states 69% CIOs do not use open source for its lack of 
 simplicity / in house skills. We are trying to help 
 enterprise IT teams to build these skills. In other words we 
 would like to take open source to the 'Masses' if we succeed. 
 Currently only the 'technically elite' use many open source tools.
 
  
 With help from people like you we surely hope we will succeed 
 in that.   Any ideas suggestion you have in achieving this 
 are more than welcome.
 Harshal.
  
 PS:  Lets not keep replying to the list, please send me an 
 email directly.  James Mitchell [EMAIL PROTECTED] 
 wrote:So what exactly do you want? Free labor?
 
 
 --
 James Mitchell
 Software Engineer/Struts Evangelist
 http://www.open-tools.org
 
 C makes it easy to shoot yourself in the foot; C++ makes it 
 harder, but when you do, it blows away your whole leg. 
 - Bjarne Stroustrup
 
 
  -Original Message-
  From: Harshal D [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 20, 2002 3:40 AM
  To: Struts Users Mailing List
  Subject: [Announce / help] STRUTS - Help needed on open 
  source project 
  
  
  
  THIS IS NOT A TECHNICAL QUESTION.
  
  
  
  Hello,
  
  
  
  I am a contributor to www.theopenstack.com
  
  
  
  We are trying to simplify  promote use of open source
  technology in building 'enterprise application'. The goal is 
  to pre-define a stack and demonstrate the use of open source 
  technologies for enterprise applications. We will be 
  demonstrating how to build the same example application, 
  step-by-step, by adding features such as DB access, caching, 
  ERP integration, Service oriented architecture support  
  Collaboration. 
  
  
  
  We are a bunch of business tier application developers and
  seriously lack STRUTS skills. We really need contributors in 
  this area.
  
  
  
  Please check out the website, about us  projects links to
  explore further if you are interested.
  
  
  
  Thanks
  
  
  
  Harshal
  
  
  
  -
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now
  
 
 
 --
 To unsubscribe, e-mail: 
 For additional commands, e-mail: 
 
 
 
 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now
 


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




RE: Pre-populating Form Bean

2002-12-20 Thread Mark Conlin


Okay, I think I am missing something major here.
By watching the log files I see the following.

1)Proccessing my pre edit Action -
customer.customAccountDetails.pre.edit 
2)Struts then looks for my ActionForm -  customerDetailsForm
3)Struts then creates my ActionForm since it can not find it.
4)The form fails validation, as described by my validation.xml file. 

The pre edit Action never runs...

The result is that I arrive at my create page with validation errors
because the validation logic tells it to return to that page.

So, how can I pre-populate a Form? What am I don't wrong here...

Mark


-Original Message-
From: Mark Conlin [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 1:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Pre-populating Form Bean


Okay so I have done the following...
I placed name=customerDetailsForm into my action declaration..
It wanted an input field as well so I added that too.

Now my form comes up and it is still not populated...

My action execute code is below... are you sure I don't need to place
the custForm back into the session somehow ?


Thanks 
Mark 

logger.debug(performAction starting);
ActionErrors errors = new ActionErrors();
ActionForward actionForward = mapping.findForward(FAILURE);
CustomerDetailsForm custForm= (CustomerDetailsForm) form;
HttpSession session = (HttpSession) request.getSession();

custForm = this.setup( session );
actionForward = mapping.findForward(SUCCESS);   

logger.debug(performAction exiting);

Action Declaration:

action path=/customer.customerAccountDetails.edit
type=com.yordata.action.customer.CustomerAccountDetailsEditAction
name=customerDetailsForm
scope=session
input=customer.account_details_view
forward name=success
path=/customer.customerAccountDetails.view.do/
forward name=failure path=customer.edit_accountdetails/
/action


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 2:13 PM
To: Struts Users Mailing List
Subject: Re: Pre-populating Form Bean

If this is a form which you've declared in your config file, and it's 
associated with this action and you're forwarding to a JSP, you really 
needn't bother sticking it into any scope.  Struts will do this for you.

 Just populate the form and return an ActionForward and let Struts do 
it's thing.

... so far as your error is concerned, I can't imagine why you're 
receiving it.  You did specify a 'name=formName' as an attribute to 
this action, right?  That's how you make the association between the 
action and the form.  I believe this value would probably be null if you

didn't specify that attribute - and I can see where that would generate 
an error.

Ah - yes.  I see your action declaration now.  Add in 
'name=customerDetailsForm' to your action line.  That will build the 
association for you.  Once you've done this, you no longer have to worry

about creating the form ... or anything like that - and it's the *only* 
way you're going to get Struts to populate the form for you 
automatically (why would it populate something if it doesn't know there 
is something to populate?).

Good luck!

Mark Conlin wrote:

 
I would like to pre-populate a form bean for an edit screen.
I have spent the last hour or two reading the archives and still I have
failed to find the help I need.
Any feedback would be appreciated.
 
I have an Action class CustomerAccountDetailsPreEditAction that
pre-populates my form.
However, I do not know how to place the form back into the session or
request so that the jsp page can find it and use it to display values.
 
request.setAttribute(mapping.getName(), myForm);
session.setAttribute(mapping.getName(), myForm); 
 
Both result in an error.
 
Here is the action declaration:
action path=/customer.customerAccountDetails.pre.edit
 
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success
path=customer.edit_accountdetails/
/action
 
 
Here is the form declaration:
form-bean name=customerDetailsForm
type=com.yordata.form.CustomerDetailsForm/
 
 
Thanks for your help,
Mark 

  


-- 
Eddie Bush





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


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


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




RE: Pre-populating Form Bean

2002-12-20 Thread Mark Conlin

This can not be the correct way to do this.

I removed any reference to the form from the pre-Action:

action path=/customer.customerAccountDetails.pre.edit
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success path=customer.edit_accountdetails/
/action

Then I placed the Form into the session in the action like this:
session.setAttribute( customerDetailsForm, custForm);

This works but, I do not want to hard-code the form reference like this.

Mark



-Original Message-
From: Mark Conlin [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 2:30 PM
To: 'Struts Users Mailing List'
Subject: RE: Pre-populating Form Bean



Okay, I think I am missing something major here.
By watching the log files I see the following.

1)Proccessing my pre edit Action -
customer.customAccountDetails.pre.edit 
2)Struts then looks for my ActionForm -  customerDetailsForm
3)Struts then creates my ActionForm since it can not find it.
4)The form fails validation, as described by my validation.xml file. 

The pre edit Action never runs...

The result is that I arrive at my create page with validation errors
because the validation logic tells it to return to that page.

So, how can I pre-populate a Form? What am I don't wrong here...

Mark


-Original Message-
From: Mark Conlin [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 1:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Pre-populating Form Bean


Okay so I have done the following...
I placed name=customerDetailsForm into my action declaration..
It wanted an input field as well so I added that too.

Now my form comes up and it is still not populated...

My action execute code is below... are you sure I don't need to place
the custForm back into the session somehow ?


Thanks 
Mark 

logger.debug(performAction starting);
ActionErrors errors = new ActionErrors();
ActionForward actionForward = mapping.findForward(FAILURE);
CustomerDetailsForm custForm= (CustomerDetailsForm) form;
HttpSession session = (HttpSession) request.getSession();

custForm = this.setup( session );
actionForward = mapping.findForward(SUCCESS);   

logger.debug(performAction exiting);

Action Declaration:

action path=/customer.customerAccountDetails.edit
type=com.yordata.action.customer.CustomerAccountDetailsEditAction
name=customerDetailsForm
scope=session
input=customer.account_details_view
forward name=success
path=/customer.customerAccountDetails.view.do/
forward name=failure path=customer.edit_accountdetails/
/action


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 2:13 PM
To: Struts Users Mailing List
Subject: Re: Pre-populating Form Bean

If this is a form which you've declared in your config file, and it's 
associated with this action and you're forwarding to a JSP, you really 
needn't bother sticking it into any scope.  Struts will do this for you.

 Just populate the form and return an ActionForward and let Struts do 
it's thing.

... so far as your error is concerned, I can't imagine why you're 
receiving it.  You did specify a 'name=formName' as an attribute to 
this action, right?  That's how you make the association between the 
action and the form.  I believe this value would probably be null if you

didn't specify that attribute - and I can see where that would generate 
an error.

Ah - yes.  I see your action declaration now.  Add in 
'name=customerDetailsForm' to your action line.  That will build the 
association for you.  Once you've done this, you no longer have to worry

about creating the form ... or anything like that - and it's the *only* 
way you're going to get Struts to populate the form for you 
automatically (why would it populate something if it doesn't know there 
is something to populate?).

Good luck!

Mark Conlin wrote:

 
I would like to pre-populate a form bean for an edit screen.
I have spent the last hour or two reading the archives and still I have
failed to find the help I need.
Any feedback would be appreciated.
 
I have an Action class CustomerAccountDetailsPreEditAction that
pre-populates my form.
However, I do not know how to place the form back into the session or
request so that the jsp page can find it and use it to display values.
 
request.setAttribute(mapping.getName(), myForm);
session.setAttribute(mapping.getName(), myForm); 
 
Both result in an error.
 
Here is the action declaration:
action path=/customer.customerAccountDetails.pre.edit
 
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success
path=customer.edit_accountdetails/
/action
 
 
Here is the form declaration:
form-bean name=customerDetailsForm
type=com.yordata.form.CustomerDetailsForm/
 
 
Thanks for your help,
Mark 

  


-- 
Eddie Bush





--
To unsubscribe, e-mail:
mailto:[EMAIL 

RE: [Tiles] definitionsFactory problem

2002-12-20 Thread Greg.Reddin
 Take a look the controllerClass attribute of the definition 
 element in the
 tiles config.  It allows you to specify a controller class of 
 type package
 org.apache.struts.tiles.Controller.  This class is executed 
 before the tile
 it is associated with is rendered and can be used to 
 dynamically alter the
 component context.
 

I've thought about this approach and I think it is actually a better approach than 
using ActionForward properties to modify things at runtime.  However, it wouldn't help 
in the case I was working on.  I've gotten it to work by extending ActionForward and 
TilesRequestProcessor, but I can't say for sure that my enhancement adds any real 
value.

However, it does seem like there would be valid reasons to use properties from an 
ActionForward when forwarding to a Tiles definition, and the way TilesRequestProcessor 
is currently written, it's a little hokey to extend it that way.  But, that's a 
discussion for the dev list.

 I personally would prefer something a little more 
 declarative, something
 similar to Cocoon's Selectors.
 
 So you could do something like the following
 
  select type=someType
  when test=foo
 put name=body value=/foo.jsp/
  /when
  otherwise
  put name=bar value=/bar.jsp/
   /otherwise
   /selector
 

I've considered this type of thing as well and I think it would be very useful.  I'm 
glad I'm not the only one who has thought of it.

Greg

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




RE: Pre-populating Form Bean

2002-12-20 Thread Robert Taylor
Don't validate the pre edit Action. This should allow your form to propogate
to the Action.execute() where you can populate the form. Make sure you are
forwarding to the destination page and not redirecting.
Your almost there, don't give up yet. So set validate=false in the struts
config file for the pre edit action mapping.

robert

 -Original Message-
 From: Mark Conlin [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 2:30 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Pre-populating Form Bean




 Okay, I think I am missing something major here.
 By watching the log files I see the following.

 1)Proccessing my pre edit Action -
 customer.customAccountDetails.pre.edit
 2)Struts then looks for my ActionForm -  customerDetailsForm
 3)Struts then creates my ActionForm since it can not find it.
 4)The form fails validation, as described by my validation.xml file.

 The pre edit Action never runs...

 The result is that I arrive at my create page with validation errors
 because the validation logic tells it to return to that page.

 So, how can I pre-populate a Form? What am I don't wrong here...

 Mark


 -Original Message-
 From: Mark Conlin [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 1:38 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Pre-populating Form Bean


 Okay so I have done the following...
 I placed name=customerDetailsForm into my action declaration..
 It wanted an input field as well so I added that too.

 Now my form comes up and it is still not populated...

 My action execute code is below... are you sure I don't need to place
 the custForm back into the session somehow ?


 Thanks
 Mark

 logger.debug(performAction starting);
 ActionErrors errors   = new ActionErrors();
 ActionForward actionForward   = mapping.findForward(FAILURE);
 CustomerDetailsForm custForm  = (CustomerDetailsForm) form;
 HttpSession session = (HttpSession) request.getSession();

 custForm = this.setup( session );
 actionForward = mapping.findForward(SUCCESS);

 logger.debug(performAction exiting);

 Action Declaration:

 action path=/customer.customerAccountDetails.edit
 type=com.yordata.action.customer.CustomerAccountDetailsEditAction
   name=customerDetailsForm
   scope=session
   input=customer.account_details_view
 forward name=success
 path=/customer.customerAccountDetails.view.do/
 forward name=failure path=customer.edit_accountdetails/
 /action


 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 2:13 PM
 To: Struts Users Mailing List
 Subject: Re: Pre-populating Form Bean

 If this is a form which you've declared in your config file, and it's
 associated with this action and you're forwarding to a JSP, you really
 needn't bother sticking it into any scope.  Struts will do this for you.

  Just populate the form and return an ActionForward and let Struts do
 it's thing.

 ... so far as your error is concerned, I can't imagine why you're
 receiving it.  You did specify a 'name=formName' as an attribute to
 this action, right?  That's how you make the association between the
 action and the form.  I believe this value would probably be null if you

 didn't specify that attribute - and I can see where that would generate
 an error.

 Ah - yes.  I see your action declaration now.  Add in
 'name=customerDetailsForm' to your action line.  That will build the
 association for you.  Once you've done this, you no longer have to worry

 about creating the form ... or anything like that - and it's the *only*
 way you're going to get Struts to populate the form for you
 automatically (why would it populate something if it doesn't know there
 is something to populate?).

 Good luck!

 Mark Conlin wrote:

 
 I would like to pre-populate a form bean for an edit screen.
 I have spent the last hour or two reading the archives and still I have
 failed to find the help I need.
 Any feedback would be appreciated.
 
 I have an Action class CustomerAccountDetailsPreEditAction that
 pre-populates my form.
 However, I do not know how to place the form back into the session or
 request so that the jsp page can find it and use it to display values.
 
 request.setAttribute(mapping.getName(), myForm);
 session.setAttribute(mapping.getName(), myForm);
 
 Both result in an error.
 
 Here is the action declaration:
 action path=/customer.customerAccountDetails.pre.edit
 
 type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
 forward name=success
 path=customer.edit_accountdetails/
 /action
 
 
 Here is the form declaration:
 form-bean name=customerDetailsForm
 type=com.yordata.form.CustomerDetailsForm/
 
 
 Thanks for your help,
 Mark
 
 
 

 --
 Eddie Bush





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


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

Re: Pre-populating Form Bean

2002-12-20 Thread Mark Lowe
As a side note I'd watch out putting dots in your actions .. I was doing the
same and it worked .. and then i was getting an error that complained it
could find the action...

perhaps it was the release i was using or something, but i'd hate someone
else to wash time out over this as well.. If its working however then don't
fix it...



- Original Message -
From: Mark Conlin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 8:42 PM
Subject: RE: Pre-populating Form Bean



 This can not be the correct way to do this.

 I removed any reference to the form from the pre-Action:

 action path=/customer.customerAccountDetails.pre.edit
 type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
 forward name=success path=customer.edit_accountdetails/
 /action

 Then I placed the Form into the session in the action like this:
 session.setAttribute( customerDetailsForm, custForm);

 This works but, I do not want to hard-code the form reference like this.

 Mark



 -Original Message-
 From: Mark Conlin [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 2:30 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Pre-populating Form Bean



 Okay, I think I am missing something major here.
 By watching the log files I see the following.

 1)Proccessing my pre edit Action -
 customer.customAccountDetails.pre.edit
 2)Struts then looks for my ActionForm -  customerDetailsForm
 3)Struts then creates my ActionForm since it can not find it.
 4)The form fails validation, as described by my validation.xml file.

 The pre edit Action never runs...

 The result is that I arrive at my create page with validation errors
 because the validation logic tells it to return to that page.

 So, how can I pre-populate a Form? What am I don't wrong here...

 Mark


 -Original Message-
 From: Mark Conlin [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 1:38 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Pre-populating Form Bean


 Okay so I have done the following...
 I placed name=customerDetailsForm into my action declaration..
 It wanted an input field as well so I added that too.

 Now my form comes up and it is still not populated...

 My action execute code is below... are you sure I don't need to place
 the custForm back into the session somehow ?


 Thanks
 Mark

 logger.debug(performAction starting);
 ActionErrors errors = new ActionErrors();
 ActionForward actionForward = mapping.findForward(FAILURE);
 CustomerDetailsForm custForm = (CustomerDetailsForm) form;
 HttpSession session = (HttpSession) request.getSession();

 custForm = this.setup( session );
 actionForward = mapping.findForward(SUCCESS);

 logger.debug(performAction exiting);

 Action Declaration:

 action path=/customer.customerAccountDetails.edit
 type=com.yordata.action.customer.CustomerAccountDetailsEditAction
 name=customerDetailsForm
 scope=session
 input=customer.account_details_view
 forward name=success
 path=/customer.customerAccountDetails.view.do/
 forward name=failure path=customer.edit_accountdetails/
 /action


 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 2:13 PM
 To: Struts Users Mailing List
 Subject: Re: Pre-populating Form Bean

 If this is a form which you've declared in your config file, and it's
 associated with this action and you're forwarding to a JSP, you really
 needn't bother sticking it into any scope.  Struts will do this for you.

  Just populate the form and return an ActionForward and let Struts do
 it's thing.

 ... so far as your error is concerned, I can't imagine why you're
 receiving it.  You did specify a 'name=formName' as an attribute to
 this action, right?  That's how you make the association between the
 action and the form.  I believe this value would probably be null if you

 didn't specify that attribute - and I can see where that would generate
 an error.

 Ah - yes.  I see your action declaration now.  Add in
 'name=customerDetailsForm' to your action line.  That will build the
 association for you.  Once you've done this, you no longer have to worry

 about creating the form ... or anything like that - and it's the *only*
 way you're going to get Struts to populate the form for you
 automatically (why would it populate something if it doesn't know there
 is something to populate?).

 Good luck!

 Mark Conlin wrote:

 
 I would like to pre-populate a form bean for an edit screen.
 I have spent the last hour or two reading the archives and still I have
 failed to find the help I need.
 Any feedback would be appreciated.
 
 I have an Action class CustomerAccountDetailsPreEditAction that
 pre-populates my form.
 However, I do not know how to place the form back into the session or
 request so that the jsp page can find it and use it to display values.
 
 request.setAttribute(mapping.getName(), myForm);
 session.setAttribute(mapping.getName(), myForm);
 
 Both 

RE: no getter method for property phoneList

2002-12-20 Thread Greg.Reddin
Here's some questions:

1) If you reverse the order of the iterate tags, iterating over phoneList first and 
addressList second, do you get the same results?  

2) Does the address information render correctly if you comment out the phoneList 
info?  

3) Do you get the same error if you comment out the addressList iteration and do only 
the phoneList iteration?

Maybe you should post the entire JSP or at least more of it.  Is there something 
happening to the party bean between the two iterate tags?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 20, 2002 12:18 PM
 To: Struts Users Mailing List
 Subject: no getter method for property phoneList
 
 
 
 I'm getting desperate with my problem.
 
 I have a very simple class named Party defined as
 
 public class Party() {
 
  public Party()
 
  ArrayList phoneList_ = new ArrayList();
  ArrayList addressList_ = new ArrayList();
 
  public ArrayList getPhoneList() {
 
   return phoneList_;
 
  }
 
  public void setPhoneList(ArrayList list) {
 
   phoneList_ = list;
 
  }
 
  public ArrayList getAddressList() {
 
   return addressList_;
 
  }
 
  public void setAddressList(ArrayList list) {
 
   addressList_ = list;
 
  }
 
 }
 
 
 When I do a logic:iterate to iterate on both lists
 
 logic:iterate name=party property=addressList id=test
 
 /logic:iterate
 
 
 logic:iterate name=party property=phoneList id=test1
 
 /logic:iterate
 
 
 iterating on addressList is fine
 
 However I get a
 
 : No getter method for property phoneList of bean party
 
 I'm using VaJava 4.0 and I;ve checked everything and can't 
 find anything wrong with my classes.
 
 Has anybody encountered and solved this problem before?
 
 Thanks,
 
 Raffy
 **
 Please Note:
 The information in this E-mail message, and any files transmitted
 with it, is confidential and may be legally privileged.  It is
 intended only for the use of the individual(s) named above.  If you
 are the intended recipient, be aware that your use of any confidential
 or personal information may be restricted by state and federal
 privacy laws.  If you, the reader of this message, are not the
 intended recipient, you are hereby notified that you should not
 further disseminate, distribute, or forward this E-mail message.
 If you have received this E-mail in error, please notify the sender
 and delete the material from any computer.  Thank you.
 **
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




javascript and STRUTS

2002-12-20 Thread Eric C. Hein
Background:
In my form I have a field city that the user selects from a drop down list.  The 
city dropdown is initially setup to have one option that cues the user to select a 
county first (-1, select county first).  After the user selects a county the options 
list for city is then set to a javascript array of cities that are in the selected 
county. 

Problem:
After registering the user can edit his/her profile.  I'm having no trouble getting 
the county from the db to the html:select tag, but the city tag is not working.  
When I call the javascript function that loads the cities I do get the correct cities 
(those corresponding to the county that came from the db).  I cannot however, set the 
correct value of the city field because the bean property city has already been 
overwritten by -1.  

Is there anyway to capture the value of the bean before it is overwritten?

Thanks
- Eric



reset doesn't work well

2002-12-20 Thread Doug Ogateter

Hi:
I have a problem with reset button. In my jsp file, I have html:reset/. In my form 
class, I have: 

  public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
   }

in the struts-config.xml file, it has:

   actionpath=/xxx
   type=yyy
   name=myForm
  scope=request

  input=/zzz.jsp
  forward name=success path=/zzz.jsp/
/action

I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed  with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals



Re: javascript and STRUTS

2002-12-20 Thread Rick Reumann


On Friday, December 20, 2002, 3:29:15 PM, Eric wrote:

ECH Is there anyway to capture the value of the bean before it is overwritten?

Since your using javascript coulnd't you set a hidden field
oldValue that you can set before you do any overwriting? Then you
would have access to the old value in whatever 'new' stuff you are
doing.


-- 

Rick
mailto:[EMAIL PROTECTED]


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




RE: reset doesn't work well

2002-12-20 Thread Siggelkow, Bill
The html:reset really has nothing to do with the reset method of your form ... 
instead this renders an input type=reset button that will reset the form fields to 
their default state as known by the browser.   Therefore, in the case when you have 
returned to the form after a validation failure the default values are the values in 
the form bean returned to the input page.  I see a couple of options ..

1) You could have your validate() method clear out the fields that erroneous (or clear 
them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the 
pre-populated values you could do this with an onclick event calling JavaScript.

Personally, I would go with option 1 as it will not confuse the user about what the 
Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have html:reset/. In my form 
class, I have: 

  public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
   }

in the struts-config.xml file, it has:

   actionpath=/xxx
   type=yyy
   name=myForm
  scope=request

  input=/zzz.jsp
  forward name=success path=/zzz.jsp/
/action

I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed  with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

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




Re: reset doesn't work well

2002-12-20 Thread Mark Lepkowski
In my experience, the reset condition is the state that the form was in when it was 
loaded.  So if you have a checkbox set when the form is loaded, uncheck it, and click 
[Reset], the checkbox becomes checked again.

- Original Message - 
From: Doug Ogateter [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 3:37 PM
Subject: reset doesn't work well


 
 Hi:
 I have a problem with reset button. In my jsp file, I have
 html:reset/. In my form class, I have: 
 
   public void reset(ActionMapping mapping, HttpServletRequest request) {
 amount = null;
 
 password = null;
}
 
 in the struts-config.xml file, it has:
 
actionpath=/xxx
type=yyy
name=myForm
   scope=request
 
   input=/zzz.jsp
   forward name=success path=/zzz.jsp/
 /action
 
 I filled out the fields, if I click reset button before submit the form,
 the fields are cleared. But if I submit the form first, and it detects
 some error(for example: the password is not correct), the form is showed
 with error message. In this case, when I click reset button, the fields
 are not cleared. What is wrong with this. I really want the fields can
 be cleared if errors are detected. Could someone help me out?
 
 Thanks.
 
 Doug
 
 
 
 -
 Post your free ad now! Yahoo! Canada Personals
 


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




[Book Review] Struts Kick Start

2002-12-20 Thread Chappell, Simon P
Book Review
---

(In the Slashdot book review format)

Struts Kick Start

I started learning how to use the Struts framework in late in 2001, after I became 
fed-up with hacking web applications together with the digital equivalent of 
Duct-tape Engineering. At that time there were no books available for the budding 
Struts developer, Read The Fine Manual was not an option ... you read the website, 
you read the code or you asked questions on the mailing list. This situation finally 
changed this fall with the release of a flurry of titles dedicated to Struts. I 
present here my thoughts on one of the latest: Struts Kick Start.

Author: James Turner and Kevin Bedell
Pages:  481 (29 page index)
Publisher:  Sams
Rating: 9/10 (Just shy of perfect)
Reviewer:   Simon P. Chappell
ISBN:   0-672-32472-5
Summary:You need this book.

What is Struts?

Struts is a framework for developing web applications. It is a distilation of the 
current set of known best practices into a working code set that can be extended to 
meet almost any web application requirements. It part of the Jakarta Project at the 
Apache Software Foundation.

What do I know about Struts?

I have been developing web applications, using Java, for four years and using struts 
for over a year, and am a regular participant on the Struts mailing list. I was also a 
technical reviewer for one of the other Struts Books released this fall and was 
recently invited to speak at the University of Wisconsin, Eau Claire on the use of 
Struts.

What's good about this book?

There are many excellent things that I could point to. I particularly like the obvious 
depth of research that accompanies this book. There is a very interesting history of 
the development of the MVC design pattern and they even name the inventor. Do you know 
who invented MVC? If you want to know, buy the book!

The chapters cover everything that you will need to know, in the order you are most 
likely to need to know it. There's even a chapter explaining the struts-config.xml 
file's DTD! (You may want to skip that on the first few readings :-)

There is good coverage of the Struts taglibs. I see a lot of questions about these on 
the mailing lists, so this information is very timely and it looks very well explained.

I like the coverage of other open source tools that work well with Struts. This is an 
important point because Struts does not do everything for you (by design), so there 
will be areas that will benefit from other tools. I'm looking forward to trying out 
some of their recommendations and easing my own Struts development lifecycles.

What's not so good?

Just one niggle, and it's more of a programming style issue, but in their example code 
they have references to their business objects. They explain that it is important to 
separate out business logic from action logic, which it is, but then proceed to use 
their business object within the action.

Now, I realise that example code is not the same thing as robust, production-ready 
code, but when people are first learning a language or framework, they tend to copy 
exactly what they see in the book they are learning from. Even though example code 
should be light on error checking, it should be heavy on correctness and good style.

Should you rush out and buy it?

If you are about to use Struts on a project, are new to Struts and need dead tree 
documentation for those RTFM moments or are evaluating Struts for future projects, 
then you absolutely need this book.

If you are an intermediate Struts user, then this book would still be very useful to 
you and I can certainly recommend it.

If you are an experienced Struts user, then you've almost certainly exchanged emails 
with James or Kevin, on the Struts mailing list, so you can make your own mind up!


Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

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




Re: Positioning and naming of resource (.properties) files.

2002-12-20 Thread bbalmer
If your ApplicationResources.properties file is located 
under /classes/resources, then your init-param should look like:

init-param
  param-nameapplication/param-name
  param-valueresources.ApplicationResources/param-value
/init-param





-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 3:49 AM
To: [EMAIL PROTECTED]
Subject: Positioning and naming of resource (.properties) files.

Hi all,

I am currently having a small problem with the placing of .properties files 
within the structure of the struts war file created by build.xml.

I have placed my two .properties files (ApplicationResources.properties and
ApplicationResources_de.properties) within the WEB-INF/src/java/resources 
directory and built the war file.  This has then placed the two files in the 
WEB-INF/Classes/resources directory.

I have also included an init-param entry in web.xml as follows

[code]
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param
[/code]

and have the following lines in my .sjp

[code]
(snip...)
head
html:base/
title
bean:message key=index.title/
/title
/head
(snip...)
[/code]

But I am getting the following error when I access the page.

[error-msg]
javax.servlet.ServletException: Missing message for key index.title
at org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImp
l.java:494)
at org.apache.jsp.BookView_jsp._jspService(BookView_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:2
04)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
(snip...)
[/error-msg]

Could someone tell me which bit I have written wrong please.

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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


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




RE: reset doesn't work well

2002-12-20 Thread Doug Ogateter

Hi, Bill:
Thank you for reply.
The ActionForm api says:

public void reset(ActionMapping mapping,  
javax.servlet.http.HttpServletRequest request)

   Reset all bean properties to their default state. This method is called before the 
properties are repopulated by the controller servlet. 
The default implementation does nothing. Subclasses should override this method to 
reset all bean properties to default values. 

   
 

   
I have overitten the reset method to reset both amount and password to null. From my 
understanding, whenever user clicks reset button, it will call the reset method, 
therefore, all the fields should be cleared.

   
Please correct me if I am wrong.

   
Thanks

 Siggelkow, Bill [EMAIL PROTECTED] wrote:The really has nothing to do with 
the reset method of your form ... instead this renders an  [input]  button that will 
reset the form fields to their default state as known by the browser. Therefore, in 
the case when you have returned to the form after a validation failure the default 
values are the values in the form bean returned to the input page. I see a couple of 
options ..

1) You could have your validate() method clear out the fields that erroneous (or clear 
them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the 
pre-populated values you could do this with an onclick event calling JavaScript.

Personally, I would go with option 1 as it will not confuse the user about what the 
Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have . In my form class, I have: 

public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
}

in the struts-config.xml file, it has:

type=yyy
name=myForm
scope=request

input=/zzz.jsp



I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

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



-
Post your free ad now! Yahoo! Canada Personals



code too large for try statement

2002-12-20 Thread Michael Marrotte
I'm using lots of Struts custom jsp tags, e.g. logic, html, and bean.  The
JSP file size is about 27K.  I'm getting the following error:

500 Servlet Exception
/mainMenu.jsp:652: code too large for try statement
} catch (java.lang.Throwable _jsp_e) {
  ^
/mainMenu.jsp:46: code too large for try statement
try {
^
2 errors


Resin 2.1.4 (built Fri Aug 2 14:16:52 PDT 2002)

Are the limits to the number of tags, JSP file size, etc?

Any help is greatly appreciated.

Thanks,

--Mike


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




Re: Pre-populating Form Bean

2002-12-20 Thread Austin Lowry
Mark,

We just happen to be fighting a similar problems today. Someone please 
correct me if I am off base here, which jugding by my results I am, but 
shouldn't this work (psudo-code):

1. MyForm myForm = (MyForm)form;
2. myForm.getValues() -- myStateObject.setValues();
3. myStateObject.save();
4. MyNextForm myNextForm = new MyNextForm();
5. myStateObject.getValues() -- myNextForm.setValues();
6. request.setAttribute(nameFromStrutsConfig, myNextForm);
7. return mapping.findForward(success);

It is then my understanding that the JSP that we are forwarding to will 
then retrieve the request object attribute nameFromStrutsConfig and 
attempt to populate the JSP form from that object. I believe that the 
name that the JSP is attempting to use is the value of the action 
parameter name from the struts-config.xml file.

Am I off base here? Thanks in advance for any help.

Mark Lowe wrote:

As a side note I'd watch out putting dots in your actions .. I was doing the
same and it worked .. and then i was getting an error that complained it
could find the action...

perhaps it was the release i was using or something, but i'd hate someone
else to wash time out over this as well.. If its working however then don't
fix it...



- Original Message -
From: Mark Conlin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 8:42 PM
Subject: RE: Pre-populating Form Bean


 

This can not be the correct way to do this.

I removed any reference to the form from the pre-Action:

action path=/customer.customerAccountDetails.pre.edit
type=com.yordata.action.customer.CustomerAccountDetailsPreEditAction
forward name=success path=customer.edit_accountdetails/
/action

Then I placed the Form into the session in the action like this:
session.setAttribute( customerDetailsForm, custForm);

This works but, I do not want to hard-code the form reference like this.

Mark



-Original Message-
From: Mark Conlin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 2:30 PM
To: 'Struts Users Mailing List'
Subject: RE: Pre-populating Form Bean



Okay, I think I am missing something major here.
By watching the log files I see the following.

1)Proccessing my pre edit Action -
customer.customAccountDetails.pre.edit
2)Struts then looks for my ActionForm -  customerDetailsForm
3)Struts then creates my ActionForm since it can not find it.
4)The form fails validation, as described by my validation.xml file.

The pre edit Action never runs...

The result is that I arrive at my create page with validation errors
because the validation logic tells it to return to that page.

So, how can I pre-populate a Form? What am I don't wrong here...

Mark


-Original Message-
From: Mark Conlin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 1:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Pre-populating Form Bean


Okay so I have done the following...
I placed name=customerDetailsForm into my action declaration..
It wanted an input field as well so I added that too.

Now my form comes up and it is still not populated...

My action execute code is below... are you sure I don't need to place
the custForm back into the session somehow ?


Thanks
Mark

logger.debug(performAction starting);
ActionErrors errors = new ActionErrors();
ActionForward actionForward = mapping.findForward(FAILURE);
CustomerDetailsForm custForm = (CustomerDetailsForm) form;
HttpSession session = (HttpSession) request.getSession();

custForm = this.setup( session );
actionForward = mapping.findForward(SUCCESS);

logger.debug(performAction exiting);

Action Declaration:

action path=/customer.customerAccountDetails.edit
type=com.yordata.action.customer.CustomerAccountDetailsEditAction
name=customerDetailsForm
scope=session
input=customer.account_details_view
forward name=success
path=/customer.customerAccountDetails.view.do/
forward name=failure path=customer.edit_accountdetails/
/action


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 2:13 PM
To: Struts Users Mailing List
Subject: Re: Pre-populating Form Bean

If this is a form which you've declared in your config file, and it's
associated with this action and you're forwarding to a JSP, you really
needn't bother sticking it into any scope.  Struts will do this for you.

Just populate the form and return an ActionForward and let Struts do
it's thing.

... so far as your error is concerned, I can't imagine why you're
receiving it.  You did specify a 'name=formName' as an attribute to
this action, right?  That's how you make the association between the
action and the form.  I believe this value would probably be null if you

didn't specify that attribute - and I can see where that would generate
an error.

Ah - yes.  I see your action declaration now.  Add in
'name=customerDetailsForm' to your action line.  That will build the
association for you.  Once you've done this, you no longer have to worry


RE: reset doesn't work well

2002-12-20 Thread Siggelkow, Bill
Doug, I think you are misreading or misinformed about both the reset button and the 
reset method.  The reset button does a client-side reset of the form -- there is no 
interaction with the server.

The reset method is called by the ActionServlet when a form is reused -- but I do not 
think that it is called on when validate returns false -- in fact, I would think that 
you would not want it called so that the user does not lose all of their previous 
input.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 4:17 PM
To: Struts Users Mailing List
Subject: RE: reset doesn't work well



Hi, Bill:
Thank you for reply.
The ActionForm api says:

public void reset(ActionMapping mapping,  
javax.servlet.http.HttpServletRequest request)

   Reset all bean properties to their default state. This method is called before the 
properties are repopulated by the controller servlet. 
The default implementation does nothing. Subclasses should override this method to 
reset all bean properties to default values. 

   
 

   
I have overitten the reset method to reset both amount and password to null. From my 
understanding, whenever user clicks reset button, it will call the reset method, 
therefore, all the fields should be cleared.

   
Please correct me if I am wrong.

   
Thanks

 Siggelkow, Bill [EMAIL PROTECTED] wrote:The really has nothing to do with 
the reset method of your form ... instead this renders an  [input]  button that will 
reset the form fields to their default state as known by the browser. Therefore, in 
the case when you have returned to the form after a validation failure the default 
values are the values in the form bean returned to the input page. I see a couple of 
options ..

1) You could have your validate() method clear out the fields that erroneous (or clear 
them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the 
pre-populated values you could do this with an onclick event calling JavaScript.

Personally, I would go with option 1 as it will not confuse the user about what the 
Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have . In my form class, I have: 

public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
}

in the struts-config.xml file, it has:

type=yyy
name=myForm
scope=request

input=/zzz.jsp



I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

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



-
Post your free ad now! Yahoo! Canada Personals

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




  1   2   >