Ok, so the problem is probably in how you are setting your action bean
context in your action bean.

It should look something like this...

public class SomeAction implements ActionBean {

    private FnfActionBeanContext context;

    public FnfActionBeanContext getContext() {
          return context;
    }

    public void setContext(ActionBeanContext context) {
          this.context = (FnfActionBeanContext)context;
    }
}

Is this how yours looks?

Gregg

On Thu, Dec 4, 2008 at 9:49 PM, Pat Farrell <[EMAIL PROTECTED]> wrote:

> Gregg Bolinger wrote:
> > You can't merge init-params like that.
>
> OK, how do I do it properly?
>
>
> > I'm not sure about your "could not create instance" error because I
> > can't see your code. :)
>
> I'll share it on the web if you really want it.
> The tomcat error is
>
> Caused by: java.lang.ClassCastException:
> net.sourceforge.stripes.action.ActionBeanContext cannot be cast to
> com.fnfbook.beans.FnfActionBeanContext
>        at com.fnfbook.beans.Login.setContext(Login.java:33)
>        at
>
> net.sourceforge.stripes.controller.AnnotatedClassActionResolver.setActionBeanContext(AnnotatedClassActionResolver.java:374)
>
>
> The entire source code of the FnfActionBeanContext class is
>
> public class FnfActionBeanContext extends ActionBeanContext  {
>    /** Gets the currently logged in user, or null if no-one is logged
> in. */
>    public User getUser() {
>        return (User) getRequest().getSession().getAttribute("user");
>    }
>
>    /** Sets the currently logged in user. */
>    public void setUser(User currentUser) {
>        getRequest().getSession().setAttribute("user", currentUser);
>    }
>
>    /** Logs the user out by invalidating the session. */
>    public void logout() {
>        getRequest().getSession().invalidate();
>     }
> }
>
>
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
>
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to