Re: problem with List-Backed Form

2005-01-15 Thread Kishore Senji
On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
 Hi, ok I am trying to get my Dynamic List-Backed form to work, no
 luck, here is what I have so far.
 
 ActionForm with a List in it:
 
  public ArrayList getFields() {
return fields;
  }
 
  public void setFields(ArrayList fields) {
this.fields = fields;
  }
 
 Now, a field itslelf is a bean:
 
 public class FormField {
  private String label;
  private String name;
  private String value;
  private String type;
  private java.util.ArrayList props;
  private boolean required;
 ...
 getter and setters here
 }
 
 There is an Action that gets the info from the database and populates
 into the ActionForm, no problem. Now Jsp page has something like this:
 
c:forEach items=${formActionForm.fields} var=field
tr
  tdhtml:text property=label name=field//td
  td
html:select property=type name=field
html:optionsCollection name=definitionFields/
/html:select
  /td
/   and so on for all the properties
/tr
/c:forEach
 

Try something like this;

logic:iterate name=formActionForm property=fields indexId=index
id=field
  tr
   td
  html:text property='%=fields[+index.intValue()+]%'/
   /td
   td
  html:select property='%=fields[+index.intValue()+]%'
html:optionsCollection name=definitionFields/
  /html:select
   /td
   /// similarly for other fields
  /tr
/logic:iterate

The trick is to start from the form level and adjusting the property
accordingly.

for more info: http://struts.apache.org/faqs/indexedprops.html

 So my question is, how do I make it so when this values are changed
 and submitted they are changed in the ActionForm ?? IS there a way to
 have that happen automatically like with a normal actionform or I have
 to do it programatically?
 
 I am really stuck here!!!
 
 Oleg
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: problem with List-Backed Form

2005-01-15 Thread Kishore Senji
Sorry forgot to tack on the actual property

logic:iterate name=formActionForm property=fields indexId=index
id=field
 tr
  td
 html:text property='%=fields[+index.intValue()+].label%'/
  /td
  td
 html:select property='%=fields[+index.intValue()+].type%'
   html:optionsCollection name=definitionFields/
 /html:select
  /td
  /// similarly for other fields
 /tr
/logic:iterate



On Sat, 15 Jan 2005 02:32:48 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
 On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
  Hi, ok I am trying to get my Dynamic List-Backed form to work, no
  luck, here is what I have so far.
 
  ActionForm with a List in it:
 
   public ArrayList getFields() {
 return fields;
   }
 
   public void setFields(ArrayList fields) {
 this.fields = fields;
   }
 
  Now, a field itslelf is a bean:
 
  public class FormField {
   private String label;
   private String name;
   private String value;
   private String type;
   private java.util.ArrayList props;
   private boolean required;
  ...
  getter and setters here
  }
 
  There is an Action that gets the info from the database and populates
  into the ActionForm, no problem. Now Jsp page has something like this:
 
 c:forEach items=${formActionForm.fields} var=field
 tr
   tdhtml:text property=label name=field//td
   td
 html:select property=type name=field
 html:optionsCollection name=definitionFields/
 /html:select
   /td
 /   and so on for all the properties
 /tr
 /c:forEach
 
 
 Try something like this;
 
 logic:iterate name=formActionForm property=fields indexId=index
 id=field
  tr
   td
  html:text property='%=fields[+index.intValue()+]%'/
   /td
   td
  html:select property='%=fields[+index.intValue()+]%'
html:optionsCollection name=definitionFields/
  /html:select
   /td
   /// similarly for other fields
  /tr
 /logic:iterate
 
 The trick is to start from the form level and adjusting the property
 accordingly.
 
 for more info: http://struts.apache.org/faqs/indexedprops.html
 
  So my question is, how do I make it so when this values are changed
  and submitted they are changed in the ActionForm ?? IS there a way to
  have that happen automatically like with a normal actionform or I have
  to do it programatically?
 
  I am really stuck here!!!
 
  Oleg
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: LookupDispatchAction Help

2005-01-15 Thread Kishore Senji
On Fri, 14 Jan 2005 18:01:25 -0200, Flávio Maldonado
[EMAIL PROTECTED] wrote:
 Hello...
 
 When I use this tags above, the Button works well, but the Link doesn't
 work.
 
 html:form action=/user
 html:submit property=actionbean:message
 key=button.new//html:submit
 html:link page=/user.do?action='button.new'New/html:link

Try the following code below

%
String message =
org.apache.struts.taglib.TagUtils.getInstance().message(pageContext,
org.apache.struts.Globals.MESSAGES_KEY,
org.apache.struts.Globals.LOCALE_KEY,
button.new);
pageContext.setAttribute(message, message);
%

html:link action=/user paramId=action paramName=messageNew/html:link

With a LookupDispatchAction you should send the value for a key in the
ApplicationResources.properties file and not the key as a request
parameter

 /html:form
 
 At the first moment, both are putting the button.new into the action
 variable.
 When I press the button, works well. But I need that the link do the same
 function of the button but I receive this error message when I try click on
 the link:
 
 java.lang.NullPointerException
java.lang.Class.searchMethods(Class.java:1877)
java.lang.Class.getMethod0(Class.java:1901)
java.lang.Class.getMethod(Class.java:984)

 org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:332)

 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:264)

 org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:234)

 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)

 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
 I extend my Action from LookupDispatchAction, and I implement this method...
 
protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put(button.new, newUser);
return map;
}
 
 With this mapping, I hope that the method above be executed...
 
 public ActionForward newUser(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response){
   return mapping.getInputForward();
 }
 
 but it's not happening...
 
 Some body can Help-me?
 
 I'm sorry for my bad english... ;)
 
 Thanks...
 
 Flávio Vilasboas Maldonado
 Diretor de Desenvolvimento
 SedNet Soluções em TI
 (35)3471-9381
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Errors with 'validwhen' rule

2005-01-15 Thread Vamsee Kanakala
Hi List,
I have something like this in my validation.xml:
field property=stdCode depends=validwhen
arg0 key=entry.std/
  varvar-nametest/var-name
 var-value
  ((phone != null) or (mobile == null) or (*this* != null))
 /var-value
  /var   
/field

But I have some errors like this:
line 1:38: expecting RPAREN, found 'or'
   at antlr.Parser.match(Parser.java:213)
   at 
org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.java:384)
   at 
org.apache.struts.validator.validwhen.ValidWhenParser.expression(ValidWhenParser.java:369)
   at 
org.apache.struts.validator.validwhen.ValidWhen.validateValidWhen(ValidWhen.java:114)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...

I checked Struts Validator guide, I can't find anything wrong with the 
validation rule. Please help. I also have a doubt: Can I also use 'and' 
in the above cases, if I need it?

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


Re: Errors with 'validwhen' rule

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: Errors with 'validwhen' rule

2005-01-15 Thread Kishore Senji
On Sat, 15 Jan 2005 15:18:33 +0530, Vamsee Kanakala
[EMAIL PROTECTED] wrote:
 Hi List,
 
 I have something like this in my validation.xml:
 
 field property=stdCode depends=validwhen
 arg0 key=entry.std/
   varvar-nametest/var-name
  var-value
   ((phone != null) or (mobile == null) or (*this* != null))

(((phone != null) or (mobile == null)) or (*this* != null))


  /var-value
   /var
 /field
 
 But I have some errors like this:
 
 line 1:38: expecting RPAREN, found 'or'
at antlr.Parser.match(Parser.java:213)
at
 org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.java:384)
at
 org.apache.struts.validator.validwhen.ValidWhenParser.expression(ValidWhenParser.java:369)
at
 org.apache.struts.validator.validwhen.ValidWhen.validateValidWhen(ValidWhen.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...
 
 I checked Struts Validator guide, I can't find anything wrong with the
 validation rule. Please help. I also have a doubt: Can I also use 'and'
 in the above cases, if I need it?

http://struts.apache.org/userGuide/dev_validator.html
Probably you missed the validWhen rules; Search for A few quick notes
on the grammer on the above page


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


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



struts html:base tag and port 8080

2005-01-15 Thread Vilpesh Mistry
hi,
iam using struts and making a website.

During the development phase, we had used the default
port 8080.
so to access my webpage i used to write,
http://localhost:8080/simliv/action/welcome

well all files in my jsp pages use struts html:base
tag

so under view source for any jsp page,
the url looks like
http://localhost:8080/simliv/welcome.jsp

well now its deployment time,after deploying,i have
been asked to remove
the port number ie 8080 coming after localhost.

I think this whole is configuring apache and tomcat,
please specify how do i configure tomcat so that when
i access 

http://localhost/simliv/action/welcome ,

i get the same welcome page and all other pages
without the port number after the localhost

The problem been that struts carries the base address
8080 in all other pages if html:base tag is used.

Will i have to remove html:base tag(which i don't
want to do)

More info provided regarding html:base tag is also
great

thanks 



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: struts html:base tag and port 8080

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: Errors with 'validwhen' rule

2005-01-15 Thread Vamsee Kanakala
Kishore Senji wrote:
http://struts.apache.org/userGuide/dev_validator.html
Probably you missed the validWhen rules; Search for A few quick notes
on the grammer on the above page
 

Thanks, I really missed that part. I have one more problem:
My form is populating a drop-down like this:
select name=pool
   option value=SelectSelect/option
  c:forEach items=${sessionScope.pools} var=currPool
option value='c:out 
value=${currPool.value}/'c:out value=${currPool.label}//option
  /c:forEach
/select

And, my validator.xml has this:
field property=pool depends=integer
 arg0 key=entry.pool/
/field
I'm trying to make the selection of a value compulsory. But, The error 
doesn't show up
after I try to submit without selecting anything. Isn't it supposed to 
say Pool must be an integer or something?

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


Re: Re: Errors with 'validwhen' rule

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: LookupDispatchAction Help

2005-01-15 Thread Dakota Jack
You can do the same thing WITHOUT the parameter values in the
struts-config.xml and the following code:

html:form action=/user
html:submit property=new.methodbean:message
key=button.new//html:submit
html:link page=/user.do?new.method=''New/html:link
/html:form

if you what the method to be new(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) and
you use the following class (with logging changes) instead of
LookupDispatchAction:


public abstract class StateBaseAction
extends Action {
  private static final String   DISPATCH_METHOD_SUFFIX = .method;
  private static final String   EXECUTE= execute;
  private static final String   PERFORM= perform;
  private static final String   DISPATCH_RECURSIVE = dispatch.recursive;
  private static final String   DISPATCH_METHOD= dispatch.method;
  protectedHashMap  methods= new HashMap();
  protectedClass [] types  = { ActionMapping.class,
   ActionForm.class,
  
HttpServletRequest.class,
  
HttpServletResponse.class };

  public abstract ActionForward execute(ActionMapping   mapping,
ActionForm  form,
HttpServletRequest  request,
HttpServletResponse response)
  throws IOException,
 ServletException,
 NoSuchMethodException;

  protected void saveMessages(HttpServletRequest request,
  ActionMessages errors) {
if ((errors == null) || errors.isEmpty()) {
  request.removeAttribute(Globals.ERROR_KEY);
  return;
}
request.setAttribute(Globals.ERROR_KEY, errors);
  }

  public String getMessage(HttpServletRequest  request,
   String  key)
  throws IOException,
 ServletException {
HttpSession  session  = request.getSession();
Locale   locale   =
(Locale)session.getAttribute(Globals.LOCALE_KEY);
MessageResources messages = this.getResources(request);
return messages.getMessage(locale,key);
  }

  protected ActionForward method(Action action,
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
  throws Exception {
Class  clazz  = action.getClass();
String methodName = getMethodName(request,mapping);

if (EXECUTE.equals(methodName) || PERFORM.equals(methodName)){
  MessageResources messages = MessageResources.getMessageResources
(org.apache.struts.actions.LocalStrings);
  String message = messages.getMessage(DISPATCH_RECURSIVE,
mapping.getPath());
  throw new ServletException(message);
}

Method method = null;

try {
  method = getMethod(clazz,methodName);
} catch(NoSuchMethodException nsme) {
  MessageResources messages = MessageResources.getMessageResources
(org.apache.struts.actions.LocalStrings);
  String message = messages.getMessage(DISPATCH_METHOD,
mapping.getPath(), methodName);
  throw nsme;
}

ActionForward forward = null;

try {
  Object args[] = { mapping, form, request, response };
  forward = (ActionForward)method.invoke(action, args);
} catch(ClassCastException cce) {
  StdOut.log(SiteConstant.ERROR_LOG,StateBaseAction error 108 = 
+ cce.getMessage());
} catch(IllegalAccessException iae) {
  StdOut.log(SiteConstant.ERROR_LOG,StateBaseAction errorn 110 =
 + iae.getMessage());
} catch(InvocationTargetException ite) {
  Throwable t = ite.getTargetException();

  if (t instanceof Exception) {
StdOut.log(SiteConstant.ERROR_LOG,StateBaseAction error 115 =
 + ((Exception)t).getMessage());
  } else {
StdOut.log(SiteConstant.ERROR_LOG,StateBaseAction error 117 =
 + ite.getMessage());
  }
}
return forward;
  }

  private static String getMethodName(HttpServletRequest request,
  ActionMapping  mapping) {

String methodName  = null;
String buttonValue = null;
String paramProperty = mapping.getParameter();
if((paramProperty != null)) {
  int index = paramProperty.indexOf('.');
  if(index  -1) {
methodName = paramProperty.substring(0,index);
  } else {
return methodName = paramProperty;
  }
}

Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()) {
  buttonValue = (String)enum.nextElement();
  if(buttonValue.indexOf(DISPATCH_METHOD_SUFFIX) = 0) {
methodName = buttonValue;
break;
  }
}

if(methodName == 

Re: problem with List-Backed Form

2005-01-15 Thread Dakota Jack
I don't know what Kishore is talking about.  Seems what you do is
better than that suggestion.  However, if you want the field from the
form saved, populated, etc., all you have to do is have a property for
the field, e.g.

protected String field;

public String getField() { return field; {
public void setField(String field) { this.field = field; }

You have to also do whatever you want with the reset(), in the Action
class, etc.

Jack


On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
 Hi, ok I am trying to get my Dynamic List-Backed form to work, no
 luck, here is what I have so far.
 
 ActionForm with a List in it:
 
   public ArrayList getFields() {
 return fields;
   }
 
   public void setFields(ArrayList fields) {
 this.fields = fields;
   }
 
 Now, a field itslelf is a bean:
 
 public class FormField {
   private String label;
   private String name;
   private String value;
   private String type;
   private java.util.ArrayList props;
   private boolean required;
  ...
 getter and setters here
 }
 
 There is an Action that gets the info from the database and populates
 into the ActionForm, no problem. Now Jsp page has something like this:
 
 c:forEach items=${formActionForm.fields} var=field
 tr
   tdhtml:text property=label name=field//td
   td
 html:select property=type name=field
 html:optionsCollection name=definitionFields/
 /html:select
   /td
 /   and so on for all the properties
 /tr
 /c:forEach
 
 So my question is, how do I make it so when this values are changed
 and submitted they are changed in the ActionForm ?? IS there a way to
 have that happen automatically like with a normal actionform or I have
 to do it programatically?
 
 I am really stuck here!!!
 
 Oleg
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



sales@lemeridienkovalam.com

2005-01-15 Thread Dakota Jack
Is everyone else getting the irritating messages from
[EMAIL PROTECTED]  I wish those with the switch would throw
it on this user.

Jack


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: AW: announce petstore demo

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: [Slightly OT] Simple date-picker?

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: Re: sales@lemeridienkovalam.com

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: sales@lemeridienkovalam.com

2005-01-15 Thread James Mitchell
Oops, never mind, they are back.
Since I am a moderator, I should be able to unsubscribe this account (that 
is, if it is subscribed and not some forward from another account).

Give it a few minutes.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 15, 2005 9:09 AM
Subject: Re: [EMAIL PROTECTED]


I was getting them yesterday, but they stopped after lunch sometime.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: Dakota Jack [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 15, 2005 7:29 AM
Subject: [EMAIL PROTECTED]


Is everyone else getting the irritating messages from
[EMAIL PROTECTED]  I wish those with the switch would throw
it on this user.
Jack
--
--
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~
You can't wake a person who is pretending to be asleep.
~Native Proverb~
Each man is good in His sight. It is not necessary for eagles to be 
crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~
---
This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


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


Re: Re: sales@lemeridienkovalam.com

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: [OT] Re: Using XML in struts

2005-01-15 Thread Erik Weber
Thanks. Hope you like them. Nice looking site by the way.
Erik
Vic wrote:
You do need a life.
But... I just bought 2 books from your list.
I keep a track of cool design ideas here: http://sandrasf.com/kiss - 
so if anyone wants to append there they can.

(I like SQL Tuning, SQL for smartites and Doug Lea's book on 
concurency.)
.V



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


Re: Re: [OT] Re: Using XML in struts

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



RE: [Slightly OT] Simple date-picker?

2005-01-15 Thread David Bolsover
I have not used with validator - but have used earlier versions of this
script..

http://www.mattkruse.com/javascript/calendarpopup/

db

-Original Message-
From: Vamsee Kanakala [mailto:[EMAIL PROTECTED]
Sent: 15 January 2005 13:35
To: Struts Users Mailing List
Subject: [Slightly OT] Simple date-picker?


Hi List,

   I'm looking for a simple date-picker which integrates well with
Struts...
as in, it places validator-checkable date format in the date field. I've
been looking for javascripts on the net, but I can't find any that did
the job straight-forwardly. I looked at struts-layout, but it seems
overkill to install struts-layout for just a date-picker. Please suggest.

TIA,
Vamsee.

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


=== 
This message has been scanned for viruses and dangerous 
content using Vet Anti-Virus Protection and is believed 
to be clean. 
===

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



RE: Stuts forwarding does not work

2005-01-15 Thread David G. Friedman
Alex,

The below Stack Trace snippet suggests you had some sort of exception in
your Logon jsp, line 85, while trying to use something in the page context.
This was clearly noted in the Stack trace.  They are very useful (Stack
traces).   If this happens alot to you then I would recommend you learn how
to read Stack traces.

 Root Cause -
 javax.servlet.ServletException at
 org.apache.jasper.runtime.PageContextImpl.handlePageException
 (PageContextImpl.java:533) at
 org.apache.jsp.Logon_jsp._jspService(Logon_jsp.java:85) at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at It seems like something is wrong in your login jsp.

Regards,
David



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



Re: RE: Stuts forwarding does not work

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Tags rewrite wrong action url

2005-01-15 Thread Yufan Shi
Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/
Struts rendered //someaction.do or form action=//someaction.do to the
browser, while /someaction.do or form action=/someaction.do/  was
expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!
 

Yufan Shi

We are Online!

http://www.ivanshi.com/blog/

 

 


Tags rewrite wrong action url

2005-01-15 Thread Yufan Shi
Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/
Struts rendered //someaction.do or form action=//someaction.do to the
browser, while /someaction.do or form action=/someaction.do/  was
expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!
 

Yufan Shi

We are Online!

http://www.ivanshi.com/blog/

 

 


Re: Tags rewrite wrong action url

2005-01-15 Thread sales
Kindly send all your messages to [EMAIL PROTECTED]  This mail account is not 
functioning anymore. 



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



Re: Stuts forwarding does not work

2005-01-15 Thread Dakota Jack
Just check Logon_jsp.java:85 and it will tell you what is wrong.

Jack


On Sat, 15 Jan 2005 12:25:06 -0500, David G. Friedman
[EMAIL PROTECTED] wrote:
 Alex,
 
 The below Stack Trace snippet suggests you had some sort of exception in
 your Logon jsp, line 85, while trying to use something in the page context.
 This was clearly noted in the Stack trace.  They are very useful (Stack
 traces).   If this happens alot to you then I would recommend you learn how
 to read Stack traces.
 
  Root Cause -
  javax.servlet.ServletException at
  org.apache.jasper.runtime.PageContextImpl.handlePageException
  (PageContextImpl.java:533) at
  org.apache.jsp.Logon_jsp._jspService(Logon_jsp.java:85) at
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at It seems like something is wrong in your login jsp.
 
 Regards,
 David
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: AW: announce petstore demo

2005-01-15 Thread Dakota Jack
I agree.  Frank Zammetti (SP?) decries this sort of thing and rightly so.

Jack


On Sat, 15 Jan 2005 14:06:25 +0100, Leon Rosenberg
[EMAIL PROTECTED] wrote:
 
 This was second time I've heard about xmoon, so I thought I'll take a look.
 The third source file I opened:
 
 package org.xmoon.utility;
 
 import java.io.*;
 import java.util.*;
 
 public class GenericTokenizer
 {
 public static Vector getElements(String theString, String theBreak)
 throws Exception
 {
 Vector temp = new Vector();
 if (theString == null || theString.trim() == ) return
 temp;
 
 StringTokenizer st = new StringTokenizer(theString,
 theBreak);
 
 while (st.hasMoreTokens())
 {
 String currentToken = st.nextToken();
 temp.addElement(currentToken.trim());
 }
 return temp;
 }
 }
 
 I know, due some compiler optimizations the above code actually _could_
 work, at least with constants, but really...
 
 I really don't want to look further :-)
 
 Regards
 Leon
 
  Von: mario nee [mailto:[EMAIL PROTECTED]
  Gesendet: Freitag, 14. Januar 2005 21:00
  An: user@struts.apache.org
  Betreff: announce petstore demo
 
  New petstore demo powered by XMoon
 
  http://www.demozone.org/petstore/index.do
 
  XMoon site http://www.xmoon.org
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: Struts chainging problem ?

2005-01-15 Thread Jim Barrows
On Fri, 14 Jan 2005 18:12:24 -0800 (PST), Manisha Sathe
[EMAIL PROTECTED] wrote:
 I do know what exactly could be the problem
 
 I am having one JSP which calls Main Action Handler - this does some database 
 job and get userid. This id i want to pass it to another page. If it is a 
 direct JSP page then i can make use of something like 
 request.setAttributeand can get the value.
 
 But if it is calling another struts Action Handler then seems value is not 
 passed. I aways get in another Action Handler as null. Currently i put it in 
 the session scope - but which i do not want. Is there any good solution to 
 this ?

Well, chaining actions is not considered good practice.. but if you
have to.. why not put it in the session?

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



Re: struts html:base tag and port 8080

2005-01-15 Thread Jim Barrows
On Sat, 15 Jan 2005 03:36:36 -0800 (PST), Vilpesh Mistry
[EMAIL PROTECTED] wrote:
 hi,
 iam using struts and making a website.

 
 I think this whole is configuring apache and tomcat,
 please specify how do i configure tomcat so that when
 i access
 
 http://localhost/simliv/action/welcome ,

A good read of the tomcat documentation would reveal the following in
your  conf/server.xml file:

Connector port=8080
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   debug=0 connectionTimeout=2 
   disableUploadTimeout=true /
Change port to 80.

 
 i get the same welcome page and all other pages
 without the port number after the localhost
 
 The problem been that struts carries the base address
 8080 in all other pages if html:base tag is used.

This is as designed and a good thing.

 
 Will i have to remove html:base tag(which i don't
 want to do)

Bad idea.

 
 More info provided regarding html:base tag is also
 great
 
 thanks
 
 __
 Do you Yahoo!?
 The all-new My Yahoo! - Get yours free!
 http://my.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: sales@lemeridienkovalam.com

2005-01-15 Thread James Mitchell
I take it that worked?

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 15, 2005 9:17 AM
Subject: Re: [EMAIL PROTECTED]


Oops, never mind, they are back.
Since I am a moderator, I should be able to unsubscribe this account (that 
is, if it is subscribed and not some forward from another account).

Give it a few minutes.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 15, 2005 9:09 AM
Subject: Re: [EMAIL PROTECTED]


I was getting them yesterday, but they stopped after lunch sometime.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: Dakota Jack [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 15, 2005 7:29 AM
Subject: [EMAIL PROTECTED]


Is everyone else getting the irritating messages from
[EMAIL PROTECTED]  I wish those with the switch would throw
it on this user.
Jack
--
--
You can lead a horse to water but you cannot make it float on its 
back.

~Dakota Jack~
You can't wake a person who is pretending to be asleep.
~Native Proverb~
Each man is good in His sight. It is not necessary for eagles to be 
crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~
---
This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


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


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


Help with the import errors please

2005-01-15 Thread Avinash Sridhar
Hi All,
   I am new using Struts 1.1 , Tomcat 5.0.28 and Java 1.4.2.I am getting theses 
errors although i have imported these 

c.tld
struts-bean-el.tld
struts-html-el.tld
struts-logic-el.tld

In the WEB-INF directory 

And 

commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jstl.jar
standard.jar
struts-el.jar
struts.jar

In the WEB-INF/lib directory

The error i am getting is 

import org.apache.struts.action.Action; //The import org.apache.struts.action 
cannot be resolved
import org.apache.struts.action.ActionForward; ///The import cannot be resolved
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.commons.beanutils.BeanUtils;


Any help would be greatly appreciated.

Thanks 
AS
-- 
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


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



RE: Help with the import errors please

2005-01-15 Thread David G. Friedman
Avinash,

Two quick questions:

1) If you are new why are you using Struts v1.1 when V1.2.4 is the current
stable release?

2) Is your error when you are compling?  If so, how are you compiling? Ant,
and IDE such as Eclipse, etc?  For Ant you need to add the jars from the
WEB-INF/lib/ directory to your CLASSPATH environmental variable.  If you are
using an IDE such as Eclipse, you can right-click on the project, and add
the jars are libraries so they are linked automatically when you compile.

-David

-Original Message-
From: Avinash Sridhar [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 12:41 PM
To: user@struts.apache.org
Subject: Help with the import errors please


Hi All,
   I am new using Struts 1.1 , Tomcat 5.0.28 and Java 1.4.2.I am getting
theses errors although i have imported these

c.tld
struts-bean-el.tld
struts-html-el.tld
struts-logic-el.tld

In the WEB-INF directory

And

commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jstl.jar
standard.jar
struts-el.jar
struts.jar

In the WEB-INF/lib directory

The error i am getting is 

import org.apache.struts.action.Action; //The import
org.apache.struts.action cannot be resolved
import org.apache.struts.action.ActionForward; ///The import cannot be
resolved
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.commons.beanutils.BeanUtils;


Any help would be greatly appreciated.

Thanks
AS
--
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


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


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



RE: Tags rewrite wrong action url

2005-01-15 Thread David G. Friedman
Yufan,

This is a known problem with Struts IF Struts is used as a ROOT webapp.  It
probably happens with any container or app server, not just Tomcat.

A post back in November (25th, 2004) wrote the easiest current way to fix it
would be to hack a line or two if the RequestProcessor.processForwardConfig
class to remove the leading / slash character.  The URL for that post is:
http://marc.theaimsgroup.com/?l=struts-userm=110136285004088w=2

I think this happens because the method tries to add any path before the
slash but the HttpServletRequest gives back only a slash for the root
webapp.  I tried to check the code repository to see if this was fixed in a
version being worked on but I don't see anything suggesting it was fixed.  I
guess that for now, it is a 'letter evil' you'll need to live with.

Regards,
David

-Original Message-
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 1:02 PM
To: 'Struts Users Mailing List'
Subject: Tags rewrite wrong action url


Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/
Struts rendered //someaction.do or form action=//someaction.do to the
browser, while /someaction.do or form action=/someaction.do/  was
expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!


Yufan Shi

We are Online!

http://www.ivanshi.com/blog/






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



Re: sales@lemeridienkovalam.com

2005-01-15 Thread Dakota Jack
Looks like it, James.  Thanks a million.

Jack


On Sat, 15 Jan 2005 13:48:34 -0500, James Mitchell [EMAIL PROTECTED] wrote:
 I take it that worked?
 
 
 --
 James Mitchell
 Software Engineer / Open Source Evangelist
 EdgeTech, Inc.
 678.910.8017
 AIM: jmitchtx
 
 - Original Message -
 From: James Mitchell [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Saturday, January 15, 2005 9:17 AM
 Subject: Re: [EMAIL PROTECTED]
 
  Oops, never mind, they are back.
 
  Since I am a moderator, I should be able to unsubscribe this account (that
  is, if it is subscribed and not some forward from another account).
 
  Give it a few minutes.
 
 
 
  --
  James Mitchell
  Software Engineer / Open Source Evangelist
  EdgeTech, Inc.
  678.910.8017
  AIM: jmitchtx
 
  - Original Message -
  From: James Mitchell [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Saturday, January 15, 2005 9:09 AM
  Subject: Re: [EMAIL PROTECTED]
 
 
 I was getting them yesterday, but they stopped after lunch sometime.
 
 
 
  --
  James Mitchell
  Software Engineer / Open Source Evangelist
  EdgeTech, Inc.
  678.910.8017
  AIM: jmitchtx
 
  - Original Message -
  From: Dakota Jack [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Saturday, January 15, 2005 7:29 AM
  Subject: [EMAIL PROTECTED]
 
 
  Is everyone else getting the irritating messages from
  [EMAIL PROTECTED]  I wish those with the switch would throw
  it on this user.
 
  Jack
 
 
  --
  --
 
  You can lead a horse to water but you cannot make it float on its
  back.
 
  ~Dakota Jack~
 
  You can't wake a person who is pretending to be asleep.
 
  ~Native Proverb~
 
  Each man is good in His sight. It is not necessary for eagles to be
  crows.
 
  ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
  ---
 
  This message may contain confidential and/or privileged information.
  If you are not the addressee or authorized to receive this for the
  addressee, you must not use, copy, disclose, or take any action based
  on this message or any information herein. If you have received this
  message in error, please advise the sender immediately by reply e-mail
  and delete this message. Thank you for your cooperation.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



validwhen confusion

2005-01-15 Thread Todd Nine
Hi All,
   I am having trouble getting my mind around the boolean expression
semantics of the validwhen validator.  Consider the following example.

I have a form with two possible input groups depending on the user
selection.  If the entity is an individual, then I need to require
firstName etc.  If the entity is a business then I need to require a
business name.  Below is my validation code.

field property=firstName depends=validwhen, mask
arg0 key=prompt.common.firstName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
/field

field property=lastName depends=validwhen, mask
arg0 key=prompt.common.lastName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
/field

field property=ssn depends=validwhen, mask
arg0 key=prompt.common.ssn /
arg1 key=prompt.common.ssn.format /
var
var-namemask/var-name
var-value${ssn}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
/field

field property=birthDate depends=validwhen, date
arg0 key=prompt.common.birthDate /
var
var-namedatePatternStrict/var-name
var-value${date}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
/field

field property=businessName depends=validwhen, mask
arg0 key=prompt.common.businessName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name
var-value(entityType == business)/var-value
/var
/field


However when business is the entityType, firstName, lastName, ssn,
and birthDate show up as required in the error messages.  When the
entityType is individual businessName shows up.  I thought that the
value was reversed in the jsp, hence reversing it when it is being set
into the form.  I debugged the validate method and the enityType is
being set correctly.  This operand seems sufficient to work correctly.
 However changing all of the == to != seems counterintuitive to me. 
It seems to me that my logic should work.  {firstName} is required
when {entityType} == individual.  Can someone explain the semantics
of the need to negate all of the expressions?

Thanks,
Todd

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



Re: validwhen confusion

2005-01-15 Thread Kishore Senji
On Sat, 15 Jan 2005 15:08:17 -0500, Todd Nine [EMAIL PROTECTED] wrote:
 Hi All,
   I am having trouble getting my mind around the boolean expression
 semantics of the validwhen validator.  Consider the following example.
 
 I have a form with two possible input groups depending on the user
 selection.  If the entity is an individual, then I need to require
 firstName etc.  If the entity is a business then I need to require a
 business name.  Below is my validation code.
 
 field property=firstName depends=validwhen, mask
arg0 key=prompt.common.firstName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name

If the test evaluates to false then it results in an ActionError.
(JavaDocs : Checks if the field matches the boolean expression
specified in test parameter.)


var-value(entityType == individual)/var-value

This says that if entityType is individual then this property
(firstName) satisfies this condition no matter what the value of
firstName is. On the otherhand if entityType == business then this
condition evaluates to false and so this property (firstName) is
tagged as required by the validator. (You should get this message even
if you specify something for firstName)

/var
 /field
 
 field property=lastName depends=validwhen, mask
arg0 key=prompt.common.lastName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
 /field
 
 field property=ssn depends=validwhen, mask
arg0 key=prompt.common.ssn /
arg1 key=prompt.common.ssn.format /
var
var-namemask/var-name
var-value${ssn}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
 /field
 
 field property=birthDate depends=validwhen, date
arg0 key=prompt.common.birthDate /
var
var-namedatePatternStrict/var-name
var-value${date}/var-value
/var
var
var-nametest/var-name
var-value(entityType == individual)/var-value
/var
 /field
 
 field property=businessName depends=validwhen, mask
arg0 key=prompt.common.businessName /
var
var-namemask/var-name
var-value${alphaname}/var-value
/var
var
var-nametest/var-name
var-value(entityType == business)/var-value
/var
 /field
 
 However when business is the entityType, firstName, lastName, ssn,
 and birthDate show up as required in the error messages.  When the
 entityType is individual businessName shows up.  I thought that the
 value was reversed in the jsp, hence reversing it when it is being set
 into the form.  I debugged the validate method and the enityType is
 being set correctly.  This operand seems sufficient to work correctly.
 However changing all of the == to != seems counterintuitive to me.

Even if specify something like this, 
field property=firstName depends=validwhen, mask
   arg0 key=prompt.common.firstName /
   var
   var-namemask/var-name
   var-value${alphaname}/var-value
   /var
   var
   var-nametest/var-name
   var-value(entityType != individual)/var-value
   /var
/field

it doesn't work as you expect it to, as you can see it fails when
entityType is individual.

So, the right way of specifying the conditionals is to think about
when you don't need that property. For example another of saying
firstName is required when entityType = individual is firstName
is required unless entityType = business
 
so now you conditional would be 
field property=firstName depends=validwhen, mask
   arg0 key=prompt.common.firstName /
   var
   var-namemask/var-name
   var-value${alphaname}/var-value
   /var
   var
   var-nametest/var-name
   var-value(entityType == business) or
(*this*!=null)/var-value
   /var
/field

Which says if entityType=business firstName is not required
otherwise (entityType !=business implicity entityType=individual)
this(firstName) is required
 
 It seems to me that my logic should work.  {firstName} is required
 when {entityType} == individual.  Can someone explain the semantics
 of the need to negate all of the expressions?
 
 Thanks,
 Todd
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Problem using plug-in mechanismen

2005-01-15 Thread listed
Hi,
i would like to use my own components to be plugged in and loaded 
dynamically but i get everytime the same exception. The error eccoured 
when the Servlet executes.
I have no idea where the Problem is.

I am happy about every tip.
Thanxx
Greets Jens
##
The Exception:
javax.servlet.ServletException: Servlet.init() for servlet action threw 
exception
   at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:963)
   at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   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:2416)
   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:171)
   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:601)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
   at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
   at java.lang.Thread.run(Thread.java:534)
- Root Cause -
java.lang.AbstractMethodError: 
control.plugin.WatchdogPlugin.init(Lorg/apache/struts/action/ActionServlet;Lorg/apache/struts/config/ApplicationConfig;)V
   at 
org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.java:991)
   at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:458)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
   at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   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:2416)
   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:171)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
  

Re: problem with List-Backed Form

2005-01-15 Thread Oleg
Ok I tried that and a couple of more things. I can see what Kishore
trying to do, using indexed properties. However using login iterate
loop with indexed property didnt work and I was getting: cannot find
fields[0].label in the bean. So I replaced that with nested:iterate
like so:

   nested:iterate name=formActionForm property=fields 
   tr
 tdnested:text property=label//td
 tdnested:text property=fields//td
   /tr
   /nested:iterate
It does the same thing by outputting inputs name as: fields[0].label

However, it still doesnt change the ActionForms property on submit, I
do have in my bean method defined as

 public ArrayList getFields() {
   return fields;
 }

 public void setFields(ArrayList fields) {
   this.fields = fields;
 }


Thanks Dakota for your input as well, I see what you mean and I tried
doing what you suggested and it didnt work, most likely due to the
fact that all the fileds like label, type,  belong to a Bean, and
my ActionForm has a list populated with those Beans, as wel as
getter/setter for a hole List but getters and setters for the
label,type, are within the Bean rather than ActonForm.

Still stuck guys, what else can I try?

Thanks,
Oleg


On Sat, 15 Jan 2005 04:26:21 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
 I don't know what Kishore is talking about.  Seems what you do is
 better than that suggestion.  However, if you want the field from the
 form saved, populated, etc., all you have to do is have a property for
 the field, e.g.
 
 protected String field;
 
 public String getField() { return field; {
 public void setField(String field) { this.field = field; }
 
 You have to also do whatever you want with the reset(), in the Action
 class, etc.
 
 Jack
 
 
 On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
  Hi, ok I am trying to get my Dynamic List-Backed form to work, no
  luck, here is what I have so far.
 
  ActionForm with a List in it:
 
public ArrayList getFields() {
  return fields;
}
 
public void setFields(ArrayList fields) {
  this.fields = fields;
}
 
  Now, a field itslelf is a bean:
 
  public class FormField {
private String label;
private String name;
private String value;
private String type;
private java.util.ArrayList props;
private boolean required;
   ...
  getter and setters here
  }
 
  There is an Action that gets the info from the database and populates
  into the ActionForm, no problem. Now Jsp page has something like this:
 
  c:forEach items=${formActionForm.fields} var=field
  tr
tdhtml:text property=label name=field//td
td
  html:select property=type name=field
  html:optionsCollection name=definitionFields/
  /html:select
/td
  /   and so on for all the properties
  /tr
  /c:forEach
 
  So my question is, how do I make it so when this values are changed
  and submitted they are changed in the ActionForm ?? IS there a way to
  have that happen automatically like with a normal actionform or I have
  to do it programatically?
 
  I am really stuck here!!!
 
  Oleg
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 --
 
 You can lead a horse to water but you cannot make it float on its back.
 
 ~Dakota Jack~
 
 You can't wake a person who is pretending to be asleep.
 
 ~Native Proverb~
 
 Each man is good in His sight. It is not necessary for eagles to be crows.
 
 ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
 ---
 
 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this for the
 addressee, you must not use, copy, disclose, or take any action based
 on this message or any information herein. If you have received this
 message in error, please advise the sender immediately by reply e-mail
 and delete this message. Thank you for your cooperation.


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



Re: problem with List-Backed Form

2005-01-15 Thread Oleg
Ok I tried that and a couple of more things. I can see what Kishore
trying to do, using indexed properties. However using login iterate
loop with indexed property didnt work and I was getting: cannot find
fields[0].label in the bean. So I replaced that with nested:iterate
like so:

   nested:iterate name=formActionForm property=fields 
   tr
 tdnested:text property=label//td
 tdnested:text property=fields//td
   /tr
   /nested:iterate
It does the same thing by outputting inputs name as: fields[0].label

However, it still doesnt change the ActionForms property on submit, I
do have in my bean method defined as

 public ArrayList getFields() {
   return fields;
 }

 public void setFields(ArrayList fields) {
   this.fields = fields;
 }


Thanks Dakota for your input as well, I see what you mean and I tried
doing what you suggested and it didnt work, most likely due to the
fact that all the fileds like label, type,  belong to a Bean, and
my ActionForm has a list populated with those Beans, as wel as
getter/setter for a hole List but getters and setters for the
label,type, are within the Bean rather than ActonForm.

Still stuck guys, what else can I try?

Thanks,
Oleg



On Sat, 15 Jan 2005 04:26:21 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
 I don't know what Kishore is talking about.  Seems what you do is
 better than that suggestion.  However, if you want the field from the
 form saved, populated, etc., all you have to do is have a property for
 the field, e.g.
 
 protected String field;
 
 public String getField() { return field; {
 public void setField(String field) { this.field = field; }
 
 You have to also do whatever you want with the reset(), in the Action
 class, etc.
 
 Jack
 
 
 On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
  Hi, ok I am trying to get my Dynamic List-Backed form to work, no
  luck, here is what I have so far.
 
  ActionForm with a List in it:
 
public ArrayList getFields() {
  return fields;
}
 
public void setFields(ArrayList fields) {
  this.fields = fields;
}
 
  Now, a field itslelf is a bean:
 
  public class FormField {
private String label;
private String name;
private String value;
private String type;
private java.util.ArrayList props;
private boolean required;
   ...
  getter and setters here
  }
 
  There is an Action that gets the info from the database and populates
  into the ActionForm, no problem. Now Jsp page has something like this:
 
  c:forEach items=${formActionForm.fields} var=field
  tr
tdhtml:text property=label name=field//td
td
  html:select property=type name=field
  html:optionsCollection name=definitionFields/
  /html:select
/td
  /   and so on for all the properties
  /tr
  /c:forEach
 
  So my question is, how do I make it so when this values are changed
  and submitted they are changed in the ActionForm ?? IS there a way to
  have that happen automatically like with a normal actionform or I have
  to do it programatically?
 
  I am really stuck here!!!
 
  Oleg
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 --
 
 You can lead a horse to water but you cannot make it float on its back.
 
 ~Dakota Jack~
 
 You can't wake a person who is pretending to be asleep.
 
 ~Native Proverb~
 
 Each man is good in His sight. It is not necessary for eagles to be crows.
 
 ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
 ---
 
 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this for the
 addressee, you must not use, copy, disclose, or take any action based
 on this message or any information herein. If you have received this
 message in error, please advise the sender immediately by reply e-mail
 and delete this message. Thank you for your cooperation.


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



Re: problem with List-Backed Form

2005-01-15 Thread Oleg
Ok I got I think, the problem is, silly of me to miss it, is that the
action to which I am posting using a different ActionForm :) that
would screw things up :)/

Problem is that I have to use that ActionForm, so now I have to do it
porgrammatically, but from what I understand I cant get an ArrayList
from request scope. Any ideas how would I get the ArrayList of fields
after from is posted and populate ActionForm manually?

Oleg


On Sat, 15 Jan 2005 02:37:28 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
 Sorry forgot to tack on the actual property
 
 logic:iterate name=formActionForm property=fields indexId=index
 id=field
 tr
  td
 html:text property='%=fields[+index.intValue()+].label%'/
  /td
  td
 html:select property='%=fields[+index.intValue()+].type%'
   html:optionsCollection name=definitionFields/
 /html:select
  /td
  /// similarly for other fields
 /tr
 /logic:iterate
 
 On Sat, 15 Jan 2005 02:32:48 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
  On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
   Hi, ok I am trying to get my Dynamic List-Backed form to work, no
   luck, here is what I have so far.
  
   ActionForm with a List in it:
  
public ArrayList getFields() {
  return fields;
}
  
public void setFields(ArrayList fields) {
  this.fields = fields;
}
  
   Now, a field itslelf is a bean:
  
   public class FormField {
private String label;
private String name;
private String value;
private String type;
private java.util.ArrayList props;
private boolean required;
   ...
   getter and setters here
   }
  
   There is an Action that gets the info from the database and populates
   into the ActionForm, no problem. Now Jsp page has something like this:
  
  c:forEach items=${formActionForm.fields} var=field
  tr
tdhtml:text property=label name=field//td
td
  html:select property=type name=field
  html:optionsCollection name=definitionFields/
  /html:select
/td
  /   and so on for all the properties
  /tr
  /c:forEach
  
 
  Try something like this;
 
  logic:iterate name=formActionForm property=fields indexId=index
  id=field
   tr
td
   html:text property='%=fields[+index.intValue()+]%'/
/td
td
   html:select property='%=fields[+index.intValue()+]%'
 html:optionsCollection name=definitionFields/
   /html:select
/td
/// similarly for other fields
   /tr
  /logic:iterate
 
  The trick is to start from the form level and adjusting the property
  accordingly.
 
  for more info: http://struts.apache.org/faqs/indexedprops.html
 
   So my question is, how do I make it so when this values are changed
   and submitted they are changed in the ActionForm ?? IS there a way to
   have that happen automatically like with a normal actionform or I have
   to do it programatically?
  
   I am really stuck here!!!
  
   Oleg
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 


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



Re: Problem using plug-in mechanismen

2005-01-15 Thread Hubert Rabago
 java.lang.AbstractMethodError:
control.plugin.WatchdogPlugin.init(Lorg/apache/struts/action/ActionServlet;Lorg/apache/struts/config/ApplicationConfig;)

 
 public void init(ActionServlet servlet, ModuleConfig config)
   throws ServletException {
   logger.debug(Enter WatchdogPlugin() );


Looks like you're using an obsolete jar.  The spec you implemented is
using ModuleConfig, yet the jar you're deploying is using the
deprecated ApplicationConfig.

Hubert

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



Re: Problem using plug-in mechanismen

2005-01-15 Thread listed
Hubert Rabago wrote:
Looks like you're using an obsolete jar.  The spec you implemented is
using ModuleConfig, yet the jar you're deploying is using the
deprecated ApplicationConfig.
Hubert
 

Thank you for the Tip.
I looked for obsolete jar but i could not found anything. I downloaded 
the Version 1.2.4 and changed everything (i think so). The classes 
org.apache.struts.config.ModuleConfig and 
org.apache.struts.config.ModuleConfig are only(!) in the Package 
struts.jar. Is it right?

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


Re: Problem using plug-in mechanismen

2005-01-15 Thread Hubert Rabago
Yes.  You could've been using a pre-1.1 struts.jar.

On Sat, 15 Jan 2005 23:54:37 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hubert Rabago wrote:
 
 Looks like you're using an obsolete jar.  The spec you implemented is
 using ModuleConfig, yet the jar you're deploying is using the
 deprecated ApplicationConfig.
 
 Hubert
 
 
 Thank you for the Tip.
 
 I looked for obsolete jar but i could not found anything. I downloaded
 the Version 1.2.4 and changed everything (i think so). The classes
 org.apache.struts.config.ModuleConfig and
 org.apache.struts.config.ModuleConfig are only(!) in the Package
 struts.jar. Is it right?
 
 Greets Mark

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



Re: problem with List-Backed Form

2005-01-15 Thread Dakota Jack
If you have a select, you don't want an ArrayList from request scope. 
You want the value selected to be the value of the option name. 
Right?

Also, you can do indexed properties with JSTL.

Jack


On Sat, 15 Jan 2005 14:31:27 -0800, Oleg [EMAIL PROTECTED] wrote:
 Ok I got I think, the problem is, silly of me to miss it, is that the
 action to which I am posting using a different ActionForm :) that
 would screw things up :)/
 
 Problem is that I have to use that ActionForm, so now I have to do it
 porgrammatically, but from what I understand I cant get an ArrayList
 from request scope. Any ideas how would I get the ArrayList of fields
 after from is posted and populate ActionForm manually?
 
 Oleg
 
 
 On Sat, 15 Jan 2005 02:37:28 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
  Sorry forgot to tack on the actual property
 
  logic:iterate name=formActionForm property=fields indexId=index
  id=field
  tr
   td
  html:text property='%=fields[+index.intValue()+].label%'/
   /td
   td
  html:select property='%=fields[+index.intValue()+].type%'
html:optionsCollection name=definitionFields/
  /html:select
   /td
   /// similarly for other fields
  /tr
  /logic:iterate
 
  On Sat, 15 Jan 2005 02:32:48 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
   On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
Hi, ok I am trying to get my Dynamic List-Backed form to work, no
luck, here is what I have so far.
   
ActionForm with a List in it:
   
 public ArrayList getFields() {
   return fields;
 }
   
 public void setFields(ArrayList fields) {
   this.fields = fields;
 }
   
Now, a field itslelf is a bean:
   
public class FormField {
 private String label;
 private String name;
 private String value;
 private String type;
 private java.util.ArrayList props;
 private boolean required;
...
getter and setters here
}
   
There is an Action that gets the info from the database and populates
into the ActionForm, no problem. Now Jsp page has something like this:
   
   c:forEach items=${formActionForm.fields} var=field
   tr
 tdhtml:text property=label name=field//td
 td
   html:select property=type name=field
   html:optionsCollection name=definitionFields/
   /html:select
 /td
   /   and so on for all the properties
   /tr
   /c:forEach
   
  
   Try something like this;
  
   logic:iterate name=formActionForm property=fields indexId=index
   id=field
tr
 td
html:text property='%=fields[+index.intValue()+]%'/
 /td
 td
html:select property='%=fields[+index.intValue()+]%'
  html:optionsCollection name=definitionFields/
/html:select
 /td
 /// similarly for other fields
/tr
   /logic:iterate
  
   The trick is to start from the form level and adjusting the property
   accordingly.
  
   for more info: http://struts.apache.org/faqs/indexedprops.html
  
So my question is, how do I make it so when this values are changed
and submitted they are changed in the ActionForm ?? IS there a way to
have that happen automatically like with a normal actionform or I have
to do it programatically?
   
I am really stuck here!!!
   
Oleg
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



sales@kovalamhotel.com

2005-01-15 Thread Dakota Jack
They're back!  They must have resubscribed.  I emailed them and
notified them a day or so ago about this problem.  No response to
that.

Jack

-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: Struts chainging problem ?

2005-01-15 Thread Dakota Jack
I have to state that chaining actions, even if you want to do that, is
a bad policy.  As others have pointed out on the list, you can
instantiate the actions down the chain inside one another and avoid
chaining actions and still get the desired behavior.  However,
creating a utility class in the model makes more sense for reuse, etc.

Jack


On Sat, 15 Jan 2005 11:22:00 -0700, Jim Barrows [EMAIL PROTECTED] wrote:
 On Fri, 14 Jan 2005 18:12:24 -0800 (PST), Manisha Sathe
 [EMAIL PROTECTED] wrote:
  I do know what exactly could be the problem
 
  I am having one JSP which calls Main Action Handler - this does some 
  database job and get userid. This id i want to pass it to another page. If 
  it is a direct JSP page then i can make use of something like 
  request.setAttributeand can get the value.
 
  But if it is calling another struts Action Handler then seems value is not 
  passed. I aways get in another Action Handler as null. Currently i put it 
  in the session scope - but which i do not want. Is there any good solution 
  to this ?
 
 Well, chaining actions is not considered good practice.. but if you
 have to.. why not put it in the session?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



sales@lemeridienkovalam.com

2005-01-15 Thread Dakota Jack
Please get off Struts.  We all hate you.

Jack


-- 
--

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

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: sales@kovalamhotel.com

2005-01-15 Thread Hubert Rabago
This seems to be a different address than the one that was
unsubscribed.  Sent a notice to the dev list (i'm sure you saw it),
and James sent a message saying he's removed this, too, so the
messages should stop now.


On Sat, 15 Jan 2005 15:25:38 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
 They're back!  They must have resubscribed.  I emailed them and
 notified them a day or so ago about this problem.  No response to
 that.
 
 Jack

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



Re: problem with List-Backed Form

2005-01-15 Thread Oleg
You are absolutely right and I finally got it dsiplaying the way I
want it, still on submit I get

java.lang.NullPointerException
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty


On Sat, 15 Jan 2005 15:23:20 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
 If you have a select, you don't want an ArrayList from request scope.
 You want the value selected to be the value of the option name.
 Right?
 
 Also, you can do indexed properties with JSTL.
 
 Jack
 
 
 On Sat, 15 Jan 2005 14:31:27 -0800, Oleg [EMAIL PROTECTED] wrote:
  Ok I got I think, the problem is, silly of me to miss it, is that the
  action to which I am posting using a different ActionForm :) that
  would screw things up :)/
 
  Problem is that I have to use that ActionForm, so now I have to do it
  porgrammatically, but from what I understand I cant get an ArrayList
  from request scope. Any ideas how would I get the ArrayList of fields
  after from is posted and populate ActionForm manually?
 
  Oleg
 
 
  On Sat, 15 Jan 2005 02:37:28 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
   Sorry forgot to tack on the actual property
  
   logic:iterate name=formActionForm property=fields indexId=index
   id=field
   tr
td
   html:text property='%=fields[+index.intValue()+].label%'/
/td
td
   html:select property='%=fields[+index.intValue()+].type%'
 html:optionsCollection name=definitionFields/
   /html:select
/td
/// similarly for other fields
   /tr
   /logic:iterate
  
   On Sat, 15 Jan 2005 02:32:48 -0600, Kishore Senji [EMAIL PROTECTED] 
   wrote:
On Fri, 14 Jan 2005 23:20:47 -0800, Oleg [EMAIL PROTECTED] wrote:
 Hi, ok I am trying to get my Dynamic List-Backed form to work, no
 luck, here is what I have so far.

 ActionForm with a List in it:

  public ArrayList getFields() {
return fields;
  }

  public void setFields(ArrayList fields) {
this.fields = fields;
  }

 Now, a field itslelf is a bean:

 public class FormField {
  private String label;
  private String name;
  private String value;
  private String type;
  private java.util.ArrayList props;
  private boolean required;
 ...
 getter and setters here
 }

 There is an Action that gets the info from the database and populates
 into the ActionForm, no problem. Now Jsp page has something like this:

c:forEach items=${formActionForm.fields} var=field
tr
  tdhtml:text property=label name=field//td
  td
html:select property=type name=field
html:optionsCollection name=definitionFields/
/html:select
  /td
/   and so on for all the properties
/tr
/c:forEach

   
Try something like this;
   
logic:iterate name=formActionForm property=fields indexId=index
id=field
 tr
  td
 html:text property='%=fields[+index.intValue()+]%'/
  /td
  td
 html:select property='%=fields[+index.intValue()+]%'
   html:optionsCollection name=definitionFields/
 /html:select
  /td
  /// similarly for other fields
 /tr
/logic:iterate
   
The trick is to start from the form level and adjusting the property
accordingly.
   
for more info: http://struts.apache.org/faqs/indexedprops.html
   
 So my question is, how do I make it so when this values are changed
 and submitted they are changed in the ActionForm ?? IS there a way to
 have that happen automatically like with a normal actionform or I have
 to do it programatically?

 I am really stuck here!!!

 Oleg

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


   
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 --
 
 You can lead a horse to water but you cannot make it float on its back.
 
 ~Dakota Jack~
 
 You can't wake a person who is pretending to be asleep.
 
 ~Native Proverb~
 
 Each man is good in His sight. It is not necessary for eagles to be crows.
 
 ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
 ---
 
 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this for the
 addressee, you must not use, copy, disclose, or take any action based
 on this message or any information herein. If you have received this
 message in error, please advise the sender immediately by reply e-mail
 and delete this message. Thank you for your cooperation.



Re: problem with List-Backed Form

2005-01-15 Thread Dakota Jack
Could you restart this thread under another name and show us what you
have now on your JSP page and in your Action and ActionForm?  That
would clarify things so you could get a clear answer.

Jack

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



Re: Problem using plug-in mechanismen

2005-01-15 Thread listed
Hubert Rabago wrote:
Yes.  You could've been using a pre-1.1 struts.jar.
 

Ok, i found the old jar. My first Problem is solved ;-).
But the next Error is comming. I don't use tiles and get the following 
Exception. I read in in the mailing-archive that someone had solved the 
Problem.

http://www.mail-archive.com/jetspeed-dev@jakarta.apache.org/msg17041.html
He wrote, that's a problem with the struts-config.xml that comes with 
the struts-blanket.jar.  He modified the struts-config.xml. But how? 
What's wrong?
I tryed with and without to define the tiles-plugin. No success.
I would be happy about a tip.

Thanxx
Mark
###
The Exception:
java.lang.ClassCastException
   at 
org.apache.struts.tiles.TilesRequestProcessor.initDefinitionsMapping(TilesRequestProcessor.java:86)
   at 
org.apache.struts.tiles.TilesRequestProcessor.init(TilesRequestProcessor.java:77)
   at 
org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:585)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1162)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   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:256)
   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:2416)
   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:171)
   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:601)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
   at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
   at java.lang.Thread.run(Thread.java:534)

The struts-config.xml
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

struts-config
!-- == Form Bean Definitions --
   form-beans
   !-- loginForm --
   form-bean
   name=loginForm
   type=control.LoginForm/
   !-- Language --
   form-bean
   name=languageForm
   type=control.LanguageForm/
   !-- Shop Catalog --
   form-bean
   name=shopCatalogForm
   type=control.ShopCatalogForm/
   !-- Shop Category --   
   form-bean
   name=shopCategoryForm
   type=control.ShopCategoryForm/
   !-- Shop Product --   
  

RE: Problem using plug-in mechanismen

2005-01-15 Thread David G. Friedman
Take out this from your struts-config.xml:

controller processorClass=org.apache.struts.tiles.TilesRequestProcessor/

Why?  The claim is that tiles isn't being used so you don't need a
controller line listing the TilesRequestProcessor.  The exception shows
Tiles is blowing up during the tiles initialization process, which usually
means a problem exists with your tiles-defs.xml file or it cannot find that
file.  Take that line out and it defaults to the standard RequestProcessor
instead of the TilesRequestProcessor you explicitly named.

If you wish to use Tiles, put this entry in the plug-in area of your
struts-config.xml AND put some appropriate tile definitions in the
tiles-defs.xml file (plus put it in the appropriate location) as listed
below:

plug-in className=org.apache.struts.tiles.TilesPlugin 
  !-- Path to XML definition file --
  set-property property=definitions-config
   value=/WEB-INF/tiles-defs.xml /
  !-- Set Module-awareness to true --- OPTIONAL --
  set-property property=moduleAware value=true /
/plug-in

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 7:03 PM
To: Struts Users Mailing List
Subject: Re: Problem using plug-in mechanismen


Hubert Rabago wrote:

Yes.  You could've been using a pre-1.1 struts.jar.


Ok, i found the old jar. My first Problem is solved ;-).

But the next Error is comming. I don't use tiles and get the following
Exception. I read in in the mailing-archive that someone had solved the
Problem.

http://www.mail-archive.com/jetspeed-dev@jakarta.apache.org/msg17041.html

He wrote, that's a problem with the struts-config.xml that comes with
the struts-blanket.jar.  He modified the struts-config.xml. But how?
What's wrong?
I tryed with and without to define the tiles-plugin. No success.
I would be happy about a tip.

Thanxx
Mark

###
The Exception:
java.lang.ClassCastException
at
org.apache.struts.tiles.TilesRequestProcessor.initDefinitionsMapping(TilesRe
questProcessor.java:86)
at
org.apache.struts.tiles.TilesRequestProcessor.init(TilesRequestProcessor.jav
a:77)
at
org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.jav
a:585)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1162)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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:2416)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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

Re: Problem using plug-in mechanismen

2005-01-15 Thread listed
Thank You!
I didn't saw the Controller-Tag.
Now its running :-).
The Happy
Mark
 


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


Re: Problem using plug-in mechanismen

2005-01-15 Thread Kishore Senji
On Sun, 16 Jan 2005 01:02:50 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hubert Rabago wrote:
 
 Yes.  You could've been using a pre-1.1 struts.jar.
 
 
 Ok, i found the old jar. My first Problem is solved ;-).
 
 But the next Error is comming. I don't use tiles and get the following
 Exception. I read in in the mailing-archive that someone had solved the
 Problem.
 
 http://www.mail-archive.com/jetspeed-dev@jakarta.apache.org/msg17041.html
 
 He wrote, that's a problem with the struts-config.xml that comes with
 the struts-blanket.jar.  He modified the struts-config.xml. But how?
 What's wrong?
 I tryed with and without to define the tiles-plugin. No success.

If you have defined a plugin to intialize tiles, then you should not
get this exception. Can you show us how you initialized tiles using
the plugin?

 I would be happy about a tip.
 
 Thanxx
 Mark
 
 ###
 The Exception:
 java.lang.ClassCastException
at
 org.apache.struts.tiles.TilesRequestProcessor.initDefinitionsMapping(TilesRequestProcessor.java:86)
at
 org.apache.struts.tiles.TilesRequestProcessor.init(TilesRequestProcessor.java:77)
at
 org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:585)
at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1162)
at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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:256)
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:2416)
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:171)
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:601)
at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
 
 The struts-config.xml
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;
 
 struts-config
 !-- == Form Bean Definitions --
 
form-beans
!-- loginForm --
form-bean
name=loginForm
type=control.LoginForm/
!-- Language --
form-bean
name=languageForm
type=control.LanguageForm/
!-- Shop 

problem submiting List-Backed Indexed ActionForm

2005-01-15 Thread Oleg
I finally got it to display, no problem, however there is an error
when I submit:

java.lang.NullPointerException
   org.apache.commons.beanutils.PropertyUtils.getIndexedProperty

Here is what I got so far.
Struts Version 1.2.4.
 
My FormActionForm includes an ArrayList fields of Bean Field.

FormActionForm:

public ArrayList getFields() {
  return fields;
}

  public void setFields(ArrayList fields) {
this.fields = fields;
  }


Field

  private String label;
  private String name;
  private String value;
  private String type;
... with all getters and setters ..
...
JSP (displays no problem!!):
 logic-el:iterate name=formActionForm property=fields id=foo
indexId=ctr
  tr
  tdhtml-el:text property='%= fields[ + ctr + ].label %' //td
  tdhtml-el:text property='%= fields[ + ctr + ].value %' //td
  tdhtml-el:checkbox property='%= fields[ + ctr + ].required %' //td
  /tr
/logic-el:iterate


Hit the wall here, big time.

Thanks,
Oleg

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



Re: problem submiting List-Backed Indexed ActionForm

2005-01-15 Thread Kishore Senji
Looks like you are not properly initializing your fields (ArrayList)
 in FormActionForm. You should initialize it while declaring or in the
reset()


On Sat, 15 Jan 2005 17:06:33 -0800, Oleg [EMAIL PROTECTED] wrote:
 I finally got it to display, no problem, however there is an error
 when I submit:
 
 java.lang.NullPointerException
   org.apache.commons.beanutils.PropertyUtils.getIndexedProperty
 
 Here is what I got so far.
 Struts Version 1.2.4.
 
 My FormActionForm includes an ArrayList fields of Bean Field.
 
 FormActionForm:
 
public ArrayList getFields() {
  return fields;
}
 
  public void setFields(ArrayList fields) {
this.fields = fields;
  }
 
 
 Field
 
  private String label;
  private String name;
  private String value;
  private String type;
 ... with all getters and setters ..
 ...
 JSP (displays no problem!!):
 logic-el:iterate name=formActionForm property=fields id=foo
 indexId=ctr
  tr
  tdhtml-el:text property='%= fields[ + ctr + ].label %' //td
  tdhtml-el:text property='%= fields[ + ctr + ].value %' //td
  tdhtml-el:checkbox property='%= fields[ + ctr + ].required %' 
 //td
  /tr
 /logic-el:iterate
 
 Hit the wall here, big time.
 
 Thanks,
 Oleg
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: problem submiting List-Backed Indexed ActionForm

2005-01-15 Thread Oleg
I am initializing ArrayList fields in reset(), but code is ommited.
I wish it was that easy :)


On Sat, 15 Jan 2005 19:17:09 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
 Looks like you are not properly initializing your fields (ArrayList)
  in FormActionForm. You should initialize it while declaring or in the
 reset()
 
 
 On Sat, 15 Jan 2005 17:06:33 -0800, Oleg [EMAIL PROTECTED] wrote:
  I finally got it to display, no problem, however there is an error
  when I submit:
 
  java.lang.NullPointerException
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty
 
  Here is what I got so far.
  Struts Version 1.2.4.
 
  My FormActionForm includes an ArrayList fields of Bean Field.
 
  FormActionForm:
 
 public ArrayList getFields() {
   return fields;
 }
 
   public void setFields(ArrayList fields) {
 this.fields = fields;
   }
  
 
  Field
 
   private String label;
   private String name;
   private String value;
   private String type;
  ... with all getters and setters ..
  ...
  JSP (displays no problem!!):
  logic-el:iterate name=formActionForm property=fields id=foo
  indexId=ctr
   tr
   tdhtml-el:text property='%= fields[ + ctr + ].label %' //td
   tdhtml-el:text property='%= fields[ + ctr + ].value %' //td
   tdhtml-el:checkbox property='%= fields[ + ctr + ].required %' 
  //td
   /tr
  /logic-el:iterate
 
  Hit the wall here, big time.
 
  Thanks,
  Oleg
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Tags rewrite wrong action url

2005-01-15 Thread Yufan Shi
Hi,

Strange,strange and strange.
In my another application running on the root context of  tomcat's one
vhost, everything is ok...
The only difference between the two application is that the version of
tomcat. one is 5.0.19, while the other one is 5.0.28.


Yufan Shi
We are Online!
http://www.ivanshi.com/blog/
 

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 16, 2005 3:04 AM
To: Struts Users Mailing List
Subject: RE: Tags rewrite wrong action url 

Yufan,

This is a known problem with Struts IF Struts is used as a ROOT webapp.  It
probably happens with any container or app server, not just Tomcat.

A post back in November (25th, 2004) wrote the easiest current way to fix it
would be to hack a line or two if the RequestProcessor.processForwardConfig
class to remove the leading / slash character.  The URL for that post is:
http://marc.theaimsgroup.com/?l=struts-userm=110136285004088w=2

I think this happens because the method tries to add any path before the
slash but the HttpServletRequest gives back only a slash for the root
webapp.  I tried to check the code repository to see if this was fixed in a
version being worked on but I don't see anything suggesting it was fixed.  I
guess that for now, it is a 'letter evil' you'll need to live with.

Regards,
David

-Original Message-
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 1:02 PM
To: 'Struts Users Mailing List'
Subject: Tags rewrite wrong action url


Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/ Struts rendered //someaction.do or form
action=//someaction.do to the browser, while /someaction.do or form
action=/someaction.do/  was expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!


Yufan Shi

We are Online!

http://www.ivanshi.com/blog/






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



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



RE: Tags rewrite wrong action url

2005-01-15 Thread Yufan Shi
Hi,

Strange,strange and strange.
In my another application running on the root context of  tomcat's one
vhost, everything is ok...
The only difference between the two application is that the version of
tomcat. one is 5.0.19, while the other one is 5.0.28.


Yufan Shi
We are Online!
http://www.ivanshi.com/blog/
 

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 16, 2005 3:04 AM
To: Struts Users Mailing List
Subject: RE: Tags rewrite wrong action url 

Yufan,

This is a known problem with Struts IF Struts is used as a ROOT webapp.  It
probably happens with any container or app server, not just Tomcat.

A post back in November (25th, 2004) wrote the easiest current way to fix it
would be to hack a line or two if the RequestProcessor.processForwardConfig
class to remove the leading / slash character.  The URL for that post is:
http://marc.theaimsgroup.com/?l=struts-userm=110136285004088w=2

I think this happens because the method tries to add any path before the
slash but the HttpServletRequest gives back only a slash for the root
webapp.  I tried to check the code repository to see if this was fixed in a
version being worked on but I don't see anything suggesting it was fixed.  I
guess that for now, it is a 'letter evil' you'll need to live with.

Regards,
David

-Original Message-
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 1:02 PM
To: 'Struts Users Mailing List'
Subject: Tags rewrite wrong action url


Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/ Struts rendered //someaction.do or form
action=//someaction.do to the browser, while /someaction.do or form
action=/someaction.do/  was expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!


Yufan Shi

We are Online!

http://www.ivanshi.com/blog/






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



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



exception frustrations - solved

2005-01-15 Thread Nathan Coast
Hi,
I've been strugling for a while with exception handling.  I've been 
trying to ensure:
1) all exceptions are displayed consistently regardless of where / how 
the exception is raised.
2) the root cause exception is always displayed,

I'm not saying this is the best solution, nor even a 'correct' solution, 
but it is a way I have found that works with the least amount of coding 
- so I thought it'd be useful to share.

I have tested the following situations where exceptions are raised
1) Action
2) JSP
3) JSP compile error
4) a jsp included by tiles / jsp:include / jsp:forward
5) an action included by tiles / jsp:include / jsp:forward
6) exception raised in a tag class
cases 4,5 were the only real problem as most attempts to handle 
exceptions resulted in an IllegalStateException or the error page 
appearing nested within some other page.

solution overview:
all errors go to a single error jsp,  this error page locates the root 
cause exception and places the throwable into the session.  The jsp then 
redirects the browser to a second jsp (using meta-refresh) this 
ViewError.jsp retrieves the error from the session and displays it.

Details:
1) define a single Error JSP
/WEB-INF/pages/Error.jsp:
**
%@ page isErrorPage=true %
%@ page import=org.apache.struts.Globals %
%@ page import=org.apache.commons.lang.exception.ExceptionUtils %
%
  //check for tag exceptions that are the 'real' exception
  Throwable th = (Throwable) request.getAttribute(Globals.EXCEPTION_KEY);
  if (th == null)
  {
th = exception;
  }
  //check exception for root cause using commons-lang ExceptionUtils
  Throwable rootCause = ExceptionUtils.getCause(th);
  if(rootCause != null)
  {
th = rootCause;
  }
  //best place to log errors is here
  session.setAttribute(some_key, th);
%
html
META HTTP-EQUIV=Refresh CONTENT=0;url=%=request.getContextPath() 
%/ViewError.jsp
/html

***
2) place this directive within every jsp page:
%@ page errorPage=/WEB-INF/pages/Error.jsp %
3) define the following error-page in web.xml
  error-page
exception-typejava.lang.Throwable/exception-type
location/WEB-INF/pages/Error.jsp/location
  /error-page
4) Define your ViewError.jsp
The ViewError.jsp contains the exception display code that you would 
normally place in your error jsp. ViewError.jsp is not a jsp error page 
(no isErrorPage directive) and you need to include code to retrieve / 
remove the Throwable from the session:

ViewError.jsp snip:
***
%
Throwable ex = (Throwable) session.getAttribute(some_key);
session.removeAttribute(some_key);
%
//display the error:
   pre
   % ex.printStackTrace(new PrintWriter(out)); %
   /pre
***
I prefer all jsps to be beneath WEB-INF/pages so I define a simple 
action class to access my ViewError.jsp and redirect to /ViewError.do in 
my Error.jsp (you can skip this step if your /ViewError.jsp is not 
beneath /WEB-INF)

I'd be interested to hear if anyone has any better solutions as this 
still feels a little ugly:

1) all jsps having the error page defined is there no way to set the 
error-page globally
2) saving and retrieving all 'real' tag exceptions via the request and 
throwing an intermediate JspException (can be avoided if all tag classes 
wrap root cause exceptions in the JspException) there seems to be plenty 
of code like this in struts:
catch (ClassCastException e) {
  saveException(pageContext, e);
  throw new JspException(blah blah blah);
}
I think the JspException(Throwable) constructor was added in jsp 2.0 so 
I guess backwards compatability is why this isn't in struts (yet).
3) redirecting browsers, saving and retrieving exceptions in sessions

I still feel like I should be able to define my error handling mechanism 
in one place (like in web.xml) and job done.

cheers
Nathan
--
Nathan Coast
Managing Director
Codeczar Ltd
mob : (852) 9049 5581
tel : (852) 2834 8733
fax : (852) 2834 8755
web : http://www.codeczar.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem submiting List-Backed Indexed ActionForm

2005-01-15 Thread Curtis Taylor
Hi Oleg,
Have a look here:
http://wiki.apache.org/struts/StrutsCatalogLazyList
I've found these techniques to be invaluable.
HTH,
-- Curtis
Oleg wrote:
I am initializing ArrayList fields in reset(), but code is ommited.
I wish it was that easy :)

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


RE: Tags rewrite wrong action url

2005-01-15 Thread David G. Friedman
Then perhaps the issue is the context rewriting in
the mod_jk/mod_jk2 mapping?

Regards,
David

-Original Message-
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 9:54 PM
To: 'Struts Users Mailing List'
Subject: RE: Tags rewrite wrong action url


Hi,

Strange,strange and strange.
In my another application running on the root context of  tomcat's one
vhost, everything is ok...
The only difference between the two application is that the version of
tomcat. one is 5.0.19, while the other one is 5.0.28.


Yufan Shi
We are Online!
http://www.ivanshi.com/blog/


-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 16, 2005 3:04 AM
To: Struts Users Mailing List
Subject: RE: Tags rewrite wrong action url

Yufan,

This is a known problem with Struts IF Struts is used as a ROOT webapp.  It
probably happens with any container or app server, not just Tomcat.

A post back in November (25th, 2004) wrote the easiest current way to fix it
would be to hack a line or two if the RequestProcessor.processForwardConfig
class to remove the leading / slash character.  The URL for that post is:
http://marc.theaimsgroup.com/?l=struts-userm=110136285004088w=2

I think this happens because the method tries to add any path before the
slash but the HttpServletRequest gives back only a slash for the root
webapp.  I tried to check the code repository to see if this was fixed in a
version being worked on but I don't see anything suggesting it was fixed.  I
guess that for now, it is a 'letter evil' you'll need to live with.

Regards,
David

-Original Message-
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 1:02 PM
To: 'Struts Users Mailing List'
Subject: Tags rewrite wrong action url


Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use html:rewrite action=/someaction/ or
html:form action=/someaction/ Struts rendered //someaction.do or form
action=//someaction.do to the browser, while /someaction.do or form
action=/someaction.do/  was expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!


Yufan Shi

We are Online!

http://www.ivanshi.com/blog/






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



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


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