Le 10 juin 10 à 08:23, Preet K. Sekhon a écrit :

Hi Michele,

I am using Netbeans 6.8, and Struts 1.3.8. The lab is Struts Sample Applications (2 hour lab) - (June 10th, 2010) - (homework #13) for Java EE programming with passion.
Actually the samples do not use Struts 1.3.8, they use a version previous to 1.3, as they embed struts inside a lib folder inside WEB- INF (it seems to use struts 1.1 api, though I'm not sure). And it uses also jdk 1.4

And this version uses a deprecated API, see 1.2.4 version, where it is mentioned:
http://struts.apache.org/1.2.4/api/org/apache/struts/action/ActionErrors.html

Versus version 1.3.8 where it does not exist any more:
http://struts.apache.org/1.3.8/apidocs/index.html

You may see the difference if you create a new Java Web project in NetBeans 6.8 and add the Frameworks Struts to the project (there seems to be a slight bug in the build where the com.myapp.struts ApplicationResource is not created with the right _en, ... properties file, but this is easily corrected by renaming the properties file.

So, to put it briefly, the samples are not buggy in themselves, they are only somewhat strange. It would be probably better to rewrite entirely the samples with the 1.3.8 api and jdk 1.5, rather than embed 1.1.x and jdk 1.4.



Michèle Garoche


Thanks,
Preet.

On Wed, Jun 9, 2010 at 10:46 PM, Michèle Garoche <migat...@gmail.com> wrote:

Le 10 juin 10 à 04:02, Preet K. Sekhon a écrit :

I think there is a bug in Validation part of the original struts- example. I kept getting this error message when I entered a wrong password or when username entered was not unique.

org.apache.struts.action.ActionMessage cannot be cast to org.apache.struts.action.ActionError

It worked when I replaced new ActionMessage with new ActionError in LogonAction.java and SaveRegistration.java.

errors.add(ActionErrors.GLOBAL_ERROR, new ActionMessage("error.password.mismatch"));

errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.password.mismatch"));

wanted to check if some one else had a similar problem.
Would you mind telling which lab exactly you are referring to and inside the lab which exercise?

Michèle Garoche



--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to