Re: Problem in displaying ValueObject contents using logic tag

2004-01-03 Thread Nisith Dash
yoyu have to specify the class name of the value object in the type
attribute of the iterate tag.
this will solve the problem

- Original Message -
From: "Sudhakar G" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 02, 2004 12:13 PM
Subject: Problem in displaying ValueObject contents using logic tag


Hi All,
My ArrayList holds a set of  ValueObjects.When I try to display the
ArrayList contents using logic tag it is throwing an exception saying can't
find the "clientview" bean.

In Action class the code is like.

 request.setAttribute("ClientList",clientListVO);
 return mapping.findForward("success");


In Jsp

 



Value Object has ClientID as attribute with get and set methods.

Can any one help in this problem that will be thankful..


Thanks in advance..

cheers
Sudhakar




DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received this
message by mistake please notify the sender by return  e-mail and delete
this message from your system. Any unauthorized use or dissemination of this
message in whole or in part is strictly prohibited.  Please note that
e-mails are susceptible to change and MindTree shall not be liable for any
improper, untimely or incomplete transmission.

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

DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery of the message to such person) and may contain legally privileged and 
confidential information belonging to Tata Consultancy Services. It must not be 
printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever 
manner) by any person other than the addressee. Unauthorized use, disclosure or 
copying is strictly prohibited and may constitute unlawful act and can possibly 
attract legal action, civil and/or criminal. The contents of this message need not 
necessarily reflect or endorse the views of Tata Consultancy Services on any subject 
matter. Any action taken or omitted to be taken based on this message is entirely at 
your risk and neither the originator of this message nor Tata Consultancy Services 
takes any responsibility or liability towards the same. Opinions, conclusions and any 
other information contained in this message that do not relate to the official 
business of Tata Consultancy Services shall be understood as neither given nor 
endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. 
If you have received this message in error, you should destroy this message and may 
please notify the sender by e-mail. Thank you.


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

struts vs. portal framework

2004-01-03 Thread Naresh Agarwal
Hi

I'm new to the world of web application/portals.

What is the difference between struts and a portal framework like jetspeed?

thanks,
Naresh

RE: logic:messagesPresent do not show messages

2004-01-03 Thread stefan . berger
Dear Ivan

Thanks for your answer. But this solution works for ActionErrors ! 
My question was about ActionMessages. My ActionErrors are working the old way.
But my Problem still are the ActionMessages.

I saw this lesson as well, but it was not my solution.
Do u have another idea. How to solve the problem with ActionMessages ?


Best regards
Stefan


Zitat von Ivan De La Pena <[EMAIL PROTECTED]>:

> Stefan,
> 
> here is how i do it :
> JSP PAGE looks like this :
> __
> 
> 
>  key="errors.validation.header"/>
> 
>   
> 
> 
> 
> 
> 
> 
> ACTION CLASS looks like this :
> 
> 
>   ActionErrors errors = new ActionErrors();
> ActionError error = new
> ActionError("error.employee.databaseException");
> errors.add( ActionErrors.GLOBAL_ERROR, error );
> saveErrors( request, errors );
> return (mapping.findForward("error"));
> 
> 
> 
> I followed the example on this page :
> http://www.reumann.net/do/struts/lesson2/step10
> 
> HTH
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 01, 2004 5:04 AM
> To: [EMAIL PROTECTED]
> Subject: logic:messagesPresent do not show messages
> 
> 
> Hi, happy new year to all struts user.
> 
> I use struts 1.1 and use the ActionMessages for displaying messages (like
> 'successfull
> updatet, and so on)
> 
> In my ActionClass i have this:
> [CODE]
> ActionMessages messages = new ActionMessages();
> messages.add("msg01", new ActionMessage("message.successfull.login"));
> 
> if (!messages.isEmpty()){
>   saveMessages(messages, request);
> }
> [/CODE]
> 
> In my JSP-Page i have this:
> [CODE]
>   
>   
> 
>   
>
> [/CODE]
> 
> When run this code, i received this error "no bean found "msg" on any
> scope". (At the line
> of (bean:write)
> 
> Has somebody any idea whats wrong here ?
> If you have some example code, this will be great.
> 
> Best regards
> Stefan
> 
> 
> 
> -
> 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]



[FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz

2004-01-03 Thread Ted Husted
Last time (which was some time ago), we asked contestants to identify the title and 
author of a seminal paper regarding artificial intelligence published by the journal 
MIND in 1950. Our bonus question regarding a tangentially related story by Harlan 
Ellison (gotta love Harlan).

As many already know, here are the correct answers

The paper was entitled "" and written by "". The Ellison story featured an AI computer 
named "AM" by the title "I have no mouth and I must scream".

Sadly, one contestant let the cat of the bag and posed the answers to the user list. 
But no worries, we'll just make it a drawing instead. So, that week's winner, selected 
from all the responses, is:

* MICHAEL MCGRADY

as our winning contestant. (Michael, please send your surface mail address to [EMAIL 
PROTECTED], and indicate whether you would like JUnit in Action or Struts in Action)





NEXT:


A popular science fiction series featured a psy cop named after a science fiction 
author

1 Name the series

2 Name the character

3 Name the actor who played the character

4 Name the character this actor played in another famous science fiction series


*OR*, answer this bonus question instead:


* List the 12 core practices of Extreme Programming.


Contestants sending -- directly to me at [EMAIL PROTECTED] -- correct answers to the 
to the bonus question *OR* the SF question to me will be eligible for the next 
drawing. (the correct answers being the ones I expect). Prior winners excluded (but 
feel free to play anyway).

The contest will run until Thursday, January 8, 2004, 23:59:59, so everyone has a 
chance to participate.

The lucky winner selected from the correct responses will receive their choice of 
either a signed copy of Struts in Action *OR* JUnit in Action.

(Signed only by me, I'm afraid, my co-authors are scattered across the globe -- gotta 
love the Internet!)

PLEASE be sure to reply to [EMAIL PROTECTED]

If you have an interesting science fiction or computer science question that is hard, 
or at least fun, to google, please send it to me. The first to suggest a question that 
we use also wins!

-Ted.

PLEASE be sure to reply to [EMAIL PROTECTED]


--
Ted Husted,
   Junit in Action  - ,
   Struts in Action - ,
   JSP Site Design  - .



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



Paging for table...

2004-01-03 Thread vasudevrao gupta

Hi,

I have a requirement where in user executes a query and gets some x
number of records.
I have to show the user 1-y records per page and when user clicks "next"
button, he should be
be able to see next y number of records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework to do this kind of paging

Regards
VasudevRaoGupta


Confidentiality Notice 

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

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



Re: dynamic input fields

2004-01-03 Thread Mark Lowe
What does your action form look like?

The jsp should look something like this




Cheers Mark

On 3 Jan 2004, at 03:22, Otávio Augusto wrote:

I need to generate html:text fields on demand. If i have N elements in 
a certain collection, i need one html:text field for every one of the 
elements in that collection. how to perform that? I'm using the code:



Value:
*


What is missing?
Thanks in advance
Otávio Augusto

-
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: [FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz

2004-01-03 Thread Martin Gainty
Project Practices as whole Team
Project Practices used for the Planning Game
Project Practices implements Small Release deliverables
Project Practices implements Customer Tests

Programmer Practices in Simple Design
Programmer Practices in Pair Programming
Programmer Practices development which is test-driven
Programmer Practices continuous Design Improvement

Team Practices continuous Integration
Team Practices Collective Code Ownership
Team Practices and supports Coding Standards
Team Practices at a sustainable pace

On a personal note I question items 6) and 10)
as anyone doing their nails while someone else does the work can be
demoralising to the individual accomplishing the work..yes I have seen
numerous instances ..
In other words been there done that..

Which Twilight Zone episode has psy-cops?

-Martin

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 03, 2004 7:08 AM
Subject: [FRIDAY] YA Stuts In Action / JUnit in Action Trivia Quiz


Last time (which was some time ago), we asked contestants to identify the
title and author of a seminal paper regarding artificial intelligence
published by the journal MIND in 1950. Our bonus question regarding a
tangentially related story by Harlan Ellison (gotta love Harlan).

As many already know, here are the correct answers

The paper was entitled "" and written by "". The Ellison story featured an
AI computer named "AM" by the title "I have no mouth and I must scream".

Sadly, one contestant let the cat of the bag and posed the answers to the
user list. But no worries, we'll just make it a drawing instead. So, that
week's winner, selected from all the responses, is:

* MICHAEL MCGRADY

as our winning contestant. (Michael, please send your surface mail address
to [EMAIL PROTECTED], and indicate whether you would like JUnit in Action or
Struts in Action)





NEXT:


A popular science fiction series featured a psy cop named after a science
fiction author

1 Name the series

2 Name the character

3 Name the actor who played the character

4 Name the character this actor played in another famous science fiction
series


*OR*, answer this bonus question instead:


* List the 12 core practices of Extreme Programming.


Contestants sending -- directly to me at [EMAIL PROTECTED] -- correct
answers to the to the bonus question *OR* the SF question to me will be
eligible for the next drawing. (the correct answers being the ones I
expect). Prior winners excluded (but feel free to play anyway).

The contest will run until Thursday, January 8, 2004, 23:59:59, so everyone
has a chance to participate.

The lucky winner selected from the correct responses will receive their
choice of either a signed copy of Struts in Action *OR* JUnit in Action.

(Signed only by me, I'm afraid, my co-authors are scattered across the
globe -- gotta love the Internet!)

PLEASE be sure to reply to [EMAIL PROTECTED]

If you have an interesting science fiction or computer science question that
is hard, or at least fun, to google, please send it to me. The first to
suggest a question that we use also wins!

-Ted.

PLEASE be sure to reply to [EMAIL PROTECTED]


--
Ted Husted,
Junit in Action - ,
Struts in Action - ,
JSP Site Design - .



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

2004-01-03 Thread Mark Lowe
Not sure if its deprecated but i always use



rather than attribute which i don't know anything about.

Cheers Mark

On 2 Jan 2004, at 20:44, Sifuentes, Ben wrote:

I have been trying to do the following:
	
		name="searchForm"
		type="com.mckesson.eig.actions.search.patient.SearchForm">
			
type="java.util.ArrayList"/>
			
type="java.util.ArrayList"/>
			
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
			
			
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.util.ArrayList"
className="com.mckesson.eig.common.struts.NullInitialPropertyConfig"/>
			
type="java.lang.String"/>
			
type="java.lang.String"/>
			
type="java.lang.Integer"/>
			
type="java.util.ArrayList"/>			
			
type="java.lang.String"/>		
			
type="java.lang.String[]"/>			
			
type="java.lang.String"/>			
			
type="java.lang.String"/>
			
type="com.mckesson.eig.common.presentation.properties.WindowPopupProper 
ties"
/>
	


attribute="searchForm"
scope="session"
validate="false">

	Based on the following struts documentation this should have worked?

	
	
type="org.apache.struts.webapp.example.EditRegistrationAction"
	 attribute="registrationForm"
	 scope="request"
	 validate="false">
	  
	
	
	When the /editRegistration action is invoked, a registrationForm is
created and added to the request, but its validate method is not  
called. The
default value of the validate attribute is true, so if you do not want  
an
action to trigger form validation, you need to remember to add this
attribute and set it to false.

So now when I print off the session values when the action is fired
these attributes are the only ones that exists:
[02 Jan 2004 13:40:58,699] [RemoteParameterAction] Scope: session
[02 Jan 2004 13:40:58,699] [RemoteParameterAction] searchForm must
be null in session
[02 Jan 2004 13:40:58,709] [RemoteParameterAction] name: SWIM_USER
[02 Jan 2004 13:40:58,779] [RemoteParameterAction] name:
SWIM_FACILITY
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
SESSION_MANAGER
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name: SWIM_MRN
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
org.apache.struts.action.LOCALE
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Our Form is
null
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Controller
contains Mrn: [032599]
I was expecting to see a searchForm in the session based on the
documentation also that the form would not be null that was passed to
execute.
	-Ben



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

2004-01-03 Thread Matthias Wessendorf
hi,

attribute:   
Name of the request-scope or session-scope attribute that
is used to access our ActionForm bean, if it is other than
the bean's specified "name". Optional if "name" is specified,
else not valid.

if you have something like this:



and:

 


your FormBean "form" of type:DynaValidatorForm
is named as "foo" 
request.getAttribute("foo");
or
request.getSession().getAttribute("foo");

greetings 
matthias


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 03, 2004 2:05 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm question


Not sure if its deprecated but i always use

 I have been trying to do the following:
>  name="searchForm"
>
type="com.mckesson.eig.actions.search.patient.SearchForm">
>   
>type="java.util.ArrayList"/>
>   
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>   
>   
>   
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.util.ArrayList"
> className="com.mckesson.eig.common.struts.NullInitialPropertyConfig"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.Integer"/>
>type="java.util.ArrayList"/>  
>type="java.lang.String"/> 
>type="java.lang.String[]"/>   
>type="java.lang.String"/> 
>type="java.lang.String"/>
>   
type="com.mckesson.eig.common.presentation.properties.WindowPopupProper 
> ties"
> />
>   
>
>  path="/remoteParam"
>   
> type="com.mckesson.eig.actions.RemoteParameterAction">
>   attribute="searchForm"
>   scope="session"
>   validate="false">
>   
>
>
>   Based on the following struts documentation this should have
worked?
>
>  
> type="org.apache.struts.webapp.example.EditRegistrationAction"
>attribute="registrationForm"
>scope="request"
>validate="false">
> 
>   
>   
>   When the /editRegistration action is invoked, a registrationForm
is 
> created and added to the request, but its validate method is not
> called. The
> default value of the validate attribute is true, so if you do not want

> an
> action to trigger form validation, you need to remember to add this
> attribute and set it to false.
>
>   So now when I print off the session values when the action is
fired 
> these attributes are the only ones that exists:
>
>   [02 Jan 2004 13:40:58,699] [RemoteParameterAction] Scope:
session
>   [02 Jan 2004 13:40:58,699] [RemoteParameterAction] searchForm
must be 
> null in session
>   [02 Jan 2004 13:40:58,709] [RemoteParameterAction] name:
SWIM_USER
>   [02 Jan 2004 13:40:58,779] [RemoteParameterAction] name: 
> SWIM_FACILITY
>   [02 Jan 2004 13:40:58,789] [RemoteParameterAction] name: 
> SESSION_MANAGER
>   [02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
SWIM_MRN
>   [02 Jan 2004 13:40:58,789] [RemoteParameterAction] name: 
> org.apache.struts.action.LOCALE
>   [02 Jan 2004 13:40:58,789] [RemoteParameterAction] Our Form is 
> null
>   [02 Jan 2004 13:40:58,789] [RemoteParameterAction] Controller 
> contains Mrn: [032599]
>
>
>   I was expecting to see a searchForm in the session based on the 
> documentation also that the form would not be null that was passed to 
> execute.
>
>
>   -Ben
>
>
>
>
> -
> 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: Howto answer: Validate two input forms (PDA and 1024x768) for same Action

2004-01-03 Thread Iain Sanderson
Answered my own question.



and



 ie 2 action paths in struts-config pointing to the same Action type, each 
referring back to different input JSPs. No extra code.

Iain.





Iain Sanderson <[EMAIL PROTECTED]>
01/02/2004 09:51 AM
Please respond to "Struts Users Mailing List"
 
To: [EMAIL PROTECTED]
cc: 
Subject:Howto please: Validate two input forms (PDA and 
1024x768) for same Action


I'm evolving a large STRUTS medical application to place some of it's 
functionality on 802.11b-enabled Pocket PC devices using Mobile IE, 
reformatting views to the 240x320 pixel resolution for these devices.
My method is to test the request header for this resolution and Forward 
the response on to  smaller (240x320) output JSPs, leaving all the 
underlying Action and  business logic unchanged. It works very well, 
maintaining nice MVC principles.  The challenge is that I would like to do 

the same with input forms, but cut down the input view  for the PDA 
version, maintain validation for the PDA version, and return control to 
the PDA version if a validation error occurs.

This is the Action code that directs the ActionForward to two outputs, one 

regular, one PDA.

public class SchedChoiceActions extends DispatchAction {

// some more ActionForwards here


   /*
 *The "liveOff" Action is invoked if the "liveOff" request parameter 
has the value "off"
 *
 */
public ActionForward liveOff(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

   // more stuff
 
// Forward control to the specified success URI
if(request.getHeader("user-agent").indexOf("240x320")>0) {return 
(mapping.findForward("outputPdaVersion")); }
 else{  return (mapping.findForward("output"));} 
}
}

Here's the problem on the INPUT side. If a validation error ocurs in the 
PDA version of an input form, I only have one option of returning control 
to the input form, and in my current app, it returns control via 
struts-config to a regularly sized JSP. I can't differentially send a PDA 
validation error back to the PDA input  JSP, sharing the Action with a 
regular set of input forms.

Is there an elegant solution for this?   Areas I'm exploring  1) Chaining 
an action for the PDA version input form to call the 'regular' action, 
which can then test for output resolution as above ( ugh!).2) Can Strut's 
Validator do this? (currently validating only in ActionForms).

Thanks,

Iain Sanderson.




Re: DynaActionForm question

2004-01-03 Thread Mark Lowe
Nice...

So the attribute attribute lets you override the the attribute name 
when the setAttribute method is called, rather than using the default 
form name.

Thanks Mark

On 3 Jan 2004, at 14:13, Matthias Wessendorf wrote:

hi,

attribute:
Name of the request-scope or session-scope attribute that
is used to access our ActionForm bean, if it is other than
the bean's specified "name". Optional if "name" is specified,
else not valid.
if you have something like this:


and:

 

your FormBean "form" of type:DynaValidatorForm
is named as "foo"
request.getAttribute("foo");
or
request.getSession().getAttribute("foo");
greetings
matthias
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 2:05 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm question
Not sure if its deprecated but i always use



rather than attribute which i don't know anything about.

Cheers Mark

On 2 Jan 2004, at 20:44, Sifuentes, Ben wrote:

I have been trying to do the following:

type="com.mckesson.eig.actions.search.patient.SearchForm">
			type="java.util.ArrayList"/>

type="java.lang.String"/>







type="java.lang.String"/>
			type="java.lang.String"/>
			type="java.lang.String"/>






   
  

  


type="com.mckesson.eig.common.presentation.properties.WindowPopupProper
ties"
/>


attribute="searchForm"
scope="session"
validate="false">

	Based on the following struts documentation this should have
worked?

  


When the /editRegistration action is invoked, a registrationForm
is
created and added to the request, but its validate method is not
called. The
default value of the validate attribute is true, so if you do not want

an
action to trigger form validation, you need to remember to add this
attribute and set it to false.
	So now when I print off the session values when the action is
fired
these attributes are the only ones that exists:

	[02 Jan 2004 13:40:58,699] [RemoteParameterAction] Scope:
session
	[02 Jan 2004 13:40:58,699] [RemoteParameterAction] searchForm
must be
null in session
[02 Jan 2004 13:40:58,709] [RemoteParameterAction] name:
SWIM_USER
[02 Jan 2004 13:40:58,779] [RemoteParameterAction] name:
SWIM_FACILITY
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
SESSION_MANAGER
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
SWIM_MRN
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
org.apache.struts.action.LOCALE
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Our Form is
null
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Controller
contains Mrn: [032599]
I was expecting to see a searchForm in the session based on the
documentation also that the form would not be null that was passed to
execute.
	-Ben



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


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


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


Re: struts vs. portal framework

2004-01-03 Thread Ted Husted
IMHO, Jetspeed isn't a framework per se (or wasn't last time I looked). It's an 
application that you can customize for your own use. You can write custom components 
for  Jetspeed to use, but you're really plugging things into Jetspeed, the way you 
plug things into an IDE, like Eclipse or IDEA. A power user could download Jetspeed 
and get it up and running without being a Java developer.

Struts is a framework to help Java developers create MVC-style web applications. You 
use it to give you a leg up on writing applications. A power use couldn't download 
"Struts" and get it up and running, because Struts isn't something you run. It's 
something you use to create web applications for people to run.

If you download Jetspeed, and it's pretty much what you want, then that's probably 
want you want to use. But if it's nothing like what you need, and you need to write a 
MVC-style web application, the Struts may be what you need.

For more background on the technologies that are used to write web applications, see 
the preface to the Struts User Guide



and the Struts Community Resource Guide at SourceForge

http://struts.sourceforge.net/community/index.html

Struts does not directly support the new portlet specification at this time, but there 
is a lot of interest on the DEV in making that happen. We do want to make Struts a 
very good choice for writing web apps for both the servlet spec and portlet spec, 
hopefully with zero or near-zero code changes.

HTH, Ted.

On Sat, 03 Jan 2004 11:22:36 +, Naresh Agarwal wrote:
> Hi
>
>
> I'm new to the world of web application/portals.
>
>
> What is the difference between struts and a portal framework like
> jetspeed?
>
>
> thanks,
> Naresh




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



RE: Paging for table...

2004-01-03 Thread David Friedman
I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


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



RE: Paging for table...

2004-01-03 Thread vasudevrao gupta

.Can you please send across the sample code that you have developed???

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] 
Sent: 03 January 2004 20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


Confidentiality Notice 

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

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



RE: Paging for table...

2004-01-03 Thread David Friedman
The site I gave you, www.displaytag.org (with source and binaries available
from SourceForge.net), lists plenty of examples and code.  Basically, you
have a collection of objects (usually in request or session scope, but you
can do it in page scope) and set your tag with the columns.  From their
"basic columns" example, if you have a List stored as "test", for each item
you can display the fields id, name, email, status, description using the
below code:


  
  
  
  
  


Just keep in mind the binary updates a few jars to newer versions.  Off the
top of my head, I think it updates (don't pay attention, I just code *grin*)
commons-lang, commons-beanutils, commons-logging, and commons-collections.
But don't worry, they are in the binary distribution's example .war
application and work fine with Struts v1.1 (probably with v1.0 as well).

Also, fancier things are available, such as sorting, grouping, and
downloading the fields as excel, csv, and xml.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 10:27 AM
To: 'David Friedman'; 'Struts Users Mailing List'
Subject: RE: Paging for table...



.Can you please send across the sample code that you have developed???

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: 03 January 2004 20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


Confidentiality Notice

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

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


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



Design Questions

2004-01-03 Thread Scott McClure
I am trying to design a basic struts application, and I would like the 
opinion of those on the list about some design questions.

First, I was thinking about using a single UserForm to validate all 
forms relating to a user, for instance. The problem is, is that some 
fields would not be necessary for update actions and their validation 
code would throw a ActionError with the default value. I could use 
conditional validation in the ActionForm based upon the ActionMapping, 
but that would create ties between the config file and code that I am 
not sure I want to make. What is your opinion?

Next, I am trying to tackle the problem of the granularity of my Action 
objects. At first, I thought about using a DispatchAction, but that only 
allows me to use one ActionForm for all of the Actions in that class. 
Then, I thought that maybe wildcards would solve my problem. Wildcards, 
though, seem like a security concern, where it would be theoretically 
possible to run an action that is not intended to be run (to exploit any 
handling errors). Also, I am not sure if that solves any granularity 
problems, but merely simplifies configuration in the config file. Are 
there any other good solutions for solving granularity problems? Did I 
mis-understand DispatchAction? General comments on security with 
wildcards would also be very interesting.

Also, slightly off-topic of my previous questions, what naming 
conventions do people use for application messages? In struts I have 
seen a general format of prompt.*, heading.*, and using page specific 
messages under the page name. What are some suggestions? I want to 
resolve to a naming standard now so I dont have to go through and change 
everything if it becomes a code managibilty concern.

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


RE: Design Questions

2004-01-03 Thread Guillermo Meyer
This is our experience using DispatchAction. I'll try to summarize:
Our application uses DispatchAction. In fact, we have one action for
each use case. All administration use cases (Operators admin, accounts
admin, banks admin, etc) uses actions that extends from an
AdministrationBaseAction. This action implements Template pattern. It
has filter, list, detail, update, save and delete methods and has
protected methods to be overriden if necesary (beforeSave, afterList,
etc). In the simplest case, we do'nt extend this base action. 
We place business logic in Services (JMX Services) implementing a
UseCase Pattern or facade pattern, and these services has a common
interface (AdministrationService) that has methods like list, delete,
save, etc., so visibility from AdministrationBaseAction is to
AdministrationService and services are got by a ServiceLocator pattern.
We configure servicename for each action in a set-property in
struts-config file (JNDI service name).

Saludos desde Buenos Aires.
Guillermo.
PD [OT] : Visit el calafate!! http://www.elcalafate.com.ar/


-Original Message-
From: Scott McClure [mailto:[EMAIL PROTECTED] 
Sent: Sábado, 03 de Enero de 2004 12:50 p.m.
To: [EMAIL PROTECTED]
Subject: Design Questions


I am trying to design a basic struts application, and I would like the 
opinion of those on the list about some design questions.

First, I was thinking about using a single UserForm to validate all 
forms relating to a user, for instance. The problem is, is that some 
fields would not be necessary for update actions and their validation 
code would throw a ActionError with the default value. I could use 
conditional validation in the ActionForm based upon the ActionMapping, 
but that would create ties between the config file and code that I am 
not sure I want to make. What is your opinion?

Next, I am trying to tackle the problem of the granularity of my Action 
objects. At first, I thought about using a DispatchAction, but that only

allows me to use one ActionForm for all of the Actions in that class. 
Then, I thought that maybe wildcards would solve my problem. Wildcards, 
though, seem like a security concern, where it would be theoretically 
possible to run an action that is not intended to be run (to exploit any

handling errors). Also, I am not sure if that solves any granularity 
problems, but merely simplifies configuration in the config file. Are 
there any other good solutions for solving granularity problems? Did I 
mis-understand DispatchAction? General comments on security with 
wildcards would also be very interesting.

Also, slightly off-topic of my previous questions, what naming 
conventions do people use for application messages? In struts I have 
seen a general format of prompt.*, heading.*, and using page specific 
messages under the page name. What are some suggestions? I want to 
resolve to a naming standard now so I dont have to go through and change

everything if it becomes a code managibilty concern.

Thanks,
Scott


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



how to compare two string variables most efficiently? (logic:equal does only variable vs. string constant?)

2004-01-03 Thread Ralf Hauser
Hi,

So far, my 
I could get there, but what is the recommended way?

Rgds Ralf

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



html:button

2004-01-03 Thread Otávio Augusto
Small question: what is (or what means) the "property" attribute i have to add when 
using the html:button tag?

Thanks
Otávio Augusto

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



Re: html:button

2004-01-03 Thread Mike Deegan
property = the name assigned to the generated input field

- Original Message - 
From: "Otávio Augusto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 03, 2004 12:49 PM
Subject: html:button


Small question: what is (or what means) the "property" attribute i have to
add when using the html:button tag?

Thanks
Otávio Augusto

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

2004-01-03 Thread Otávio Augusto
That means I have to add, in my FormAction, a field corresponding to the button in the 
jsp?

On Sat, 3 Jan 2004 13:24:55 -0700
"Mike Deegan" <[EMAIL PROTECTED]> wrote:

> property = the name assigned to the generated input field
> 
> - Original Message - 
> From: "Otávio Augusto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, January 03, 2004 12:49 PM
> Subject: html:button
> 
> 
> Small question: what is (or what means) the "property" attribute i have to
> add when using the html:button tag?
> 
> Thanks
> Otávio Augusto
> 
> -
> 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: html:button

2004-01-03 Thread David Friedman
Otávio,

When you set your property to, say, 'property="something"', it gets invoked
as 'form.getSomething();'.

Regards,
David

-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 3:33 PM
To: Struts Users Mailing List
Subject: Re: html:button


That means I have to add, in my FormAction, a field corresponding to the
button in the jsp?

On Sat, 3 Jan 2004 13:24:55 -0700
"Mike Deegan" <[EMAIL PROTECTED]> wrote:

> property = the name assigned to the generated input field
>
> - Original Message -
> From: "Otávio Augusto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, January 03, 2004 12:49 PM
> Subject: html:button
>
>
> Small question: what is (or what means) the "property" attribute i have to
> add when using the html:button tag?
>
> Thanks
> Otávio Augusto
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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


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



Re: html:button

2004-01-03 Thread Otávio Augusto
hmm,now I got it. By the time I had this doubt, I was using input button the html way. 
The html:form action="someAction" defines the Action class I want to execute to 
process the fields. If using the simple html button, what corresponds to the property 
attribute? I'm used to apply the property attribute to many other struts tags, but 
don't see any use for the html:button tag (sorry for my ignorance :D).

Thanks for the help.

Otávio Augusto

On Sat, 3 Jan 2004 15:43:17 -0500
"David Friedman" <[EMAIL PROTECTED]> wrote:

> Otávio,
> 
> When you set your property to, say, 'property="something"', it gets invoked
> as 'form.getSomething();'.
> 
> Regards,
> David
> 
> -Original Message-
> From: Otávio Augusto [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 03, 2004 3:33 PM
> To: Struts Users Mailing List
> Subject: Re: html:button
> 
> 
> That means I have to add, in my FormAction, a field corresponding to the
> button in the jsp?
> 
> On Sat, 3 Jan 2004 13:24:55 -0700
> "Mike Deegan" <[EMAIL PROTECTED]> wrote:
> 
> > property = the name assigned to the generated input field
> >
> > - Original Message -
> > From: "Otávio Augusto" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, January 03, 2004 12:49 PM
> > Subject: html:button
> >
> >
> > Small question: what is (or what means) the "property" attribute i have to
> > add when using the html:button tag?
> >
> > Thanks
> > Otávio Augusto
> >
> > -
> > 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]
> 

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



RE: html:button

2004-01-03 Thread David Friedman
Otávio,

Perhaps the documentation would be of better use at this point.  You can
find details of the html taglib and descriptions of the available attributes
at: http://jakarta.apache.org/struts/userGuide/struts-html.html

According to that page, though it might relate specifically to the nightly
build, the html:button tag does have a property attribute.

Regards,
David

-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 3:46 PM
To: Struts Users Mailing List
Subject: Re: html:button


hmm,now I got it. By the time I had this doubt, I was using input button the
html way. The html:form action="someAction" defines the Action class I want
to execute to process the fields. If using the simple html button, what
corresponds to the property attribute? I'm used to apply the property
attribute to many other struts tags, but don't see any use for the
html:button tag (sorry for my ignorance :D).

Thanks for the help.

Otávio Augusto

On Sat, 3 Jan 2004 15:43:17 -0500
"David Friedman" <[EMAIL PROTECTED]> wrote:

> Otávio,
>
> When you set your property to, say, 'property="something"', it gets
invoked
> as 'form.getSomething();'.
>
> Regards,
> David
>
> -Original Message-
> From: Otávio Augusto [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 03, 2004 3:33 PM
> To: Struts Users Mailing List
> Subject: Re: html:button
>
>
> That means I have to add, in my FormAction, a field corresponding to the
> button in the jsp?
>
> On Sat, 3 Jan 2004 13:24:55 -0700
> "Mike Deegan" <[EMAIL PROTECTED]> wrote:
>
> > property = the name assigned to the generated input field
> >
> > - Original Message -
> > From: "Otávio Augusto" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, January 03, 2004 12:49 PM
> > Subject: html:button
> >
> >
> > Small question: what is (or what means) the "property" attribute i have
to
> > add when using the html:button tag?
> >
> > Thanks
> > Otávio Augusto
> >
> > -
> > 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]
>

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



Please Help - ClassCastException

2004-01-03 Thread Caroline Jen
The statement shown below encountered a
ClassCastException:

  PostForm postForm = ( PostForm )form;

I cannot figure out the reason.  Please help.

Allow me to show more code of the class where the
exception occurred:

...

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.artimus.message.PostBean;
import org.apache.artimus.message.ThreadBean;
import org.apache.artimus.message.utility.DateUtil;

public final class StoreMessage extends Action
{
   public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response)
throws Exception 
   {

  int parentPostID;
  int threadID;
  int postID;
  String postCreationIP;
  String memberName = request.getRemoteUser();
  Timestamp now =
DateUtil.getCurrentGMTTimestamp();

  parentPostID = Integer.parseInt(
request.getParameter( "parent" ) );

  PostForm postForm = ( PostForm )form;
 
 

   }
}

__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: Please Help - ClassCastException

2004-01-03 Thread Pedro Salgado

  On your struts config file check if the form bean for StoreMessage action
is of type pkg.pkg.PostForm and if the action name is pointing to the
correct form bean... It also seems to be missing the import of the PostForm
on your action class.

Pedro Salgado

On 04/01/2004 03:22, "Caroline Jen" <[EMAIL PROTECTED]> wrote:

> The statement shown below encountered a
> ClassCastException:
> 
> PostForm postForm = ( PostForm )form;
> 
> I cannot figure out the reason.  Please help.
> 
> Allow me to show more code of the class where the
> exception occurred:
> 
> ...
> 
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionForm;
> import org.apache.commons.beanutils.BeanUtils;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> import org.apache.artimus.message.PostBean;
> import org.apache.artimus.message.ThreadBean;
> import org.apache.artimus.message.utility.DateUtil;
> 
> public final class StoreMessage extends Action
> {
>  public ActionForward execute(ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest
> request,
>   HttpServletResponse
> response)
>   throws Exception
>  {
> 
> int parentPostID;
> int threadID;
> int postID;
> String postCreationIP;
> String memberName = request.getRemoteUser();
> Timestamp now =
> DateUtil.getCurrentGMTTimestamp();
> 
> parentPostID = Integer.parseInt(
> request.getParameter( "parent" ) );
> 
> PostForm postForm = ( PostForm )form;
> 
> 
> 
>  }
> }
> 
> __
> Do you Yahoo!?
> Find out what made the Top Yahoo! Searches of 2003
> http://search.yahoo.com/top2003
> 
> -
> 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: Please Help - ClassCastException

2004-01-03 Thread Caroline Jen
Thank you for trying to help.  I have added  
import org.apache.artimus.message.PostForm; 
to my action class.  I do not fully follow what I
should check in the struts-config.xml file.  And
should I use name="postForm" with lowercase 'p' or
uppercase 'P'?

In my struts-config.xml file, I have:

 
  
  
  

  


and 


   


Do you see any problems?
--- Pedro Salgado <[EMAIL PROTECTED]> wrote:
> 
>   On your struts config file check if the form bean
> for StoreMessage action
> is of type pkg.pkg.PostForm and if the action name
> is pointing to the
> correct form bean... It also seems to be missing the
> import of the PostForm
> on your action class.
> 
> Pedro Salgado
> 
> On 04/01/2004 03:22, "Caroline Jen"
> <[EMAIL PROTECTED]> wrote:
> 
> > The statement shown below encountered a
> > ClassCastException:
> > 
> > PostForm postForm = ( PostForm )form;
> > 
> > I cannot figure out the reason.  Please help.
> > 
> > Allow me to show more code of the class where the
> > exception occurred:
> > 
> > ...
> > 
> > import org.apache.struts.action.Action;
> > import org.apache.struts.action.ActionForward;
> > import org.apache.struts.action.ActionMapping;
> > import org.apache.struts.action.ActionForm;
> > import org.apache.commons.beanutils.BeanUtils;
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> > 
> > import org.apache.artimus.message.PostBean;
> > import org.apache.artimus.message.ThreadBean;
> > import
> org.apache.artimus.message.utility.DateUtil;
> > 
> > public final class StoreMessage extends Action
> > {
> >  public ActionForward execute(ActionMapping
> mapping,
> >   ActionForm form,
> >   HttpServletRequest
> > request,
> >   HttpServletResponse
> > response)
> >   throws Exception
> >  {
> > 
> > int parentPostID;
> > int threadID;
> > int postID;
> > String postCreationIP;
> > String memberName = request.getRemoteUser();
> > Timestamp now =
> > DateUtil.getCurrentGMTTimestamp();
> > 
> > parentPostID = Integer.parseInt(
> > request.getParameter( "parent" ) );
> > 
> > PostForm postForm = ( PostForm )form;
> > 
> > 
> > 
> >  }
> > }
> > 
> > __
> > Do you Yahoo!?
> > Find out what made the Top Yahoo! Searches of 2003
> > http://search.yahoo.com/top2003
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



RE: Please Help - ClassCastException

2004-01-03 Thread David Friedman
Here is what I see (opinions vary)...

I see you are defining your form bean in your struts-config.xml as type
'org.apache.struts.validator.DynaValidatorForm'. So, why are you trying to
cast it as this 'org.apache.artimus.message.PostForm' class.  Does that
class extend DynaValidatorForm?  If it doesn't, you'll get a
ClassCastException like you're getting now.   Personally, I expected you to
cast it as:

DynaValidatorForm postForm = (DynaValidatorForm) form;

Or us it as-initially defined (not casting like above) and use BeanUtils
such as:
String receiver = (String) PropertyUtils.getSimpleProperty(form,
"receiver");

Regards,
David

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 11:04 PM
To: Struts Users Mailing List
Subject: Re: Please Help - ClassCastException


Thank you for trying to help.  I have added
import org.apache.artimus.message.PostForm;
to my action class.  I do not fully follow what I
should check in the struts-config.xml file.  And
should I use name="postForm" with lowercase 'p' or
uppercase 'P'?

In my struts-config.xml file, I have:

 
  
  
  
  
  


and


   


Do you see any problems?
--- Pedro Salgado <[EMAIL PROTECTED]> wrote:
>
>   On your struts config file check if the form bean
> for StoreMessage action
> is of type pkg.pkg.PostForm and if the action name
> is pointing to the
> correct form bean... It also seems to be missing the
> import of the PostForm
> on your action class.
>
> Pedro Salgado
>
> On 04/01/2004 03:22, "Caroline Jen"
> <[EMAIL PROTECTED]> wrote:
>
> > The statement shown below encountered a
> > ClassCastException:
> >
> > PostForm postForm = ( PostForm )form;
> >
> > I cannot figure out the reason.  Please help.
> >
> > Allow me to show more code of the class where the
> > exception occurred:
> >
> > ...
> >
> > import org.apache.struts.action.Action;
> > import org.apache.struts.action.ActionForward;
> > import org.apache.struts.action.ActionMapping;
> > import org.apache.struts.action.ActionForm;
> > import org.apache.commons.beanutils.BeanUtils;
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> >
> > import org.apache.artimus.message.PostBean;
> > import org.apache.artimus.message.ThreadBean;
> > import
> org.apache.artimus.message.utility.DateUtil;
> >
> > public final class StoreMessage extends Action
> > {
> >  public ActionForward execute(ActionMapping
> mapping,
> >   ActionForm form,
> >   HttpServletRequest
> > request,
> >   HttpServletResponse
> > response)
> >   throws Exception
> >  {
> >
> > int parentPostID;
> > int threadID;
> > int postID;
> > String postCreationIP;
> > String memberName = request.getRemoteUser();
> > Timestamp now =
> > DateUtil.getCurrentGMTTimestamp();
> >
> > parentPostID = Integer.parseInt(
> > request.getParameter( "parent" ) );
> >
> > PostForm postForm = ( PostForm )form;
> > 
> > 
> >
> >  }
> > }
> >
> > __
> > Do you Yahoo!?
> > Find out what made the Top Yahoo! Searches of 2003
> > http://search.yahoo.com/top2003
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-
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: Paging for table...

2004-01-03 Thread rahul.chaudhary

Check for paging taglib available for struts which will meet your requirements.

Rahul

-Original Message-
From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES)
Sent: Saturday, January 03, 2004 8:57 PM
To: 'David Friedman'; 'Struts Users Mailing List'
Subject: RE: Paging for table...



.Can you please send across the sample code that you have developed???

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: 03 January 2004 20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


Confidentiality Notice

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

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


Confidentiality Notice

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

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



RE: Paging for table...

2004-01-03 Thread David Friedman
Rahul,

What is this paging taglib?  Do you have a url?

Curious,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 12:15 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Paging for table...


Check for paging taglib available for struts which will meet your
requirements.

Rahul

-Original Message-
From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January
03, 2004 8:57 PM
To: 'David Friedman'; 'Struts Users Mailing List'
Subject: RE: Paging for table...



.Can you please send across the sample code that you have developed???

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004
20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


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

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


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

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


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



RE: Paging for table...

2004-01-03 Thread rahul.chaudhary

David,

Check for the details on http://www.servletsuite.com/servlets/pagertag.htm

Rahul

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 10:48 AM
To: Struts Users Mailing List
Subject: RE: Paging for table...


Rahul,

What is this paging taglib?  Do you have a url?

Curious,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 12:15 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Paging for table...


Check for paging taglib available for struts which will meet your
requirements.

Rahul

-Original Message-
From: Vasudevrao Gupta M V S S S (WT01 - UTILITIES) Sent: Saturday, January
03, 2004 8:57 PM
To: 'David Friedman'; 'Struts Users Mailing List'
Subject: RE: Paging for table...



.Can you please send across the sample code that you have developed???

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 03 January 2004
20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-Original Message-
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

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

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


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

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


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

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


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


Confidentiality Notice

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

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



RE: Please Help - ClassCastException

2004-01-03 Thread Caroline Jen
I think that there are a lot more mistakes in my code
than I originally thought.  The root of the problem is
that I do not know how to use DynaValidatorForm.  If
you could help me in learning how to code when I am
working with DynaValidatorForm.  

1. in my struts-config.xml, I have:

 
  
  
  .
  .


2. My PostForm.java is like:

import org.apache.struts.validator.DynaValidatorForm;
import org.apache.struts.action.ActionMapping;
 
public class PostForm extends DynaValidatorForm  {
 
private String receiver;
private String sender;
..

public void setReceiver( String receiver )
{
this.receiver = receiver;
}
public void setSender( String sender ) 
{
this.sender = sender;
}
public String getReceiver() 
{
return receiver;
}
public String getSender() 
{
return sender;
}
.
.
}

3. in my action class (see the code below)

3.1. do I cast the form to DynaActionForm? or I should
cast the form to DynaValidatorForm?

3.2. Can I use the copyProperties() method of the
BeanUtils to convert the form to a bean?

   BeanUtils.copyProperties( threadBean, postForm );

...
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.DynaActionForm;
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.artimus.message.PostForm;
import org.apache.artimus.message.PostBean;
import org.apache.artimus.message.ThreadBean;
import org.apache.artimus.message.utility.DateUtil;

public final class StoreMessage extends Action
{
   public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response)
throws Exception 
   {

  int parentPostID;
  int threadID;
  String memberName = request.getRemoteUser();
  Timestamp now =
DateUtil.getCurrentGMTTimestamp();
  parentPostID = Integer.parseInt(
request.getParameter( "parent" ) );

  DynaActionForm postForm = ( DynaActionForm
)form;

  ThreadHandler thandler = new ThreadHandler();

  ThreadBean threadBean = new ThreadBean();
  BeanUtils.copyProperties( threadBean, postForm
);

  if (parentPostID == 0 ) // new topic
  {
 threadBean.setLastPostMemberName( memberName
);
 threadBean.setThreadCreationDate( now );
 .
 .
 
 threadID = thandler.insertThread( threadBean
);

  }
   ...
   ...
   }
}

4. the action mapping in my struts-config.xml is like:

   


Thank you.
--- David Friedman <[EMAIL PROTECTED]> wrote:
> Here is what I see (opinions vary)...
> 
> I see you are defining your form bean in your
> struts-config.xml as type
> 'org.apache.struts.validator.DynaValidatorForm'. So,
> why are you trying to
> cast it as this
> 'org.apache.artimus.message.PostForm' class.  Does
> that
> class extend DynaValidatorForm?  If it doesn't,
> you'll get a
> ClassCastException like you're getting now.  
> Personally, I expected you to
> cast it as:
> 
> DynaValidatorForm postForm = (DynaValidatorForm)
> form;
> 
> Or us it as-initially defined (not casting like
> above) and use BeanUtils
> such as:
> String receiver = (String)
> PropertyUtils.getSimpleProperty(form,
> "receiver");
> 
> Regards,
> David
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 03, 2004 11:04 PM
> To: Struts Users Mailing List
> Subject: Re: Please Help - ClassCastException
> 
> 
> Thank you for trying to help.  I have added
> import org.apache.artimus.message.PostForm;
> to my action class.  I do not fully follow what I
> should check in the struts-config.xml file.  And
> should I use name="postForm" with lowercase 'p' or
> uppercase 'P'?
> 
> In my struts-config.xml file, I have:
> 
>   name="postForm"
> 
>
type="org.apache.struts.validator.DynaValidatorForm">
>name="receiver"
> type="java.lang.String"/>
>name="sender"
> type="java.lang.String"/>
>name="title"
> type="java.lang.String"/>
>name="postTopic"
> type="java.lang.String"/>
>name="postBody"
> type="java.lang.String"/>
> 
> 
> and
> 
>  roles="administrator,editor,contributor"
> path="/message/NewTopic"
>
> type="org.apache.artimus.message.StoreMessage"
> name="postForm"
> scope="request"
> validate="true"
> input=".message.Form">
> name="success"
>

RE: Please Help - ClassCastException

2004-01-03 Thread Joe Hertz
Well, first off:

In your (dyna) form, you don't create setters and getters for the properties 
though. With DynaForms you would say set("myPropertyName", "myString") 
instead of calling setMyPropertyName("myString"). This is the Dyna part of 
DynaForms. It's much less tedious IMHO.

In your action, you absolutely want to cast the form to PostForm. Otherwise 
the form variable has no way to know properties are associated with it. So 
yes, once you cast it to PostForm calls to BeanUtils.copyProperties() can and 
will work properly.

Hope this helps,

-Joe



> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, January 04, 2004 1:42 AM
> To: Struts Users Mailing List
> Subject: RE: Please Help - ClassCastException
> 
> 
> I think that there are a lot more mistakes in my code
> than I originally thought.  The root of the problem is
> that I do not know how to use DynaValidatorForm.  If
> you could help me in learning how to code when I am
> working with DynaValidatorForm.  
> 
> 1. in my struts-config.xml, I have:
> 
>   name="postForm" 
>  
> type="org.apache.struts.validator.DynaValidatorForm">
>name="receiver"
> type="java.lang.String"/>
>name="sender"
> type="java.lang.String"/>
>   .
>   .
> 
> 
> 2. My PostForm.java is like:
> 
> import org.apache.struts.validator.DynaValidatorForm;
> import org.apache.struts.action.ActionMapping;
>  
> public class PostForm extends DynaValidatorForm  {
>  
> private String receiver;
> private String sender;
> ..
> 
> public void setReceiver( String receiver )
> {
> this.receiver = receiver;
> }
> public void setSender( String sender ) 
> {
> this.sender = sender;
> }
> public String getReceiver() 
> {
> return receiver;
> }
> public String getSender() 
> {
> return sender;
> }
> .
> .
> }
> 
> 3. in my action class (see the code below)
> 
> 3.1. do I cast the form to DynaActionForm? or I should
> cast the form to DynaValidatorForm?
> 
> 3.2. Can I use the copyProperties() method of the
> BeanUtils to convert the form to a bean?
> 
>BeanUtils.copyProperties( threadBean, postForm );
> 
> ...
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.DynaActionForm;
> import org.apache.commons.beanutils.BeanUtils;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> import org.apache.artimus.message.PostForm;
> import org.apache.artimus.message.PostBean;
> import org.apache.artimus.message.ThreadBean;
> import org.apache.artimus.message.utility.DateUtil;
> 
> public final class StoreMessage extends Action
> {
>public ActionForward execute(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest
> request,
> HttpServletResponse
> response)
> throws Exception 
>{
> 
>   int parentPostID;
>   int threadID;
>   String memberName = request.getRemoteUser();
>   Timestamp now =
> DateUtil.getCurrentGMTTimestamp();
>   parentPostID = Integer.parseInt(
> request.getParameter( "parent" ) );
> 
>   DynaActionForm postForm = ( DynaActionForm
> )form;
> 
>   ThreadHandler thandler = new ThreadHandler();
> 
>   ThreadBean threadBean = new ThreadBean();
>   BeanUtils.copyProperties( threadBean, postForm
> );
> 
>   if (parentPostID == 0 ) // new topic
>   {
>  threadBean.setLastPostMemberName( memberName
> );
>  threadBean.setThreadCreationDate( now );
>  .
>  .
>  
>  threadID = thandler.insertThread( threadBean
> );
> 
>   }
>...
>...
>}
> }
> 
> 4. the action mapping in my struts-config.xml is like:
>  roles="administrator,editor,contributor"
> path="/message/NewTopic"
> type="org.apache.artimus.message.StoreMessage"
> name="postForm"
> scope="request"
> validate="true"
> input=".message.Form">
> name="success"
> path=".article.View"/>
> 
> 
> Thank you.
> --- David Friedman <[EMAIL PROTECTED]> wrote:
> > Here is what I see (opinions vary)...
> > 
> > I see you are defining your form bean in your struts-config.xml as 
> > type 'org.apache.struts.validator.DynaValidatorForm'. So,
> > why are you trying to
> > cast it as this
> > 'org.apache.artimus.message.PostForm' class.  Does
> > that
> > class extend DynaValidatorForm?  If it doesn't,
> > you'll get a
> > ClassCastException like you're getting now.  
> > Personally, I expected you to
> > cast it as:
> > 
> > Dy