You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by struts user <st...@yahoo.com> on 2002/08/27 21:27:16 UTC
Reposting: Retrieve Object value in ActionServlet.
Hello again,
I am reposting the following question and in need of
help. Any help is greatly appreaciated!!!
In my struts-config.xml file, I have:
<form-beans>
<form-bean name="userInfoForm"
type="com.mycompany.mydept.mypackage.UserInfoForm"/>
</form-beans>
<action-mappings>
<action path="/userInfoConfirm"
type="com.mycompany.mydept.mypackage.UserInfoAction"
name="userInfoForm"
scope="request"
input="/userInput.jsp">
<forward name="success"
path="/userInfoConfirm.jsp"/>
</action>
</action-mappings>
In my UserInfoForm, I have the following setter and
getter:
public void setFullname(String fullname){
this.fullName = fullname;
}
public String getFullname(){
return (fullName);
}
In my UserInfoAction servlet, I did the following:
User myUser = new User(fullName);
I have a user object and I would like to retrive the
user object value i.e. fullName and display it on my
JSP page. How do I do that? I will have a collections
of users and store them in a Hashtable eventually and
retrieve user information associated to the user. But,
I would like to know how to achieve my initial attempt
above. Please help!!!!
Thank you,
Lee
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>