struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Jackson" <>
Subject Struts2: Create instance from struts form
Date Mon, 10 Sep 2007 04:55:15 GMT
Dear all,

I'm trying to create an instance from struts form as such:
<s:textfield name="" label="%{getText('name')}" />

I am expecting that the member instance is created by the form so I
can use it in Action as such:

private Member member;
	private String name;
	public String create() throws Exception
		logger.debug("Inside create");"Member name = " + member.getName());
		return SUCCESS;

	public Member getMember()
		return member;

	public void setMember(Member member)
		this.member = member;

I already have the member configured in spring as such:
    <bean id="member" class="com.taxandtech.projexion.model.Member"

    <bean id="memberAction"
class="com.taxandtech.projexion.web.MemberAction" scope="prototype">
    	<property name="member" ref="member"/>

But still the member can not be called from struts2 action. Is this
possible to do in struts2? If it does, can somebody help me giving me
hints on what I have missed.

Thanks in advance

It's not just about coding, it's a matter of fulfilling your core being

YM!: thejavafreak

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message