wood burning stoves 2.0*
The moose likes Struts and the fly likes URGENT:Tiles giving bean not defined Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "URGENT:Tiles giving bean not defined" Watch "URGENT:Tiles giving bean not defined" New topic
Author

URGENT:Tiles giving bean not defined

Sriram Chandrasekaran
Greenhorn

Joined: Oct 08, 2003
Posts: 17
Hi i am using struts with tiles. My form element is in a tile

and is as follows:

<form action="/Login.do" method="POST">

<html:text property="username"/>


..
</form>

This gives error at the server saying the BEAN was not found...i thought it shud be able to use the form's bean.

However if i explicitly specify

<html:text name="loginForm: property="username"/> it is able to find the bean!

the struts action mappingg is as follows:
<action
path="/Login.do"
type="com.anthem.pwdexpire.actions.LoginAction"
name="loginForm"
scope="request"
validate="false">

<forward name="nextview" path=".login.layout"/>
</action>

thanks in advance!
-Sri
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

If you use <html:text you must either specify name (as you did) OR change the <form to <html:form action="Login.do">

This because Struts wants to prepopulate the html:text and needs an ActionForm for it.


A good workman is known by his tools.
Sriram Chandrasekaran
Greenhorn

Joined: Oct 08, 2003
Posts: 17
Got it thanks a lot!

-sri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URGENT:Tiles giving bean not defined