You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Selda Guner <ac...@yahoo.com> on 2005/04/07 02:34:40 UTC

netui:form tag error

Hi,

 

I have the following error when I load my login.jsp file:

 

[Tag Error:1, Found in tag Form]

 

Page Errors

Error Number

Tag Type

Error

1

Form

Message

The type of a button must be one of submit, button or reset, found 'POST'.

 

 

 

Here is the page:

 

<%@ 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 Page</title>

    <netui:base/>

  </head>

  <netui:body>

  <table width="100%" align=center border=0>

  <tbody>

  <tr>

       <td>

       <center>

       <font color=#3333kk size=4><b>Broker System</b></font>

       </center>

       <br>

       </td>

  </tr>

  </tbody>

  </table>   

  <netui:form action="processLogin" method="POST">

  <table align=center border=0>

  <tbody>

  <tr>

       <td><b>Login Name : </b></td>

       <td><netui:textBox dataSource="actionForm.username" size="25"/></td>

  </tr>

  <tr>

       <td><b>Password : </b></td>

       <td><netui:textBox dataSource="actionForm.password" size="25" password="true"/></td>

  </tr>

  <tr>

       <td><netui:button type="submit" value="Login" /></td>

  </tr>

  </tbody>

</netui:form>

  </table>

  </netui:body>

</netui:html>

 

 

If I change the method of the form tag to some other value rather than �POST�, it is giving the same error with the new value. As an example, if I write method=�Submit�, it is saying �The type of a button must be one of submit, button or reset, found 'Submit'.� It is like as if it is seeing the form tag as button. If I change the value of button tag, then it loads Netui Page error saying that tag is not appropriate for tag library. This means it is actually reading the button tag. I didn�t understand what is wrong here. I have no problem with running other pageflow applications like coreWeb or any other build problems. 

 

Do you have any ideas about what can be the problem?

 

Thanks.

 

Selda..

 

 

 

Here is the controller.jpf:

 

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;

 

import de.edu.SIS.forms.LoginForm;

 

@Jpf.Controller

public class Controller extends PageFlowController {

    

                @Jpf.Action(

                forwards={

                                @Jpf.Forward(name="success", path="/pages/login.jsp")

                }

                )

                protected Forward begin() {

                return new Forward("success");

                }

                @Jpf.Action(

                forwards={

                                @Jpf.Forward(name="mypage", path="mypage.jsp")

                }

                )

                public Forward processLogin(LoginForm form) {

                                form.getUsername();

                                form.getPassword();

                return new Forward("mypage");

                }

    protected void onCreate() { }

 

    protected void onDestroy(HttpSession session) {  }

}

 

 

And here is the LoginForm:

 

package de.edu.SIS.forms;

public class LoginForm implements java.io.Serializable {

                private String username;

                private String password;

                public void setUsername(String username) {

                                this.username = username;

                }

                public String getUsername() {

                                return this.username;

                }

                public void setPassword(String password) {

                                this.password = password;

                }

                public String getPassword() {

                                return this.password;

                }

}

 

                

 

 

No trees were killed in the sending of this message. 

However a large number of electrons were terribly inconvenienced�.

 

 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: netui:form tag error

Posted by Richard Feit <ri...@bea.com>.
Hi Selda,

I see. Yes, the .jpf and its .jsps need to be in a separate folder 
(although not necessarily in the root folder). There are various ways to 
share common items, like nested page flows (reusable flows that can be 
invoked from other flows) or page templating (where you reference 
template pages with common view elements).

Rich

Selda Guner wrote:

>Hi Rich,
> 
>I solved the problem by putting .jpf and .jsp files to the root folder. I thought before to collect my pages in separate folder as in Sturts I can do that. It is working now. Thanks.
> 
>Regards,
> 
>Selda..
> 
> 
>
>Richard Feit <ri...@bea.com> wrote:
>
>Hi Selda,
>
>Would you include your page flow, too? I'm assuming it does have an 
>action -- either an action method or a @Jpf.SimpleAction -- named 
>'processLogin'?
>
>Rich
>
>Selda Guner wrote:
>
>  
>
>>Hi,
>>
>>
>>
>>If I change the value of method to “post”, then it gives another error:
>>
>>
>>
>>[Tag Error:1, Found in tag Form]
>>
>>
>>
>>Page Errors
>>
>>Error Number
>>
>>Tag Type
>>
>>Error
>>
>>1
>>
>>Form
>>
>>Message
>>
>>Action 'processLogin' is not a valid action.
>>
>>
>>................................................................
>>    
>>
>
>
>  
>
>>__________________________________________________
>>Do You Yahoo!?
>>Tired of spam? Yahoo! Mail has the best spam protection around 
>>http://mail.yahoo.com 
>>
>>
>>    
>>
>
>
>		
>---------------------------------
>Do you Yahoo!?
> Better first dates. More second dates. Yahoo! Personals 
>  
>

Re: netui:form tag error

Posted by Selda Guner <ac...@yahoo.com>.
Hi Rich,
 
I solved the problem by putting .jpf and .jsp files to the root folder. I thought before to collect my pages in separate folder as in Sturts I can do that. It is working now. Thanks.
 
Regards,
 
Selda..
 
 

Richard Feit <ri...@bea.com> wrote:

Hi Selda,

Would you include your page flow, too? I'm assuming it does have an 
action -- either an action method or a @Jpf.SimpleAction -- named 
'processLogin'?

Rich

Selda Guner wrote:

>Hi,
>
> 
>
>If I change the value of method to �post�, then it gives another error:
>
> 
>
>[Tag Error:1, Found in tag Form]
>
> 
>
>Page Errors
>
>Error Number
>
>Tag Type
>
>Error
>
>1
>
>Form
>
>Message
>
>Action 'processLogin' is not a valid action.
>
> 
>................................................................


>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
> 
>


		
---------------------------------
Do you Yahoo!?
 Better first dates. More second dates. Yahoo! Personals 

Re: netui:form tag error

Posted by Richard Feit <ri...@bea.com>.
Hi Selda,

Would you include your page flow, too? I'm assuming it does have an 
action -- either an action method or a @Jpf.SimpleAction -- named 
'processLogin'?

Rich

Selda Guner wrote:

>Hi,
>
> 
>
>If I change the value of method to “post”, then it gives another error:
>
> 
>
>[Tag Error:1, Found in tag Form]
>
> 
>
>Page Errors
>
>Error Number
>
>Tag Type
>
>Error
>
>1
>
>Form
>
>Message
>
>Action 'processLogin' is not a valid action.
>
> 
>
> 
>
> 
>
>Here is the page:
>
> 
>
><%@ 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 Page</title>
>
>    <netui:base/>
>
>  </head>
>
>  <netui:body>
>
>……………….
>
>  <hr width="50%">
>
>  <netui:form action="processLogin" method="post">
>
>  <table align=center border=0>
>
>  <tbody>
>
>  <tr>
>
>  <br>
>
>       <td><b>Login Name : </b></td>
>
>       <td><netui:textBox dataSource="actionForm.username" size="25"/></td>
>
>  </tr>
>
>  <tr>
>
>       <td><b>Password : </b></td>
>
>       <td><netui:textBox dataSource="actionForm.password" size="25" password="true"/></td>
>
>  </tr>
>
>  <tr>
>
>       <td><netui:button type="submit" value="Login" /></td>
>
>  </tr>
>
>  </tbody>
>
>  </table>
>
>  </netui:form>
>
>  <br>
>
>  <hr width="50%">
>
>  </netui:body>
>
></netui:html>
>
> 
>
>Thanks.
>
> 
>
>Selda..
>
>
>Daryl Olander <do...@gmail.com> wrote:
>There is a bug here in the error message, this isn't related to the
>button. What you need to do is set the value of the method attribute
>on the to be either "get" or "post" and it is case
>sensitive. Sorry about the bad error message.
>
>On Apr 6, 2005 6:34 PM, Selda Guner wrote:
>  
>
>>Hi,
>>
>>I have the following error when I load my login.jsp file:
>>
>>[Tag Error:1, Found in tag Form]
>>
>>Page Errors
>>
>>Error Number
>>
>>Tag Type
>>
>>Error
>>
>>1
>>
>>Form
>>
>>Message
>>
>>The type of a button must be one of submit, button or reset, found 'POST'.
>>
>>Here is the page:
>>    
>>
>........
>
>  
>
>>__________________________________________________
>>Do You Yahoo!?
>>Tired of spam? Yahoo! Mail has the best spam protection around
>>http://mail.yahoo.com
>>
>>    
>>
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>  
>

Re: netui:form tag error

Posted by Selda Guner <ac...@yahoo.com>.
Hi,

 

If I change the value of method to �post�, then it gives another error:

 

[Tag Error:1, Found in tag Form]

 

Page Errors

Error Number

Tag Type

Error

1

Form

Message

Action 'processLogin' is not a valid action.

 

 

 

Here is the page:

 

<%@ 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 Page</title>

    <netui:base/>

  </head>

  <netui:body>

������.

  <hr width="50%">

  <netui:form action="processLogin" method="post">

  <table align=center border=0>

  <tbody>

  <tr>

  <br>

       <td><b>Login Name : </b></td>

       <td><netui:textBox dataSource="actionForm.username" size="25"/></td>

  </tr>

  <tr>

       <td><b>Password : </b></td>

       <td><netui:textBox dataSource="actionForm.password" size="25" password="true"/></td>

  </tr>

  <tr>

       <td><netui:button type="submit" value="Login" /></td>

  </tr>

  </tbody>

  </table>

  </netui:form>

  <br>

  <hr width="50%">

  </netui:body>

</netui:html>

 

Thanks.

 

Selda..


Daryl Olander <do...@gmail.com> wrote:
There is a bug here in the error message, this isn't related to the
button. What you need to do is set the value of the method attribute
on the to be either "get" or "post" and it is case
sensitive. Sorry about the bad error message.

On Apr 6, 2005 6:34 PM, Selda Guner wrote:
> 
> Hi,
> 
> I have the following error when I load my login.jsp file:
> 
> [Tag Error:1, Found in tag Form]
> 
> Page Errors
> 
> Error Number
> 
> Tag Type
> 
> Error
> 
> 1
> 
> Form
> 
> Message
> 
> The type of a button must be one of submit, button or reset, found 'POST'.
> 
> Here is the page:
........

> 
>> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: netui:form tag error

Posted by Daryl Olander <do...@gmail.com>.
There is a bug here in the error message, this isn't related to the
button.  What you need to do is set the value of the method attribute
on the <netui:form> to be either "get" or "post" and it is case
sensitive.  Sorry about the bad error message.

On Apr 6, 2005 6:34 PM, Selda Guner <ac...@yahoo.com> wrote:
> 
> Hi,
> 
> I have the following error when I load my login.jsp file:
> 
> [Tag Error:1, Found in tag Form]
> 
> Page Errors
> 
> Error Number
> 
> Tag Type
> 
> Error
> 
> 1
> 
> Form
> 
> Message
> 
> The type of a button must be one of submit, button or reset, found 'POST'.
> 
> Here is the page:
> 
> <%@ 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 Page</title>
> 
>     <netui:base/>
> 
>   </head>
> 
>   <netui:body>
> 
>   <table width="100%" align=center border=0>
> 
>   <tbody>
> 
>   <tr>
> 
>        <td>
> 
>        <center>
> 
>        <font color=#3333kk size=4><b>Broker System</b></font>
> 
>        </center>
> 
>        <br>
> 
>        </td>
> 
>   </tr>
> 
>   </tbody>
> 
>   </table>
> 
>   <netui:form action="processLogin" method="POST">
> 
>   <table align=center border=0>
> 
>   <tbody>
> 
>   <tr>
> 
>        <td><b>Login Name : </b></td>
> 
>        <td><netui:textBox dataSource="actionForm.username" size="25"/></td>
> 
>   </tr>
> 
>   <tr>
> 
>        <td><b>Password : </b></td>
> 
>        <td><netui:textBox dataSource="actionForm.password" size="25" password="true"/></td>
> 
>   </tr>
> 
>   <tr>
> 
>        <td><netui:button type="submit" value="Login" /></td>
> 
>   </tr>
> 
>   </tbody>
> 
> </netui:form>
> 
>   </table>
> 
>   </netui:body>
> 
> </netui:html>
> 
> If I change the method of the form tag to some other value rather than "POST", it is giving the same error with the new value. As an example, if I write method="Submit", it is saying "The type of a button must be one of submit, button or reset, found 'Submit'." It is like as if it is seeing the form tag as button. If I change the value of button tag, then it loads Netui Page error saying that tag is not appropriate for tag library. This means it is actually reading the button tag. I didn't understand what is wrong here. I have no problem with running other pageflow applications like coreWeb or any other build problems.
> 
> Do you have any ideas about what can be the problem?
> 
> Thanks.
> 
> Selda..
> 
> Here is the controller.jpf:
> 
> 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;
> 
> import de.edu.SIS.forms.LoginForm;
> 
> @Jpf.Controller
> 
> public class Controller extends PageFlowController {
> 
>                 @Jpf.Action(
> 
>                 forwards={
> 
>                                 @Jpf.Forward(name="success", path="/pages/login.jsp")
> 
>                 }
> 
>                 )
> 
>                 protected Forward begin() {
> 
>                 return new Forward("success");
> 
>                 }
> 
>                 @Jpf.Action(
> 
>                 forwards={
> 
>                                 @Jpf.Forward(name="mypage", path="mypage.jsp")
> 
>                 }
> 
>                 )
> 
>                 public Forward processLogin(LoginForm form) {
> 
>                                 form.getUsername();
> 
>                                 form.getPassword();
> 
>                 return new Forward("mypage");
> 
>                 }
> 
>     protected void onCreate() { }
> 
>     protected void onDestroy(HttpSession session) {  }
> 
> }
> 
> And here is the LoginForm:
> 
> package de.edu.SIS.forms;
> 
> public class LoginForm implements java.io.Serializable {
> 
>                 private String username;
> 
>                 private String password;
> 
>                 public void setUsername(String username) {
> 
>                                 this.username = username;
> 
>                 }
> 
>                 public String getUsername() {
> 
>                                 return this.username;
> 
>                 }
> 
>                 public void setPassword(String password) {
> 
>                                 this.password = password;
> 
>                 }
> 
>                 public String getPassword() {
> 
>                                 return this.password;
> 
>                 }
> 
> }
> 
> No trees were killed in the sending of this message.
> 
> However a large number of electrons were terribly inconvenienced….
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>