You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Pietro Di Bello <pi...@gmail.com> on 2005/02/01 15:28:55 UTC

Re: Problem using the version taken from SVN

Hi,
We have fixed that problem! We've found out that it was caused by a
missing generated file for struts: jpf-struts-config.xml.

Now that we fix that issue, we encounter another. :-(
This is the error message we got now, requesting the home page:
****************
Tag Error
Tag	Form 	Errors	1
Tag Error	Message	Action 'logIn is not a valid action.
****************
both in our project and in the beehive's petStoreWeb sample (in that
case the invalid action is the search() one in the home page).

We really cannot understand why our logIn() action is not valid...
Do you have any idea?

Thanks! 
Piero

P.S.
Our source code is still the same


On Mon, 31 Jan 2005 09:22:12 -0700, Eddie O'Neil <ek...@bea.com> wrote:
> Pietro--
> 
>    One thing to check is that all of the generated XML, source, and
> .class files have been deleted from your webapp.
> 
>    These would live in:
> 
>    WEB-INF/.tmpbeansrc
>    WEB-INF/.pageflow-struts-generated
> 
> And, of course:
> 
>    WEB-INF/classes
> 
>    As far as petstoreWeb goes for the current SVN tree, I know that
> there's an issue with finding the global "search" action in the
> top-level shared flow.  It's something that needs a bug and a fix.  :)
> 
> Eddie
> 
> 
> Pietro Di Bello wrote:
> > Hi all,
> >
> > we downloaded the Beehive sources from SVN and built it successfully
> > (including its docs).
> > Now we are trying to update our test project (previously running with
> > v1-alpha) that uses both controls and pageflows, but after the
> > build&deploy, when we request our login page, we encounter the
> > following error on the login form:
> >
> > ************
> > Tag Error
> > Tag:  Form    Errors: 1
> > Tag Error:    Message Could not locate the Form's application module
> > configuration information.
> > ************
> >
> > To make up our mind, we built and deployed the petstoreWeb sample but
> > we still have the same error, in this case on the search form in the
> > home page.
> >
> >
> > This is our index.jsp:
> > ************
> > <%@ page language="java" contentType="text/html;charset=UTF-8"%>
> > <%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
> > prefix="netui-data"%>
> > <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
> > <%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
> > prefix="netui-template"%>
> >
> > <netui:html>
> >   <head>
> >     <title>Ldap Login</title>
> >     <netui:base/>
> >   </head>
> >   <netui:body>
> >       <h1>Ldap Login</h1>
> >    <p>
> >       <netui:form action="logIn">
> >         <p>User:<netui:textBox dataSource="actionForm.userName"/>
> >         <p>Password:<netui:textBox password="true"
> > dataSource="actionForm.userPassword"/>
> >         <p><netui:button type="submit">Submit</netui:button>
> >       </netui:form>
> >     </p>
> >   </netui:body>
> > </netui:html>
> > ************
> >
> > and its Controller.jpf:
> > ************
> > import org.apache.beehive.netui.pageflow.PageFlowController;
> > import org.apache.beehive.netui.pageflow.Forward;
> > import org.apache.beehive.netui.pageflow.annotations.Jpf;
> > import forms.AuthenticationForm;
> > import forms.SearchForm;
> > import spike.beehive.ldap.LdapAccess;
> > import spike.beehive.ldap.LdapAccessClient;
> > import org.apache.beehive.controls.api.bean.Control;
> >
> > @Jpf.Controller(
> >         simpleActions={
> >             @Jpf.SimpleAction(name="begin", path="index.jsp")
> >         }
> >     )
> > public class Controller extends PageFlowController
> > {
> >         @Control @LdapAccess.LdapServer(
> >             userManagerName = "anyuserManagerName",
> >             userManagerPassword = "anyuserManagerPassword",
> >             serviceUrl = "ldap://anyserviceUrl:port",
> >             searchDatabase = "anysearchDatabase")
> >     private LdapAccess itsLdapAccess;
> >
> >     @Jpf.Action(
> >             forwards={
> >                 @Jpf.Forward(name="success", path="search.jsp",
> >                         actionOutputs = {
> >                         @Jpf.ActionOutput(name = "searchResult",
> >                                           type = java.lang.String[].class,
> >                                           required = true)
> >                     }),
> >                 @Jpf.Forward(name="error", path="error.jsp")
> >             }
> >         )
> >         public Forward logIn(AuthenticationForm form)
> >         {
> >             System.out.println("/Controller.jpf - logIn: user: " +
> > form.getUserName());
> >             boolean isValidUser =
> > itsLdapAccess.logIn(form.getUserName(), form.getUserPassword());
> >             if (isValidUser)
> >             {
> >                 Forward forward = new Forward("success");
> >                 forward.addActionOutput("searchResult", new String[0]);
> >                 return forward;
> >             }
> >             else
> >                 return new Forward("error");
> >         }
> >
> >     @Jpf.Action(
> >             forwards={
> >                 @Jpf.Forward(name="success", path="search.jsp",
> >                         actionOutputs = {
> >                         @Jpf.ActionOutput(name = "searchResult",
> >                                           type = java.lang.String[].class,
> >                                           required = true)
> >                     })
> >             }
> >         )
> >         public Forward search(SearchForm form)
> >         {
> >             System.out.println("/Controller.jpf - search:
> > stringToSearch: " + form.getStringToSearch());
> >             String[] retrievedUsers =
> > itsLdapAccess.search(form.getStringToSearch());
> >
> >             Forward forward = new Forward("success");
> >             forward.addActionOutput("searchResult", retrievedUsers);
> >             return forward;
> >         }
> >
> >     @Jpf.Action(
> >             forwards={
> >                 @Jpf.Forward(name="success", path="search.jsp",
> >                         actionOutputs = {
> >                         @Jpf.ActionOutput(name = "searchResult",
> >                                           type = java.lang.String[].class,
> >                                           required = true)
> >                     })
> >             }
> >         )
> >         protected Forward searchUsingPojo(SearchForm form)
> >         {
> >             System.out.println("/Controller.jpf - searchUsingPojo:
> > stringToSearch: " + form.getStringToSearch());
> >
> >             LdapAccessClient ldapAccessClient = new
> > LdapAccessClient("xp", "xpLAYERS");
> >             String[] retrievedUsers =
> > ldapAccessClient.search(form.getStringToSearch());
> >
> >             Forward forward = new Forward("success");
> >             forward.addActionOutput("searchResult", retrievedUsers);
> >             return forward;
> >         }
> >
> > }
> > ************
> >
> > Do you have any suggestions?
> >
> > Thanks a lot!
> > Piero
> >
>

Fwd: Problem with declarative instantiation of a Control from a POJO

Posted by Pietro Di Bello <pi...@gmail.com>.
Sorry!
I forgot to tell you that the error I got trying to use the control
from that pojo was a NullPointerException (it seems that the control
has not been initialized somehow...)

Thanks
Piero


---------- Forwarded message ----------
From: Pietro Di Bello <pi...@gmail.com>
Date: Tue, 1 Feb 2005 17:41:47 +0100
Subject: Problem with declarative instantiation of a Control from a POJO
To: Beehive Users <be...@incubator.apache.org>


Hi all,
I'm using Beehive taken from SVN two days ago and have a problem
instantiating a Control within a POJO (I'm following the v1Beta docs,
chapter 'Control Programming', 6.1 Declarative Instantiation).

I've already used (successfully) the same beehive control from a
page-flow and also with a programmatic instantiation.

This is the code of the POJO, which uses an LdapAccess Control we developed:

*******************
public class LdapAccessClient
{
    @Control @LdapAccess.LdapServer(
            userManagerName = "xxx",
            userManagerPassword = "yyy",
            serviceUrl = "zzz",
            searchDatabase = "ttt")
    private LdapAccessBean itsLdapAccess;
    ....
    ...
}
*******************

Do you have any idea?

Thanks a lot!
Piero

Problem with declarative instantiation of a Control from a POJO

Posted by Pietro Di Bello <pi...@gmail.com>.
Hi all,
I'm using Beehive taken from SVN two days ago and have a problem
instantiating a Control within a POJO (I'm following the v1Beta docs,
chapter 'Control Programming', 6.1 Declarative Instantiation).

I've already used (successfully) the same beehive control from a
page-flow and also with a programmatic instantiation.

This is the code of the POJO, which uses an LdapAccess Control we developed:

*******************
public class LdapAccessClient 
{
    @Control @LdapAccess.LdapServer(
            userManagerName = "xxx",
            userManagerPassword = "yyy",
            serviceUrl = "zzz",
            searchDatabase = "ttt")
    private LdapAccessBean itsLdapAccess;
    ....
    ...
}
*******************

Do you have any idea?

Thanks a lot!
Piero

Re: Problem using the version taken from SVN

Posted by Eddie O'Neil <ek...@bea.com>.
Pietro--

   Yeah, in digging some more, I found the same thing you did -- hitting 
fooWeb/index.jsp caused that problem.  Here's the JIRA bug for that:

   http://issues.apache.org/jira/browse/BEEHIVE-223

Glad you're up and running; thanks for the update.

Eddie



Pietro Di Bello wrote:
> Hi Eddie,
> 
> We finally resolved our problem ("Message Action 'logIn is not a valid
> action" in the home page), that is actually not related to the issue
> you've open
> (http://issues.apache.org/jira/browse/BEEHIVE-220): we discovered that
> this error message was raised only if we were pointing our browser to
> http://localhost:8080/SpikeLdapControl/ (that forwards to index.jsp, I
> guess...).
> While if we point directly to
> http://localhost:8080/SpikeLdapControl/Controller.jpf the error was
> not raised and everything looks ok.
> 
> This might be caused, I guess, because the default begin() action
> *must* be called first (at least once)... is this the right guess?
> 
> P.S.
> Our webapp is made of two simple jsp invoking (throughout a
> Controller) an Ldap Control for searching users in a directory server.
> 
> Thanks
> Pietro
> 
> 
> On Tue, 01 Feb 2005 08:44:16 -0700, Eddie O'Neil <ek...@bea.com> wrote:
> 
>>Pietro--
>>
>>   Yeah, I'm seeing the same thing -- either we're both doing the same
>>thing wrong or there's an issue here.
>>
>>   I've filed this to track it:
>>
>>   http://issues.apache.org/jira/browse/BEEHIVE-220
>>
>>Eddie
>>
>>Pietro Di Bello wrote:
>>
>>>Hi,
>>>We have fixed that problem! We've found out that it was caused by a
>>>missing generated file for struts: jpf-struts-config.xml.
>>>
>>>Now that we fix that issue, we encounter another. :-(
>>>This is the error message we got now, requesting the home page:
>>>****************
>>>Tag Error
>>>Tag   Form    Errors  1
>>>Tag Error     Message Action 'logIn is not a valid action.
>>>****************
>>>both in our project and in the beehive's petStoreWeb sample (in that
>>>case the invalid action is the search() one in the home page).
>>>
>>>We really cannot understand why our logIn() action is not valid...
>>>Do you have any idea?
>>>
>>>Thanks!
>>>Piero
>>>
>>>P.S.
>>>Our source code is still the same
>>>
>>>
>>>On Mon, 31 Jan 2005 09:22:12 -0700, Eddie O'Neil <ek...@bea.com> wrote:
>>>
>>>
>>>>Pietro--
>>>>
>>>>  One thing to check is that all of the generated XML, source, and
>>>>.class files have been deleted from your webapp.
>>>>
>>>>  These would live in:
>>>>
>>>>  WEB-INF/.tmpbeansrc
>>>>  WEB-INF/.pageflow-struts-generated
>>>>
>>>>And, of course:
>>>>
>>>>  WEB-INF/classes
>>>>
>>>>  As far as petstoreWeb goes for the current SVN tree, I know that
>>>>there's an issue with finding the global "search" action in the
>>>>top-level shared flow.  It's something that needs a bug and a fix.  :)
>>>>
>>>>Eddie
>>>>
>>>>
>>>>Pietro Di Bello wrote:
>>>>
>>>>
>>>>>Hi all,
>>>>>
>>>>>we downloaded the Beehive sources from SVN and built it successfully
>>>>>(including its docs).
>>>>>Now we are trying to update our test project (previously running with
>>>>>v1-alpha) that uses both controls and pageflows, but after the
>>>>>build&deploy, when we request our login page, we encounter the
>>>>>following error on the login form:
>>>>>
>>>>>************
>>>>>Tag Error
>>>>>Tag:  Form    Errors: 1
>>>>>Tag Error:    Message Could not locate the Form's application module
>>>>>configuration information.
>>>>>************
>>>>>
>>>>>To make up our mind, we built and deployed the petstoreWeb sample but
>>>>>we still have the same error, in this case on the search form in the
>>>>>home page.
>>>>>
>>>>>
>>>>>This is our index.jsp:
>>>>>************
>>>>><%@ page language="java" contentType="text/html;charset=UTF-8"%>
>>>>><%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
>>>>>prefix="netui-data"%>
>>>>><%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
>>>>><%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
>>>>>prefix="netui-template"%>
>>>>>
>>>>><netui:html>
>>>>> <head>
>>>>>   <title>Ldap Login</title>
>>>>>   <netui:base/>
>>>>> </head>
>>>>> <netui:body>
>>>>>     <h1>Ldap Login</h1>
>>>>>  <p>
>>>>>     <netui:form action="logIn">
>>>>>       <p>User:<netui:textBox dataSource="actionForm.userName"/>
>>>>>       <p>Password:<netui:textBox password="true"
>>>>>dataSource="actionForm.userPassword"/>
>>>>>       <p><netui:button type="submit">Submit</netui:button>
>>>>>     </netui:form>
>>>>>   </p>
>>>>> </netui:body>
>>>>></netui:html>
>>>>>************
>>>>>
>>>>>and its Controller.jpf:
>>>>>************
>>>>>import org.apache.beehive.netui.pageflow.PageFlowController;
>>>>>import org.apache.beehive.netui.pageflow.Forward;
>>>>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
>>>>>import forms.AuthenticationForm;
>>>>>import forms.SearchForm;
>>>>>import spike.beehive.ldap.LdapAccess;
>>>>>import spike.beehive.ldap.LdapAccessClient;
>>>>>import org.apache.beehive.controls.api.bean.Control;
>>>>>
>>>>>@Jpf.Controller(
>>>>>       simpleActions={
>>>>>           @Jpf.SimpleAction(name="begin", path="index.jsp")
>>>>>       }
>>>>>   )
>>>>>public class Controller extends PageFlowController
>>>>>{
>>>>>       @Control @LdapAccess.LdapServer(
>>>>>           userManagerName = "anyuserManagerName",
>>>>>           userManagerPassword = "anyuserManagerPassword",
>>>>>           serviceUrl = "ldap://anyserviceUrl:port",
>>>>>           searchDatabase = "anysearchDatabase")
>>>>>   private LdapAccess itsLdapAccess;
>>>>>
>>>>>   @Jpf.Action(
>>>>>           forwards={
>>>>>               @Jpf.Forward(name="success", path="search.jsp",
>>>>>                       actionOutputs = {
>>>>>                       @Jpf.ActionOutput(name = "searchResult",
>>>>>                                         type = java.lang.String[].class,
>>>>>                                         required = true)
>>>>>                   }),
>>>>>               @Jpf.Forward(name="error", path="error.jsp")
>>>>>           }
>>>>>       )
>>>>>       public Forward logIn(AuthenticationForm form)
>>>>>       {
>>>>>           System.out.println("/Controller.jpf - logIn: user: " +
>>>>>form.getUserName());
>>>>>           boolean isValidUser =
>>>>>itsLdapAccess.logIn(form.getUserName(), form.getUserPassword());
>>>>>           if (isValidUser)
>>>>>           {
>>>>>               Forward forward = new Forward("success");
>>>>>               forward.addActionOutput("searchResult", new String[0]);
>>>>>               return forward;
>>>>>           }
>>>>>           else
>>>>>               return new Forward("error");
>>>>>       }
>>>>>
>>>>>   @Jpf.Action(
>>>>>           forwards={
>>>>>               @Jpf.Forward(name="success", path="search.jsp",
>>>>>                       actionOutputs = {
>>>>>                       @Jpf.ActionOutput(name = "searchResult",
>>>>>                                         type = java.lang.String[].class,
>>>>>                                         required = true)
>>>>>                   })
>>>>>           }
>>>>>       )
>>>>>       public Forward search(SearchForm form)
>>>>>       {
>>>>>           System.out.println("/Controller.jpf - search:
>>>>>stringToSearch: " + form.getStringToSearch());
>>>>>           String[] retrievedUsers =
>>>>>itsLdapAccess.search(form.getStringToSearch());
>>>>>
>>>>>           Forward forward = new Forward("success");
>>>>>           forward.addActionOutput("searchResult", retrievedUsers);
>>>>>           return forward;
>>>>>       }
>>>>>
>>>>>   @Jpf.Action(
>>>>>           forwards={
>>>>>               @Jpf.Forward(name="success", path="search.jsp",
>>>>>                       actionOutputs = {
>>>>>                       @Jpf.ActionOutput(name = "searchResult",
>>>>>                                         type = java.lang.String[].class,
>>>>>                                         required = true)
>>>>>                   })
>>>>>           }
>>>>>       )
>>>>>       protected Forward searchUsingPojo(SearchForm form)
>>>>>       {
>>>>>           System.out.println("/Controller.jpf - searchUsingPojo:
>>>>>stringToSearch: " + form.getStringToSearch());
>>>>>
>>>>>           LdapAccessClient ldapAccessClient = new
>>>>>LdapAccessClient("xp", "xpLAYERS");
>>>>>           String[] retrievedUsers =
>>>>>ldapAccessClient.search(form.getStringToSearch());
>>>>>
>>>>>           Forward forward = new Forward("success");
>>>>>           forward.addActionOutput("searchResult", retrievedUsers);
>>>>>           return forward;
>>>>>       }
>>>>>
>>>>>}
>>>>>************
>>>>>
>>>>>Do you have any suggestions?
>>>>>
>>>>>Thanks a lot!
>>>>>Piero
>>>>>
>>>>
> 

Re: Problem using the version taken from SVN

Posted by Pietro Di Bello <pi...@gmail.com>.
Hi Eddie,

We finally resolved our problem ("Message Action 'logIn is not a valid
action" in the home page), that is actually not related to the issue
you've open
(http://issues.apache.org/jira/browse/BEEHIVE-220): we discovered that
this error message was raised only if we were pointing our browser to
http://localhost:8080/SpikeLdapControl/ (that forwards to index.jsp, I
guess...).
While if we point directly to
http://localhost:8080/SpikeLdapControl/Controller.jpf the error was
not raised and everything looks ok.

This might be caused, I guess, because the default begin() action
*must* be called first (at least once)... is this the right guess?

P.S.
Our webapp is made of two simple jsp invoking (throughout a
Controller) an Ldap Control for searching users in a directory server.

Thanks
Pietro


On Tue, 01 Feb 2005 08:44:16 -0700, Eddie O'Neil <ek...@bea.com> wrote:
> Pietro--
> 
>    Yeah, I'm seeing the same thing -- either we're both doing the same
> thing wrong or there's an issue here.
> 
>    I've filed this to track it:
> 
>    http://issues.apache.org/jira/browse/BEEHIVE-220
> 
> Eddie
> 
> Pietro Di Bello wrote:
> > Hi,
> > We have fixed that problem! We've found out that it was caused by a
> > missing generated file for struts: jpf-struts-config.xml.
> >
> > Now that we fix that issue, we encounter another. :-(
> > This is the error message we got now, requesting the home page:
> > ****************
> > Tag Error
> > Tag   Form    Errors  1
> > Tag Error     Message Action 'logIn is not a valid action.
> > ****************
> > both in our project and in the beehive's petStoreWeb sample (in that
> > case the invalid action is the search() one in the home page).
> >
> > We really cannot understand why our logIn() action is not valid...
> > Do you have any idea?
> >
> > Thanks!
> > Piero
> >
> > P.S.
> > Our source code is still the same
> >
> >
> > On Mon, 31 Jan 2005 09:22:12 -0700, Eddie O'Neil <ek...@bea.com> wrote:
> >
> >>Pietro--
> >>
> >>   One thing to check is that all of the generated XML, source, and
> >>.class files have been deleted from your webapp.
> >>
> >>   These would live in:
> >>
> >>   WEB-INF/.tmpbeansrc
> >>   WEB-INF/.pageflow-struts-generated
> >>
> >>And, of course:
> >>
> >>   WEB-INF/classes
> >>
> >>   As far as petstoreWeb goes for the current SVN tree, I know that
> >>there's an issue with finding the global "search" action in the
> >>top-level shared flow.  It's something that needs a bug and a fix.  :)
> >>
> >>Eddie
> >>
> >>
> >>Pietro Di Bello wrote:
> >>
> >>>Hi all,
> >>>
> >>>we downloaded the Beehive sources from SVN and built it successfully
> >>>(including its docs).
> >>>Now we are trying to update our test project (previously running with
> >>>v1-alpha) that uses both controls and pageflows, but after the
> >>>build&deploy, when we request our login page, we encounter the
> >>>following error on the login form:
> >>>
> >>>************
> >>>Tag Error
> >>>Tag:  Form    Errors: 1
> >>>Tag Error:    Message Could not locate the Form's application module
> >>>configuration information.
> >>>************
> >>>
> >>>To make up our mind, we built and deployed the petstoreWeb sample but
> >>>we still have the same error, in this case on the search form in the
> >>>home page.
> >>>
> >>>
> >>>This is our index.jsp:
> >>>************
> >>><%@ page language="java" contentType="text/html;charset=UTF-8"%>
> >>><%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
> >>>prefix="netui-data"%>
> >>><%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
> >>><%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
> >>>prefix="netui-template"%>
> >>>
> >>><netui:html>
> >>>  <head>
> >>>    <title>Ldap Login</title>
> >>>    <netui:base/>
> >>>  </head>
> >>>  <netui:body>
> >>>      <h1>Ldap Login</h1>
> >>>   <p>
> >>>      <netui:form action="logIn">
> >>>        <p>User:<netui:textBox dataSource="actionForm.userName"/>
> >>>        <p>Password:<netui:textBox password="true"
> >>>dataSource="actionForm.userPassword"/>
> >>>        <p><netui:button type="submit">Submit</netui:button>
> >>>      </netui:form>
> >>>    </p>
> >>>  </netui:body>
> >>></netui:html>
> >>>************
> >>>
> >>>and its Controller.jpf:
> >>>************
> >>>import org.apache.beehive.netui.pageflow.PageFlowController;
> >>>import org.apache.beehive.netui.pageflow.Forward;
> >>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
> >>>import forms.AuthenticationForm;
> >>>import forms.SearchForm;
> >>>import spike.beehive.ldap.LdapAccess;
> >>>import spike.beehive.ldap.LdapAccessClient;
> >>>import org.apache.beehive.controls.api.bean.Control;
> >>>
> >>>@Jpf.Controller(
> >>>        simpleActions={
> >>>            @Jpf.SimpleAction(name="begin", path="index.jsp")
> >>>        }
> >>>    )
> >>>public class Controller extends PageFlowController
> >>>{
> >>>        @Control @LdapAccess.LdapServer(
> >>>            userManagerName = "anyuserManagerName",
> >>>            userManagerPassword = "anyuserManagerPassword",
> >>>            serviceUrl = "ldap://anyserviceUrl:port",
> >>>            searchDatabase = "anysearchDatabase")
> >>>    private LdapAccess itsLdapAccess;
> >>>
> >>>    @Jpf.Action(
> >>>            forwards={
> >>>                @Jpf.Forward(name="success", path="search.jsp",
> >>>                        actionOutputs = {
> >>>                        @Jpf.ActionOutput(name = "searchResult",
> >>>                                          type = java.lang.String[].class,
> >>>                                          required = true)
> >>>                    }),
> >>>                @Jpf.Forward(name="error", path="error.jsp")
> >>>            }
> >>>        )
> >>>        public Forward logIn(AuthenticationForm form)
> >>>        {
> >>>            System.out.println("/Controller.jpf - logIn: user: " +
> >>>form.getUserName());
> >>>            boolean isValidUser =
> >>>itsLdapAccess.logIn(form.getUserName(), form.getUserPassword());
> >>>            if (isValidUser)
> >>>            {
> >>>                Forward forward = new Forward("success");
> >>>                forward.addActionOutput("searchResult", new String[0]);
> >>>                return forward;
> >>>            }
> >>>            else
> >>>                return new Forward("error");
> >>>        }
> >>>
> >>>    @Jpf.Action(
> >>>            forwards={
> >>>                @Jpf.Forward(name="success", path="search.jsp",
> >>>                        actionOutputs = {
> >>>                        @Jpf.ActionOutput(name = "searchResult",
> >>>                                          type = java.lang.String[].class,
> >>>                                          required = true)
> >>>                    })
> >>>            }
> >>>        )
> >>>        public Forward search(SearchForm form)
> >>>        {
> >>>            System.out.println("/Controller.jpf - search:
> >>>stringToSearch: " + form.getStringToSearch());
> >>>            String[] retrievedUsers =
> >>>itsLdapAccess.search(form.getStringToSearch());
> >>>
> >>>            Forward forward = new Forward("success");
> >>>            forward.addActionOutput("searchResult", retrievedUsers);
> >>>            return forward;
> >>>        }
> >>>
> >>>    @Jpf.Action(
> >>>            forwards={
> >>>                @Jpf.Forward(name="success", path="search.jsp",
> >>>                        actionOutputs = {
> >>>                        @Jpf.ActionOutput(name = "searchResult",
> >>>                                          type = java.lang.String[].class,
> >>>                                          required = true)
> >>>                    })
> >>>            }
> >>>        )
> >>>        protected Forward searchUsingPojo(SearchForm form)
> >>>        {
> >>>            System.out.println("/Controller.jpf - searchUsingPojo:
> >>>stringToSearch: " + form.getStringToSearch());
> >>>
> >>>            LdapAccessClient ldapAccessClient = new
> >>>LdapAccessClient("xp", "xpLAYERS");
> >>>            String[] retrievedUsers =
> >>>ldapAccessClient.search(form.getStringToSearch());
> >>>
> >>>            Forward forward = new Forward("success");
> >>>            forward.addActionOutput("searchResult", retrievedUsers);
> >>>            return forward;
> >>>        }
> >>>
> >>>}
> >>>************
> >>>
> >>>Do you have any suggestions?
> >>>
> >>>Thanks a lot!
> >>>Piero
> >>>
> >>
> >
>

Re: Problem using the version taken from SVN

Posted by Eddie O'Neil <ek...@bea.com>.
Pietro--

   Yeah, I'm seeing the same thing -- either we're both doing the same 
thing wrong or there's an issue here.

   I've filed this to track it:

   http://issues.apache.org/jira/browse/BEEHIVE-220

Eddie




Pietro Di Bello wrote:
> Hi,
> We have fixed that problem! We've found out that it was caused by a
> missing generated file for struts: jpf-struts-config.xml.
> 
> Now that we fix that issue, we encounter another. :-(
> This is the error message we got now, requesting the home page:
> ****************
> Tag Error
> Tag	Form 	Errors	1
> Tag Error	Message	Action 'logIn is not a valid action.
> ****************
> both in our project and in the beehive's petStoreWeb sample (in that
> case the invalid action is the search() one in the home page).
> 
> We really cannot understand why our logIn() action is not valid...
> Do you have any idea?
> 
> Thanks! 
> Piero
> 
> P.S.
> Our source code is still the same
> 
> 
> On Mon, 31 Jan 2005 09:22:12 -0700, Eddie O'Neil <ek...@bea.com> wrote:
> 
>>Pietro--
>>
>>   One thing to check is that all of the generated XML, source, and
>>.class files have been deleted from your webapp.
>>
>>   These would live in:
>>
>>   WEB-INF/.tmpbeansrc
>>   WEB-INF/.pageflow-struts-generated
>>
>>And, of course:
>>
>>   WEB-INF/classes
>>
>>   As far as petstoreWeb goes for the current SVN tree, I know that
>>there's an issue with finding the global "search" action in the
>>top-level shared flow.  It's something that needs a bug and a fix.  :)
>>
>>Eddie
>>
>>
>>Pietro Di Bello wrote:
>>
>>>Hi all,
>>>
>>>we downloaded the Beehive sources from SVN and built it successfully
>>>(including its docs).
>>>Now we are trying to update our test project (previously running with
>>>v1-alpha) that uses both controls and pageflows, but after the
>>>build&deploy, when we request our login page, we encounter the
>>>following error on the login form:
>>>
>>>************
>>>Tag Error
>>>Tag:  Form    Errors: 1
>>>Tag Error:    Message Could not locate the Form's application module
>>>configuration information.
>>>************
>>>
>>>To make up our mind, we built and deployed the petstoreWeb sample but
>>>we still have the same error, in this case on the search form in the
>>>home page.
>>>
>>>
>>>This is our index.jsp:
>>>************
>>><%@ page language="java" contentType="text/html;charset=UTF-8"%>
>>><%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
>>>prefix="netui-data"%>
>>><%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
>>><%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
>>>prefix="netui-template"%>
>>>
>>><netui:html>
>>>  <head>
>>>    <title>Ldap Login</title>
>>>    <netui:base/>
>>>  </head>
>>>  <netui:body>
>>>      <h1>Ldap Login</h1>
>>>   <p>
>>>      <netui:form action="logIn">
>>>        <p>User:<netui:textBox dataSource="actionForm.userName"/>
>>>        <p>Password:<netui:textBox password="true"
>>>dataSource="actionForm.userPassword"/>
>>>        <p><netui:button type="submit">Submit</netui:button>
>>>      </netui:form>
>>>    </p>
>>>  </netui:body>
>>></netui:html>
>>>************
>>>
>>>and its Controller.jpf:
>>>************
>>>import org.apache.beehive.netui.pageflow.PageFlowController;
>>>import org.apache.beehive.netui.pageflow.Forward;
>>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
>>>import forms.AuthenticationForm;
>>>import forms.SearchForm;
>>>import spike.beehive.ldap.LdapAccess;
>>>import spike.beehive.ldap.LdapAccessClient;
>>>import org.apache.beehive.controls.api.bean.Control;
>>>
>>>@Jpf.Controller(
>>>        simpleActions={
>>>            @Jpf.SimpleAction(name="begin", path="index.jsp")
>>>        }
>>>    )
>>>public class Controller extends PageFlowController
>>>{
>>>        @Control @LdapAccess.LdapServer(
>>>            userManagerName = "anyuserManagerName",
>>>            userManagerPassword = "anyuserManagerPassword",
>>>            serviceUrl = "ldap://anyserviceUrl:port",
>>>            searchDatabase = "anysearchDatabase")
>>>    private LdapAccess itsLdapAccess;
>>>
>>>    @Jpf.Action(
>>>            forwards={
>>>                @Jpf.Forward(name="success", path="search.jsp",
>>>                        actionOutputs = {
>>>                        @Jpf.ActionOutput(name = "searchResult",
>>>                                          type = java.lang.String[].class,
>>>                                          required = true)
>>>                    }),
>>>                @Jpf.Forward(name="error", path="error.jsp")
>>>            }
>>>        )
>>>        public Forward logIn(AuthenticationForm form)
>>>        {
>>>            System.out.println("/Controller.jpf - logIn: user: " +
>>>form.getUserName());
>>>            boolean isValidUser =
>>>itsLdapAccess.logIn(form.getUserName(), form.getUserPassword());
>>>            if (isValidUser)
>>>            {
>>>                Forward forward = new Forward("success");
>>>                forward.addActionOutput("searchResult", new String[0]);
>>>                return forward;
>>>            }
>>>            else
>>>                return new Forward("error");
>>>        }
>>>
>>>    @Jpf.Action(
>>>            forwards={
>>>                @Jpf.Forward(name="success", path="search.jsp",
>>>                        actionOutputs = {
>>>                        @Jpf.ActionOutput(name = "searchResult",
>>>                                          type = java.lang.String[].class,
>>>                                          required = true)
>>>                    })
>>>            }
>>>        )
>>>        public Forward search(SearchForm form)
>>>        {
>>>            System.out.println("/Controller.jpf - search:
>>>stringToSearch: " + form.getStringToSearch());
>>>            String[] retrievedUsers =
>>>itsLdapAccess.search(form.getStringToSearch());
>>>
>>>            Forward forward = new Forward("success");
>>>            forward.addActionOutput("searchResult", retrievedUsers);
>>>            return forward;
>>>        }
>>>
>>>    @Jpf.Action(
>>>            forwards={
>>>                @Jpf.Forward(name="success", path="search.jsp",
>>>                        actionOutputs = {
>>>                        @Jpf.ActionOutput(name = "searchResult",
>>>                                          type = java.lang.String[].class,
>>>                                          required = true)
>>>                    })
>>>            }
>>>        )
>>>        protected Forward searchUsingPojo(SearchForm form)
>>>        {
>>>            System.out.println("/Controller.jpf - searchUsingPojo:
>>>stringToSearch: " + form.getStringToSearch());
>>>
>>>            LdapAccessClient ldapAccessClient = new
>>>LdapAccessClient("xp", "xpLAYERS");
>>>            String[] retrievedUsers =
>>>ldapAccessClient.search(form.getStringToSearch());
>>>
>>>            Forward forward = new Forward("success");
>>>            forward.addActionOutput("searchResult", retrievedUsers);
>>>            return forward;
>>>        }
>>>
>>>}
>>>************
>>>
>>>Do you have any suggestions?
>>>
>>>Thanks a lot!
>>>Piero
>>>
>>
>