[Opensource] Struts1.1 and validation
Eddie Lewis
ELewis at copyright.com.au
Mon Nov 17 19:19:55 PST 2003
Hi Peter
I didnt make the first message clear enough in this respect.
I did change the mapping from the first to the second so there was only one
mapping in the config file.
The problem is when set/getFormCache is called which gets the default form.
The code actually casts to DefaultForm so struts validation requires a form
class of validationForm which is where the problem lies.
To use struts validation requires avoiding getFormCache commands and using
the form from the request object explicitly.
Regards
Eddie Lewis
-----Original Message-----
From: Peter A. Pilgrim [mailto:peterp at xenonsoft.demon.co.uk]
Sent: Tuesday, 18 November 2003 1:20 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] Struts1.1 and validation
Eddie Lewis wrote:
> You are correct here Michael. I thought that the state was not even
> getting invoked, however it seems that the exception is raised in the
> state itself. i have localised the line where it falls over
>
> First, Here is the stack trace
>
> java.lang.ClassCastException at
>
com.jcorporate.expresso.core.controller.ControllerResponse.getDefaultForm(Co
ntrollerResponse.java:2332)
> at
>
com.jcorporate.expresso.core.controller.ControllerResponse.getFormCache(Cont
rollerResponse.java:521)
> at
>
com.cal.cp.controller.CPLoginCont.runPromptLoginState(CPLoginCont.java:140)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324) at
>
com.jcorporate.expresso.core.controller.Controller.newState(Controller.java:
1368)
> at
>
com.jcorporate.expresso.core.controller.Controller.execute(Controller.java:1
804)
> at
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
> at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
> at
I think this is a conflict with two action mappings with identical names,
and the framework cannot work which action mapping to invoke.
--
Peter Pilgrim
__ _____ _____ _____
/ //__ // ___// ___/ + Serverside Java
/ /___/ // /__ / /__ + Struts
/ // ___// ___// ___/ + Expresso Committer
__/ // /__ / /__ / /__ + Independent Contractor
/___//____//____//____/ + Intrinsic Motivation
On Line Resume
||
\\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
This electronic mail message and any attachments are confidential. If you are not the intended recipient please do not use the information, advise us immediately and destroy this message. Opinions and information in this message are those of the sender and not necessarily those of CAL. Unless expressly permitted by the sender, you may not copy, disclose or use the contents in any way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20031118/ac69f13c/attachment-0002.htm
More information about the Opensource
mailing list