You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Li <am...@gmail.com> on 2006/05/22 06:52:15 UTC

"No Jpf.Forward ..." error for nested controller

Hi all,

I created a controller for login process, and added Jpf tag for begin
method:
@Jpf.Action(
        forwards = {
            @Jpf.Forward(name = "success", path = "login.jsp")
        }
    )
protected Forward begin(ReturnToForm initForm) {
......
}

But when I was compiling the application. It threw a error :
"There is no Jpf.Forward annotation with returnAction attribute defined for
my nested Controller" ....

Any idea?

Re: "No Jpf.Forward ..." error for nested controller

Posted by Li <am...@gmail.com>.
Hi Thomas,

I was reading up petStore source codes these days. I found a process of
Login.

First, it contains a section of secure (login module) in "web.xml",
and it defines login.jsp and login-error.jsp are Login and Login Failure
notification pages.

When I checked out index.jsp. I found out an anchor with action
/shop/Controller.jpf ... which
points to the begin method of the controller in /shop. So i checked the
controller source and found there is no Login page request or redirect nor
NotLoggedIn exception handling. And I was wondering if I am the first time
user, how does login page show up?

Regards

On 5/23/06, Li <am...@gmail.com> wrote:
>
> Thank Thomas.
>
>
> On 5/23/06, Thomas Cook <th...@gmail.com> wrote:
> >
> > A nested page flow must declare at least one "return" action that
> > links it back into the calling page flow.  Think of this sort of like
> > a return statement in a method.  If you didn't intend for your page
> > flow to be nestable, remove the nested=true attribute on your
> > Jpf.Controller annotation and the error should go away.
> >
> >
> > On 5/21/06, Li <am...@gmail.com> wrote:
> > > Hi all,
> > >
> > > I created a controller for login process, and added Jpf tag for begin
> > > method:
> > > @Jpf.Action(
> > >         forwards = {
> > >             @Jpf.Forward(name = "success", path = " login.jsp")
> > >         }
> > >     )
> > > protected Forward begin(ReturnToForm initForm) {
> > > ......
> > > }
> > >
> > > But when I was compiling the application. It threw a error :
> > > "There is no Jpf.Forward annotation with returnAction attribute
> > defined for
> > > my nested Controller" ....
> > >
> > > Any idea?
> > >
> > >
> >
>
>
>
> --
> =====================================
> The world will be ended if love is everywhere.
>                                                ---- Shawzi
>



-- 
=====================================
The world will be ended if love is everywhere.
                                               ---- Shawzi

Re: "No Jpf.Forward ..." error for nested controller

Posted by Li <am...@gmail.com>.
Thank Thomas.

On 5/23/06, Thomas Cook <th...@gmail.com> wrote:
>
> A nested page flow must declare at least one "return" action that
> links it back into the calling page flow.  Think of this sort of like
> a return statement in a method.  If you didn't intend for your page
> flow to be nestable, remove the nested=true attribute on your
> Jpf.Controller annotation and the error should go away.
>
>
> On 5/21/06, Li <am...@gmail.com> wrote:
> > Hi all,
> >
> > I created a controller for login process, and added Jpf tag for begin
> > method:
> > @Jpf.Action(
> >         forwards = {
> >             @Jpf.Forward(name = "success", path = "login.jsp")
> >         }
> >     )
> > protected Forward begin(ReturnToForm initForm) {
> > ......
> > }
> >
> > But when I was compiling the application. It threw a error :
> > "There is no Jpf.Forward annotation with returnAction attribute defined
> for
> > my nested Controller" ....
> >
> > Any idea?
> >
> >
>



-- 
=====================================
The world will be ended if love is everywhere.
                                               ---- Shawzi

Re: "No Jpf.Forward ..." error for nested controller

Posted by Thomas Cook <th...@gmail.com>.
A nested page flow must declare at least one "return" action that
links it back into the calling page flow.  Think of this sort of like
a return statement in a method.  If you didn't intend for your page
flow to be nestable, remove the nested=true attribute on your
Jpf.Controller annotation and the error should go away.


On 5/21/06, Li <am...@gmail.com> wrote:
> Hi all,
>
> I created a controller for login process, and added Jpf tag for begin
> method:
> @Jpf.Action(
>         forwards = {
>             @Jpf.Forward(name = "success", path = "login.jsp")
>         }
>     )
> protected Forward begin(ReturnToForm initForm) {
> ......
> }
>
> But when I was compiling the application. It threw a error :
> "There is no Jpf.Forward annotation with returnAction attribute defined for
> my nested Controller" ....
>
> Any idea?
>
>