RE: newbie question - usebean

2003-02-10 Thread Diego Bursztyn
Thanks Nico, but I had all that in place.
The problem was that I originally started building the app implementing a
model 2 pattern without using struts. When I converted the app to struts, my
UserBO and UserDAO classes worked with the User bean and I had created a
UserForm ActionForm. The mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 9:50 AM
To: Struts Users Mailing List
Subject: Re: newbie question - usebean


> I do have  in the code I just did not
> included in the email.
> I also have the following in my jsp:
>
>  class="com.basf.plasticsportal.data.User">
> 
> 
>
> thanks,
>
> Diego.
>

You don't need  : this jsp tag is used to create a script
variable (named as "id" defines) from a bean in some scope, or create this
bean if not found.

 will look in struts-config.xml for the "action/editUser" action
definition and get associated formbean as default bean for  tags.
This way you doesn't need to set "name" attribute to  tags nested
inside an .



Try with such a minimal JSP code to avoid other JSP / HTML errors.

Nico.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: newbie question - usebean

2003-02-10 Thread Diego Bursztyn
Thanks Nico, but I had all that in place.
The problem was that I originally started building the app implementing a
model 2 pattern without using struts. When I converted the app to struts, my
UserBO and UserDAO classes worked with the User bean and I had created a
UserForm ActionForm. The mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 9:50 AM
To: Struts Users Mailing List
Subject: Re: newbie question - usebean


> I do have  in the code I just did not
> included in the email.
> I also have the following in my jsp:
>
>  class="com.basf.plasticsportal.data.User">
> 
> 
>
> thanks,
>
> Diego.
>

You don't need  : this jsp tag is used to create a script
variable (named as "id" defines) from a bean in some scope, or create this
bean if not found.

 will look in struts-config.xml for the "action/editUser" action
definition and get associated formbean as default bean for  tags.
This way you doesn't need to set "name" attribute to  tags nested
inside an .


You should have such a definition in your struts-config :

...
 
  

...
  
   
  
...

Using this, struts will know that "/action/editUser" is associated with a
ActionFormBean named "user" in request scope, and will search for / create
it.


And in your JSP :

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>







Try with such a minimal JSP code to avoid other JSP / HTML errors.

Nico.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: newbie question - usebean

2003-02-10 Thread Nicolas De Loof
> I do have  in the code I just did not
> included in the email.
> I also have the following in my jsp:
>
>  class="com.basf.plasticsportal.data.User">
> 
> 
>
> thanks,
>
> Diego.
>

You don't need  : this jsp tag is used to create a script
variable (named as "id" defines) from a bean in some scope, or create this
bean if not found.

 will look in struts-config.xml for the "action/editUser" action
definition and get associated formbean as default bean for  tags.
This way you doesn't need to set "name" attribute to  tags nested
inside an .


You should have such a definition in your struts-config :

...
 
  

...
  
   
  
...

Using this, struts will know that "/action/editUser" is associated with a
ActionFormBean named "user" in request scope, and will search for / create
it.


And in your JSP :

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>







Try with such a minimal JSP code to avoid other JSP / HTML errors.

Nico.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: newbie question - usebean

2003-02-10 Thread Diego Bursztyn
I do have  in the code I just did not
included in the email.
I also have the following in my jsp:





thanks,

Diego.

-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 7:31 AM
To: Struts Users Mailing List
Subject: Re: newbie question - usebean


Your code doesn't show any  tag. This tag is used by struts to
set the targeted action, and so the associated bean in some scope.

You can use  without  by setting it's "name" attribute
(name="user" in your case). But if your HTML form has to be commited to a
Struts action, you should look at 

Nico.


> I have a jsp page being called by an action that passes a user type in the
> request.
> the jsp has the following code:
>
> 
> : 
> 
> 
> 
> : 
> 
> 
> 
> : 
> 
> 
> 
> : 
> 
> 
>
> My problem is that the only value displaying on the browser is the
username.
> When I write the following scriptlet:
> <% out.println( ((User) request.getAttribute("user")).getFirstName)); %>
> the first name displays.
>
> Any help will be greatly appreciated
>
> Diego.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: newbie question - usebean

2003-02-10 Thread Nicolas De Loof
Your code doesn't show any  tag. This tag is used by struts to
set the targeted action, and so the associated bean in some scope.

You can use  without  by setting it's "name" attribute
(name="user" in your case). But if your HTML form has to be commited to a
Struts action, you should look at 

Nico.


> I have a jsp page being called by an action that passes a user type in the
> request.
> the jsp has the following code:
>
> 
> : 
> 
> 
> 
> : 
> 
> 
> 
> : 
> 
> 
> 
> : 
> 
> 
>
> My problem is that the only value displaying on the browser is the
username.
> When I write the following scriptlet:
> <% out.println( ((User) request.getAttribute("user")).getFirstName)); %>
> the first name displays.
>
> Any help will be greatly appreciated
>
> Diego.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]