--- Sandy143 <[EMAIL PROTECTED]> wrote:
> Now I am migrating from struts1 to struts2.

What were you doing before?

Please note: your configuration files aren't getting to everybody properly
(me, at least), so it's even more difficult to help. Consider configuring
your email client to send text-only messages to the list or using a service
such as pastebin.com. Thanks :)

> <interceptor name="homeActionForm"
>                                       
> class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
>       
>               com.XXX.XXX.HomeActionForm
>       
>       homeActionForm
> </interceptor>

I'm not sure what all I'm not seeing here, so I can't really comment.

> <interceptor-stack name="homeActionForm">
>       <interceptor-ref name="staticParams" />
>       <interceptor-ref name="homeActionForm" />
>       <interceptor-ref name="modelDriven" />
>       <interceptor-ref name="actionForm-reset" />
>       <interceptor-ref name="basicStack" />
>       <interceptor-ref name="homePage" />
>       <interceptor-ref name="workflow" />
> </interceptor-stack>

I would assume that an interceptor-stack can have the same name as an
interceptor-ref, but as a matter of style I wouldn't do it; because it's
confusing.


> <action name="loadPage"
>       class="org.apache.struts2.s1.Struts1Action">
>       
>               com.XXX.XXX.homeAction
>       
>       <result name="load" type="tiles">/home.jsp</result>
> </action>

Again, not sure what all we're missing.

Just to be perfectly clear: you are attempting to use the S1 Plugin, so that
your existing S1 actions etc. will be configured only in the Struts *2*
configuration file (there will be *no* Struts 1 configuration file)?

Note: According to the S1 Plugin documentation [1] you *cannot* use the S1
tags in your JSP pages, meaning you are forcing yourself to JSP rewrites.

(The other option is running the two apps more or less indepedently, but
still in the same webapp: no JSP rewrites, no plugin issues.)

Sometimes it's easier to introduce a new framework and any associated costs
(training, learning curve, etc.) on a greenfield project rather than attempt
to shoehorn it into an existing ecosystem.

Dave

[1] http://struts.apache.org/2.x/docs/struts-1-plugin.html

> Laurie Harper wrote:
> > 
> > Sandy143 wrote:
> >> Hello Everyone :
> >> 
> >> [Servlet Error]-[org.apache.struts.action.ActionForm]:
> >> java.lang.InstantiationException: org.apache.struts.action.ActionForm
> >> 
> >> I get this error when I try to migrate from Struts 1.2.8 to Struts2.
> >> 
> >> I have validations to the form. I am using interceptors for the same.
> >> 
> >> Please let me know ... if I am missing something or need to add
> >> something.
> > 
> > Your question is far too vague. ActionFrom is a Struts1 type; 
> > interceptors are a Struts2 concept; saying 'I have validations' or 'I am 
> > using interceptors' tells us nothing about how you have these configured.
> > 
> > Since you seem to be struggling with integrating S1 and S2 in the same 
> > app, I suggest you go back to basics and create a minimal, empty app 
> > using S1 and S2 together and use it as a starting point to explore each 
> > issue you find in isolation. That way you can post complete but concise 
> > examples of code and configuration that demonstrate the problem.


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

Reply via email to