You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Adam Jenkins <ma...@adamjenkins.net> on 2005/06/05 01:05:15 UTC
disregard last
wrong url :)
*blush*
Cheers
Adam
On Sun, 2005-06-05 at 09:02 +1000, Adam Jenkins wrote:
> Thanks Jeremiah,
>
> I change 'POST' to 'post' and that got rid of the button error...now I
> get:
>
> Could not locate the Form's application module configuration
> information.
>
> Any ideas?
>
> Cheers
> Adam
>
> On Sat, 2005-06-04 at 15:12 -0600, Jeremiah Johnson wrote:
> > If you change the case on your form method to lower-case, do you still
> > get the same error? Seems like the error messages are getting mixed -
> > the real problem I see in your JSP is that you have POST instead of post
> > in the method.
> >
> > - jeremiah
> >
> > > -----Original Message-----
> > > From: Adam Jenkins [mailto:mail@adamjenkins.net]
> > > Sent: Saturday, June 04, 2005 2:59 PM
> > > To: Beehive Users
> > > Subject: login example returning odd error?
> > >
> > > Hi All,
> > >
> > > I'm trying to do a simple login example with beehive and pollinate.
> > I'm
> > > getting the following error:
> > >
> > > The type of a button must be one of submit, button or reset, found
> > > 'POST'.
> > >
> > > My controller is very simple:
> > >
> > > package Server;
> > >
> > > import javax.servlet.http.HttpSession;
> > >
> > > import org.apache.beehive.netui.pageflow.Forward;
> > > import org.apache.beehive.netui.pageflow.PageFlowController;
> > > import org.apache.beehive.netui.pageflow.annotations.Jpf;
> > >
> > > @Jpf.Controller
> > > public class Controller
> > > extends PageFlowController
> > > {
> > > /**
> > > * Callback that is invoked when this controller instance is
> > > created.
> > > */
> > > protected void onCreate()
> > > {
> > > }
> > >
> > > /**
> > > * Callback that is invoked when this controller instance is
> > > destroyed.
> > > */
> > > protected void onDestroy(HttpSession session)
> > > {
> > > }
> > >
> > > /**
> > > * Performs the login action.
> > > *
> > > * @since 2.0
> > > * @param form The login form.
> > > * @return The forward.
> > > */
> > > @Jpf.Action(
> > > forwards={
> > >
> > @Jpf.Forward(name="login_sucess",
> > > path="main.jsp"),
> > >
> > @Jpf.Forward(name="login_failure",
> > > path="index.jsp")
> > > }
> > >
> > > )
> > > public Forward processLogin(final LoginForm form){
> > > if(form.getPassword().equals("password")) return new
> > > Forward("login_success");
> > > return new Forward("login_failure");
> > > }
> > >
> > > /**
> > > * Standard begin method.
> > > *
> > > * @since 2.0
> > > * @return The forward (always 'success').
> > > */
> > > @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
> > > "index.jsp") })
> > > public Forward begin() {
> > > return new Forward("success");
> > > }
> > >
> > > //-----------BEGIN INNER CLASSES-----------------//
> > > /**
> > > * Form to represent the login information.
> > > *
> > > * @author <a href="mailto:ajenkins@infocomp.com">Adam
> > Jenkins</a>
> > > * @since 2.0
> > > */
> > > /**
> > > * @author adam
> > > *
> > > */
> > > public static final class LoginForm implements
> > java.io.Serializable{
> > >
> > > /**
> > > * The password.
> > > */
> > > private String password;
> > >
> > > /**
> > > * Gets the password.
> > > *
> > > * @since 2.0
> > > * @return The password
> > > */
> > > public String getPassword() {
> > > return password;
> > > }
> > >
> > > /**
> > > * Sets the password.
> > > *
> > > * @since 2.0
> > > * @param password The password.
> > > */
> > > public void setPassword(String password) {
> > > this.password = password;
> > > }
> > >
> > > }
> > > //------------END INNER CLASSES-----------------//
> > > }
> > >
> > > And the index.jsp is even simpler:
> > >
> > > <%@ 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>Login</title>
> > > <netui:base/>
> > > </head>
> > > <netui:body>
> > > <netui:form action="processLogin" method="POST">
> > > <netui:textBox dataSource="actionForm.password" size="20"
> > > password="true"/>
> > > <netui:button type="submit" value="Login"/>
> > > </netui:form>
> > > </netui:body>
> > > </netui:html>
> > >
> > >
> > > Those are the only two pages (apart from main.jsp which only has
> > > <p>Logged In</p>)
> > >
> > > Does anyone have any ideas?
> > >
> > > Cheers
> > > Adam
> >
> >
>
Re: re-regard last
Posted by Richard Feit <ri...@bea.com>.
OK, definitely let me know if you hit this again. I can't figure out
why else it would happen, but you never know...
Rich
Adam Jenkins wrote:
>Possibly, I have no idea to tell you the truth...I certainly didn't mess
>with any filter mappings...was just pointing and clicking with
>pollinate. I killed that project and started another and haven't hit it
>since, so either I've subconciously conditioned myself not to do
>whatever was causing it, or I did something weird setting up the orig
>project.
>
>A stumper...I'll let you know if I hit it again.
>
>On Sun, 2005-06-05 at 22:32 -0600, Richard Feit wrote:
>
>
>>That's a strange one -- it happens when the netui:form tag doesn't know
>>it's associated Struts module (i.e., its page flow). But it should only
>>happen when there *is* no page flow associated with the page -- it
>>shouldn't happen sporadically. The only way I can get it to happen is
>>to remove the filter-mapping for *.jsp (PageFlowJspFilter) from
>>web.xml. When I do that, the error appears when I hit the JSP directly
>>(without hitting a page flow or a page flow action). Is it possible
>>that this is your problem?
>>
>>Rich
>>
>>Adam Jenkins wrote:
>>
>>
>>
>>>Thought it was the wrong url, however this error still persists. It is
>>>very sporatic and I have no idea what's triggering it.
>>>
>>>Has anyone hit this before?
>>>
>>>'Could not locate the Form's application module configuration
>>>information.'
>>>
>>>It's on a very simple page using pollinate (page details below).
>>>
>>>Cheers
>>>Adam
>>>
>>>On Sun, 2005-06-05 at 09:05 +1000, Adam Jenkins wrote:
>>>
>>>
>>>
>>>
>>>>wrong url :)
>>>>
>>>>*blush*
>>>>
>>>>Cheers
>>>>Adam
>>>>
>>>>On Sun, 2005-06-05 at 09:02 +1000, Adam Jenkins wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Thanks Jeremiah,
>>>>>
>>>>>I change 'POST' to 'post' and that got rid of the button error...now I
>>>>>get:
>>>>>
>>>>>Could not locate the Form's application module configuration
>>>>>information.
>>>>>
>>>>>Any ideas?
>>>>>
>>>>>Cheers
>>>>>Adam
>>>>>
>>>>>On Sat, 2005-06-04 at 15:12 -0600, Jeremiah Johnson wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>If you change the case on your form method to lower-case, do you still
>>>>>>get the same error? Seems like the error messages are getting mixed -
>>>>>>the real problem I see in your JSP is that you have POST instead of post
>>>>>>in the method.
>>>>>>
>>>>>>- jeremiah
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>-----Original Message-----
>>>>>>>From: Adam Jenkins [mailto:mail@adamjenkins.net]
>>>>>>>Sent: Saturday, June 04, 2005 2:59 PM
>>>>>>>To: Beehive Users
>>>>>>>Subject: login example returning odd error?
>>>>>>>
>>>>>>>Hi All,
>>>>>>>
>>>>>>>I'm trying to do a simple login example with beehive and pollinate.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>I'm
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>getting the following error:
>>>>>>>
>>>>>>>The type of a button must be one of submit, button or reset, found
>>>>>>>'POST'.
>>>>>>>
>>>>>>>My controller is very simple:
>>>>>>>
>>>>>>>package Server;
>>>>>>>
>>>>>>>import javax.servlet.http.HttpSession;
>>>>>>>
>>>>>>>import org.apache.beehive.netui.pageflow.Forward;
>>>>>>>import org.apache.beehive.netui.pageflow.PageFlowController;
>>>>>>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
>>>>>>>
>>>>>>>@Jpf.Controller
>>>>>>>public class Controller
>>>>>>> extends PageFlowController
>>>>>>>{
>>>>>>> /**
>>>>>>> * Callback that is invoked when this controller instance is
>>>>>>>created.
>>>>>>> */
>>>>>>> protected void onCreate()
>>>>>>> {
>>>>>>> }
>>>>>>>
>>>>>>> /**
>>>>>>> * Callback that is invoked when this controller instance is
>>>>>>>destroyed.
>>>>>>> */
>>>>>>> protected void onDestroy(HttpSession session)
>>>>>>> {
>>>>>>> }
>>>>>>>
>>>>>>> /**
>>>>>>> * Performs the login action.
>>>>>>> *
>>>>>>> * @since 2.0
>>>>>>> * @param form The login form.
>>>>>>> * @return The forward.
>>>>>>> */
>>>>>>> @Jpf.Action(
>>>>>>> forwards={
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>@Jpf.Forward(name="login_sucess",
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>path="main.jsp"),
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>@Jpf.Forward(name="login_failure",
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>path="index.jsp")
>>>>>>> }
>>>>>>>
>>>>>>> )
>>>>>>> public Forward processLogin(final LoginForm form){
>>>>>>> if(form.getPassword().equals("password")) return new
>>>>>>>Forward("login_success");
>>>>>>> return new Forward("login_failure");
>>>>>>> }
>>>>>>>
>>>>>>> /**
>>>>>>> * Standard begin method.
>>>>>>> *
>>>>>>> * @since 2.0
>>>>>>> * @return The forward (always 'success').
>>>>>>> */
>>>>>>> @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
>>>>>>>"index.jsp") })
>>>>>>> public Forward begin() {
>>>>>>> return new Forward("success");
>>>>>>> }
>>>>>>>
>>>>>>> //-----------BEGIN INNER CLASSES-----------------//
>>>>>>> /**
>>>>>>> * Form to represent the login information.
>>>>>>> *
>>>>>>> * @author <a href="mailto:ajenkins@infocomp.com">Adam
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>Jenkins</a>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> * @since 2.0
>>>>>>> */
>>>>>>> /**
>>>>>>> * @author adam
>>>>>>> *
>>>>>>> */
>>>>>>> public static final class LoginForm implements
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>java.io.Serializable{
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> /**
>>>>>>> * The password.
>>>>>>> */
>>>>>>> private String password;
>>>>>>>
>>>>>>> /**
>>>>>>> * Gets the password.
>>>>>>> *
>>>>>>> * @since 2.0
>>>>>>> * @return The password
>>>>>>> */
>>>>>>> public String getPassword() {
>>>>>>> return password;
>>>>>>> }
>>>>>>>
>>>>>>> /**
>>>>>>> * Sets the password.
>>>>>>> *
>>>>>>> * @since 2.0
>>>>>>> * @param password The password.
>>>>>>> */
>>>>>>> public void setPassword(String password) {
>>>>>>> this.password = password;
>>>>>>> }
>>>>>>>
>>>>>>> }
>>>>>>> //------------END INNER CLASSES-----------------//
>>>>>>>}
>>>>>>>
>>>>>>>And the index.jsp is even simpler:
>>>>>>>
>>>>>>><%@ 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>Login</title>
>>>>>>> <netui:base/>
>>>>>>> </head>
>>>>>>> <netui:body>
>>>>>>> <netui:form action="processLogin" method="POST">
>>>>>>> <netui:textBox dataSource="actionForm.password" size="20"
>>>>>>>password="true"/>
>>>>>>> <netui:button type="submit" value="Login"/>
>>>>>>> </netui:form>
>>>>>>> </netui:body>
>>>>>>></netui:html>
>>>>>>>
>>>>>>>
>>>>>>>Those are the only two pages (apart from main.jsp which only has
>>>>>>><p>Logged In</p>)
>>>>>>>
>>>>>>>Does anyone have any ideas?
>>>>>>>
>>>>>>>Cheers
>>>>>>>Adam
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>
>>>
>>>
>>>
>
>
>
>
Re: re-regard last
Posted by Adam Jenkins <ma...@adamjenkins.net>.
Possibly, I have no idea to tell you the truth...I certainly didn't mess
with any filter mappings...was just pointing and clicking with
pollinate. I killed that project and started another and haven't hit it
since, so either I've subconciously conditioned myself not to do
whatever was causing it, or I did something weird setting up the orig
project.
A stumper...I'll let you know if I hit it again.
On Sun, 2005-06-05 at 22:32 -0600, Richard Feit wrote:
> That's a strange one -- it happens when the netui:form tag doesn't know
> it's associated Struts module (i.e., its page flow). But it should only
> happen when there *is* no page flow associated with the page -- it
> shouldn't happen sporadically. The only way I can get it to happen is
> to remove the filter-mapping for *.jsp (PageFlowJspFilter) from
> web.xml. When I do that, the error appears when I hit the JSP directly
> (without hitting a page flow or a page flow action). Is it possible
> that this is your problem?
>
> Rich
>
> Adam Jenkins wrote:
>
> >Thought it was the wrong url, however this error still persists. It is
> >very sporatic and I have no idea what's triggering it.
> >
> >Has anyone hit this before?
> >
> >'Could not locate the Form's application module configuration
> >information.'
> >
> >It's on a very simple page using pollinate (page details below).
> >
> >Cheers
> >Adam
> >
> >On Sun, 2005-06-05 at 09:05 +1000, Adam Jenkins wrote:
> >
> >
> >>wrong url :)
> >>
> >>*blush*
> >>
> >>Cheers
> >>Adam
> >>
> >>On Sun, 2005-06-05 at 09:02 +1000, Adam Jenkins wrote:
> >>
> >>
> >>>Thanks Jeremiah,
> >>>
> >>>I change 'POST' to 'post' and that got rid of the button error...now I
> >>>get:
> >>>
> >>>Could not locate the Form's application module configuration
> >>>information.
> >>>
> >>>Any ideas?
> >>>
> >>>Cheers
> >>>Adam
> >>>
> >>>On Sat, 2005-06-04 at 15:12 -0600, Jeremiah Johnson wrote:
> >>>
> >>>
> >>>>If you change the case on your form method to lower-case, do you still
> >>>>get the same error? Seems like the error messages are getting mixed -
> >>>>the real problem I see in your JSP is that you have POST instead of post
> >>>>in the method.
> >>>>
> >>>>- jeremiah
> >>>>
> >>>>
> >>>>
> >>>>>-----Original Message-----
> >>>>>From: Adam Jenkins [mailto:mail@adamjenkins.net]
> >>>>>Sent: Saturday, June 04, 2005 2:59 PM
> >>>>>To: Beehive Users
> >>>>>Subject: login example returning odd error?
> >>>>>
> >>>>>Hi All,
> >>>>>
> >>>>>I'm trying to do a simple login example with beehive and pollinate.
> >>>>>
> >>>>>
> >>>>I'm
> >>>>
> >>>>
> >>>>>getting the following error:
> >>>>>
> >>>>>The type of a button must be one of submit, button or reset, found
> >>>>>'POST'.
> >>>>>
> >>>>>My controller is very simple:
> >>>>>
> >>>>>package Server;
> >>>>>
> >>>>>import javax.servlet.http.HttpSession;
> >>>>>
> >>>>>import org.apache.beehive.netui.pageflow.Forward;
> >>>>>import org.apache.beehive.netui.pageflow.PageFlowController;
> >>>>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
> >>>>>
> >>>>>@Jpf.Controller
> >>>>>public class Controller
> >>>>> extends PageFlowController
> >>>>>{
> >>>>> /**
> >>>>> * Callback that is invoked when this controller instance is
> >>>>>created.
> >>>>> */
> >>>>> protected void onCreate()
> >>>>> {
> >>>>> }
> >>>>>
> >>>>> /**
> >>>>> * Callback that is invoked when this controller instance is
> >>>>>destroyed.
> >>>>> */
> >>>>> protected void onDestroy(HttpSession session)
> >>>>> {
> >>>>> }
> >>>>>
> >>>>> /**
> >>>>> * Performs the login action.
> >>>>> *
> >>>>> * @since 2.0
> >>>>> * @param form The login form.
> >>>>> * @return The forward.
> >>>>> */
> >>>>> @Jpf.Action(
> >>>>> forwards={
> >>>>>
> >>>>>
> >>>>>
> >>>>@Jpf.Forward(name="login_sucess",
> >>>>
> >>>>
> >>>>>path="main.jsp"),
> >>>>>
> >>>>>
> >>>>>
> >>>>@Jpf.Forward(name="login_failure",
> >>>>
> >>>>
> >>>>>path="index.jsp")
> >>>>> }
> >>>>>
> >>>>> )
> >>>>> public Forward processLogin(final LoginForm form){
> >>>>> if(form.getPassword().equals("password")) return new
> >>>>>Forward("login_success");
> >>>>> return new Forward("login_failure");
> >>>>> }
> >>>>>
> >>>>> /**
> >>>>> * Standard begin method.
> >>>>> *
> >>>>> * @since 2.0
> >>>>> * @return The forward (always 'success').
> >>>>> */
> >>>>> @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
> >>>>>"index.jsp") })
> >>>>> public Forward begin() {
> >>>>> return new Forward("success");
> >>>>> }
> >>>>>
> >>>>> //-----------BEGIN INNER CLASSES-----------------//
> >>>>> /**
> >>>>> * Form to represent the login information.
> >>>>> *
> >>>>> * @author <a href="mailto:ajenkins@infocomp.com">Adam
> >>>>>
> >>>>>
> >>>>Jenkins</a>
> >>>>
> >>>>
> >>>>> * @since 2.0
> >>>>> */
> >>>>> /**
> >>>>> * @author adam
> >>>>> *
> >>>>> */
> >>>>> public static final class LoginForm implements
> >>>>>
> >>>>>
> >>>>java.io.Serializable{
> >>>>
> >>>>
> >>>>> /**
> >>>>> * The password.
> >>>>> */
> >>>>> private String password;
> >>>>>
> >>>>> /**
> >>>>> * Gets the password.
> >>>>> *
> >>>>> * @since 2.0
> >>>>> * @return The password
> >>>>> */
> >>>>> public String getPassword() {
> >>>>> return password;
> >>>>> }
> >>>>>
> >>>>> /**
> >>>>> * Sets the password.
> >>>>> *
> >>>>> * @since 2.0
> >>>>> * @param password The password.
> >>>>> */
> >>>>> public void setPassword(String password) {
> >>>>> this.password = password;
> >>>>> }
> >>>>>
> >>>>> }
> >>>>> //------------END INNER CLASSES-----------------//
> >>>>>}
> >>>>>
> >>>>>And the index.jsp is even simpler:
> >>>>>
> >>>>><%@ 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>Login</title>
> >>>>> <netui:base/>
> >>>>> </head>
> >>>>> <netui:body>
> >>>>> <netui:form action="processLogin" method="POST">
> >>>>> <netui:textBox dataSource="actionForm.password" size="20"
> >>>>>password="true"/>
> >>>>> <netui:button type="submit" value="Login"/>
> >>>>> </netui:form>
> >>>>> </netui:body>
> >>>>></netui:html>
> >>>>>
> >>>>>
> >>>>>Those are the only two pages (apart from main.jsp which only has
> >>>>><p>Logged In</p>)
> >>>>>
> >>>>>Does anyone have any ideas?
> >>>>>
> >>>>>Cheers
> >>>>>Adam
> >>>>>
> >>>>>
> >>>>
> >>>>
> >
> >
> >
> >
Re: re-regard last
Posted by Richard Feit <ri...@bea.com>.
That's a strange one -- it happens when the netui:form tag doesn't know
it's associated Struts module (i.e., its page flow). But it should only
happen when there *is* no page flow associated with the page -- it
shouldn't happen sporadically. The only way I can get it to happen is
to remove the filter-mapping for *.jsp (PageFlowJspFilter) from
web.xml. When I do that, the error appears when I hit the JSP directly
(without hitting a page flow or a page flow action). Is it possible
that this is your problem?
Rich
Adam Jenkins wrote:
>Thought it was the wrong url, however this error still persists. It is
>very sporatic and I have no idea what's triggering it.
>
>Has anyone hit this before?
>
>'Could not locate the Form's application module configuration
>information.'
>
>It's on a very simple page using pollinate (page details below).
>
>Cheers
>Adam
>
>On Sun, 2005-06-05 at 09:05 +1000, Adam Jenkins wrote:
>
>
>>wrong url :)
>>
>>*blush*
>>
>>Cheers
>>Adam
>>
>>On Sun, 2005-06-05 at 09:02 +1000, Adam Jenkins wrote:
>>
>>
>>>Thanks Jeremiah,
>>>
>>>I change 'POST' to 'post' and that got rid of the button error...now I
>>>get:
>>>
>>>Could not locate the Form's application module configuration
>>>information.
>>>
>>>Any ideas?
>>>
>>>Cheers
>>>Adam
>>>
>>>On Sat, 2005-06-04 at 15:12 -0600, Jeremiah Johnson wrote:
>>>
>>>
>>>>If you change the case on your form method to lower-case, do you still
>>>>get the same error? Seems like the error messages are getting mixed -
>>>>the real problem I see in your JSP is that you have POST instead of post
>>>>in the method.
>>>>
>>>>- jeremiah
>>>>
>>>>
>>>>
>>>>>-----Original Message-----
>>>>>From: Adam Jenkins [mailto:mail@adamjenkins.net]
>>>>>Sent: Saturday, June 04, 2005 2:59 PM
>>>>>To: Beehive Users
>>>>>Subject: login example returning odd error?
>>>>>
>>>>>Hi All,
>>>>>
>>>>>I'm trying to do a simple login example with beehive and pollinate.
>>>>>
>>>>>
>>>>I'm
>>>>
>>>>
>>>>>getting the following error:
>>>>>
>>>>>The type of a button must be one of submit, button or reset, found
>>>>>'POST'.
>>>>>
>>>>>My controller is very simple:
>>>>>
>>>>>package Server;
>>>>>
>>>>>import javax.servlet.http.HttpSession;
>>>>>
>>>>>import org.apache.beehive.netui.pageflow.Forward;
>>>>>import org.apache.beehive.netui.pageflow.PageFlowController;
>>>>>import org.apache.beehive.netui.pageflow.annotations.Jpf;
>>>>>
>>>>>@Jpf.Controller
>>>>>public class Controller
>>>>> extends PageFlowController
>>>>>{
>>>>> /**
>>>>> * Callback that is invoked when this controller instance is
>>>>>created.
>>>>> */
>>>>> protected void onCreate()
>>>>> {
>>>>> }
>>>>>
>>>>> /**
>>>>> * Callback that is invoked when this controller instance is
>>>>>destroyed.
>>>>> */
>>>>> protected void onDestroy(HttpSession session)
>>>>> {
>>>>> }
>>>>>
>>>>> /**
>>>>> * Performs the login action.
>>>>> *
>>>>> * @since 2.0
>>>>> * @param form The login form.
>>>>> * @return The forward.
>>>>> */
>>>>> @Jpf.Action(
>>>>> forwards={
>>>>>
>>>>>
>>>>>
>>>>@Jpf.Forward(name="login_sucess",
>>>>
>>>>
>>>>>path="main.jsp"),
>>>>>
>>>>>
>>>>>
>>>>@Jpf.Forward(name="login_failure",
>>>>
>>>>
>>>>>path="index.jsp")
>>>>> }
>>>>>
>>>>> )
>>>>> public Forward processLogin(final LoginForm form){
>>>>> if(form.getPassword().equals("password")) return new
>>>>>Forward("login_success");
>>>>> return new Forward("login_failure");
>>>>> }
>>>>>
>>>>> /**
>>>>> * Standard begin method.
>>>>> *
>>>>> * @since 2.0
>>>>> * @return The forward (always 'success').
>>>>> */
>>>>> @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
>>>>>"index.jsp") })
>>>>> public Forward begin() {
>>>>> return new Forward("success");
>>>>> }
>>>>>
>>>>> //-----------BEGIN INNER CLASSES-----------------//
>>>>> /**
>>>>> * Form to represent the login information.
>>>>> *
>>>>> * @author <a href="mailto:ajenkins@infocomp.com">Adam
>>>>>
>>>>>
>>>>Jenkins</a>
>>>>
>>>>
>>>>> * @since 2.0
>>>>> */
>>>>> /**
>>>>> * @author adam
>>>>> *
>>>>> */
>>>>> public static final class LoginForm implements
>>>>>
>>>>>
>>>>java.io.Serializable{
>>>>
>>>>
>>>>> /**
>>>>> * The password.
>>>>> */
>>>>> private String password;
>>>>>
>>>>> /**
>>>>> * Gets the password.
>>>>> *
>>>>> * @since 2.0
>>>>> * @return The password
>>>>> */
>>>>> public String getPassword() {
>>>>> return password;
>>>>> }
>>>>>
>>>>> /**
>>>>> * Sets the password.
>>>>> *
>>>>> * @since 2.0
>>>>> * @param password The password.
>>>>> */
>>>>> public void setPassword(String password) {
>>>>> this.password = password;
>>>>> }
>>>>>
>>>>> }
>>>>> //------------END INNER CLASSES-----------------//
>>>>>}
>>>>>
>>>>>And the index.jsp is even simpler:
>>>>>
>>>>><%@ 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>Login</title>
>>>>> <netui:base/>
>>>>> </head>
>>>>> <netui:body>
>>>>> <netui:form action="processLogin" method="POST">
>>>>> <netui:textBox dataSource="actionForm.password" size="20"
>>>>>password="true"/>
>>>>> <netui:button type="submit" value="Login"/>
>>>>> </netui:form>
>>>>> </netui:body>
>>>>></netui:html>
>>>>>
>>>>>
>>>>>Those are the only two pages (apart from main.jsp which only has
>>>>><p>Logged In</p>)
>>>>>
>>>>>Does anyone have any ideas?
>>>>>
>>>>>Cheers
>>>>>Adam
>>>>>
>>>>>
>>>>
>>>>
>
>
>
>
re-regard last
Posted by Adam Jenkins <ma...@adamjenkins.net>.
Thought it was the wrong url, however this error still persists. It is
very sporatic and I have no idea what's triggering it.
Has anyone hit this before?
'Could not locate the Form's application module configuration
information.'
It's on a very simple page using pollinate (page details below).
Cheers
Adam
On Sun, 2005-06-05 at 09:05 +1000, Adam Jenkins wrote:
> wrong url :)
>
> *blush*
>
> Cheers
> Adam
>
> On Sun, 2005-06-05 at 09:02 +1000, Adam Jenkins wrote:
> > Thanks Jeremiah,
> >
> > I change 'POST' to 'post' and that got rid of the button error...now I
> > get:
> >
> > Could not locate the Form's application module configuration
> > information.
> >
> > Any ideas?
> >
> > Cheers
> > Adam
> >
> > On Sat, 2005-06-04 at 15:12 -0600, Jeremiah Johnson wrote:
> > > If you change the case on your form method to lower-case, do you still
> > > get the same error? Seems like the error messages are getting mixed -
> > > the real problem I see in your JSP is that you have POST instead of post
> > > in the method.
> > >
> > > - jeremiah
> > >
> > > > -----Original Message-----
> > > > From: Adam Jenkins [mailto:mail@adamjenkins.net]
> > > > Sent: Saturday, June 04, 2005 2:59 PM
> > > > To: Beehive Users
> > > > Subject: login example returning odd error?
> > > >
> > > > Hi All,
> > > >
> > > > I'm trying to do a simple login example with beehive and pollinate.
> > > I'm
> > > > getting the following error:
> > > >
> > > > The type of a button must be one of submit, button or reset, found
> > > > 'POST'.
> > > >
> > > > My controller is very simple:
> > > >
> > > > package Server;
> > > >
> > > > import javax.servlet.http.HttpSession;
> > > >
> > > > import org.apache.beehive.netui.pageflow.Forward;
> > > > import org.apache.beehive.netui.pageflow.PageFlowController;
> > > > import org.apache.beehive.netui.pageflow.annotations.Jpf;
> > > >
> > > > @Jpf.Controller
> > > > public class Controller
> > > > extends PageFlowController
> > > > {
> > > > /**
> > > > * Callback that is invoked when this controller instance is
> > > > created.
> > > > */
> > > > protected void onCreate()
> > > > {
> > > > }
> > > >
> > > > /**
> > > > * Callback that is invoked when this controller instance is
> > > > destroyed.
> > > > */
> > > > protected void onDestroy(HttpSession session)
> > > > {
> > > > }
> > > >
> > > > /**
> > > > * Performs the login action.
> > > > *
> > > > * @since 2.0
> > > > * @param form The login form.
> > > > * @return The forward.
> > > > */
> > > > @Jpf.Action(
> > > > forwards={
> > > >
> > > @Jpf.Forward(name="login_sucess",
> > > > path="main.jsp"),
> > > >
> > > @Jpf.Forward(name="login_failure",
> > > > path="index.jsp")
> > > > }
> > > >
> > > > )
> > > > public Forward processLogin(final LoginForm form){
> > > > if(form.getPassword().equals("password")) return new
> > > > Forward("login_success");
> > > > return new Forward("login_failure");
> > > > }
> > > >
> > > > /**
> > > > * Standard begin method.
> > > > *
> > > > * @since 2.0
> > > > * @return The forward (always 'success').
> > > > */
> > > > @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
> > > > "index.jsp") })
> > > > public Forward begin() {
> > > > return new Forward("success");
> > > > }
> > > >
> > > > //-----------BEGIN INNER CLASSES-----------------//
> > > > /**
> > > > * Form to represent the login information.
> > > > *
> > > > * @author <a href="mailto:ajenkins@infocomp.com">Adam
> > > Jenkins</a>
> > > > * @since 2.0
> > > > */
> > > > /**
> > > > * @author adam
> > > > *
> > > > */
> > > > public static final class LoginForm implements
> > > java.io.Serializable{
> > > >
> > > > /**
> > > > * The password.
> > > > */
> > > > private String password;
> > > >
> > > > /**
> > > > * Gets the password.
> > > > *
> > > > * @since 2.0
> > > > * @return The password
> > > > */
> > > > public String getPassword() {
> > > > return password;
> > > > }
> > > >
> > > > /**
> > > > * Sets the password.
> > > > *
> > > > * @since 2.0
> > > > * @param password The password.
> > > > */
> > > > public void setPassword(String password) {
> > > > this.password = password;
> > > > }
> > > >
> > > > }
> > > > //------------END INNER CLASSES-----------------//
> > > > }
> > > >
> > > > And the index.jsp is even simpler:
> > > >
> > > > <%@ 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>Login</title>
> > > > <netui:base/>
> > > > </head>
> > > > <netui:body>
> > > > <netui:form action="processLogin" method="POST">
> > > > <netui:textBox dataSource="actionForm.password" size="20"
> > > > password="true"/>
> > > > <netui:button type="submit" value="Login"/>
> > > > </netui:form>
> > > > </netui:body>
> > > > </netui:html>
> > > >
> > > >
> > > > Those are the only two pages (apart from main.jsp which only has
> > > > <p>Logged In</p>)
> > > >
> > > > Does anyone have any ideas?
> > > >
> > > > Cheers
> > > > Adam
> > >
> > >
> >
>