action mapping difficulties

2001-07-24 Thread Sorenson, Alexander

I am getting a compilation error on my jsp, which seems to indicate a
problem with the action mappings.  One jsp, the custLogin.jsp compiles fine,
whereas the custJoin.jsp throws this exception compiling
javax.servlet.ServletException: No getter method for property
sFirstName of bean org.apache.struts.taglib.html.BEAN . 
I do have all of the getters and setters in the customerJoinForm. The action
mappings for these two forms seem to be consistent.  The relevant code:

custJoin.jsp:
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
...
html:form action=/custjoin.do
...
First Name:
 td align=left
  html:text property=sFirstName size=16 maxlength=50//td
...
/html:form

custLogin.jsp:
...
html:form action=/custlogin.do
...

struts-config.xml:

form-beans
  !-- Customer join form bean --
form-bean  name=customerJoinForm
type=com.bmp.action.CustomerJoinForm/

  !-- Customer login form bean --
form-bean  name=customerLoginForm
type=com.bmp.action.CustomerLoginForm/

/form-beans

global-forwards
forward   name=custjoin  path=/custJoin.jsp/
forward   name=custlogin path=/custLogin.jsp/
/global-forwards

action-mappings
  !-- Process a customer join --
actionpath=/custjoin
   type=com.bmp.action.CustomerJoinAction
   name=customerJoinForm
   scope=request
   input=/custJoin.jsp
   validate=true
forward name=success path=/custAccount.jsp /
forward name=failure path=/error.jsp /
/action

  !-- Process a user logon --
actionpath=/custlogin
   type=com.bmp.action.CustomerLoginAction
   name=customerLoginForm
   scope=request
   input=/custLogin.jsp
   validate=true
forward name=success path=/custAccount.jsp /
forward name=failure path=/custLogin.jsp /
/action

/action-mappings

Any ideas what's going on here?  I am using Tomcat3.2.2, Struts 1.0 and
Apache1.3.20.

Thanks,
Alex



Re: action mapping difficulties

2001-07-24 Thread Rama Krishna

if you have a property with sFirstName then your getter methos should be
getSFirstName().
if this doesn't work try changing your sFirstName to something else in lower
case. eg: abc and getter will be getAbc();

hope this helps,
rama.



- Original Message -
From: Sorenson, Alexander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:08 AM
Subject: action mapping difficulties


 I am getting a compilation error on my jsp, which seems to indicate a
 problem with the action mappings.  One jsp, the custLogin.jsp compiles
fine,
 whereas the custJoin.jsp throws this exception compiling
 javax.servlet.ServletException: No getter method for property
 sFirstName of bean org.apache.struts.taglib.html.BEAN .
 I do have all of the getters and setters in the customerJoinForm. The
action
 mappings for these two forms seem to be consistent.  The relevant code:

 custJoin.jsp:
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 ...
 html:form action=/custjoin.do
 ...
 First Name:
  td align=left
   html:text property=sFirstName size=16 maxlength=50//td
 ...
 /html:form

 custLogin.jsp:
 ...
 html:form action=/custlogin.do
 ...

 struts-config.xml:

 form-beans
   !-- Customer join form bean --
 form-bean  name=customerJoinForm
 type=com.bmp.action.CustomerJoinForm/

   !-- Customer login form bean --
 form-bean  name=customerLoginForm
 type=com.bmp.action.CustomerLoginForm/

 /form-beans

 global-forwards
 forward   name=custjoin  path=/custJoin.jsp/
 forward   name=custlogin path=/custLogin.jsp/
 /global-forwards

 action-mappings
   !-- Process a customer join --
 actionpath=/custjoin
type=com.bmp.action.CustomerJoinAction
name=customerJoinForm
scope=request
input=/custJoin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/error.jsp /
 /action

   !-- Process a user logon --
 actionpath=/custlogin
type=com.bmp.action.CustomerLoginAction
name=customerLoginForm
scope=request
input=/custLogin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/custLogin.jsp /
 /action

 /action-mappings

 Any ideas what's going on here?  I am using Tomcat3.2.2, Struts 1.0 and
 Apache1.3.20.

 Thanks,
 Alex




RE: action mapping difficulties

2001-07-24 Thread Sorenson, Alexander

 The getters (and setters) were of the form getSFirstName(), but that wasn't
working.  I changed them to getStFirstName() and it got past that (I still
need to change all of the other getSXXX() methods, but it looks like that
may fix the problem.
Thanks.


-Original Message-
From: Rama Krishna
To: [EMAIL PROTECTED]
Sent: 7/24/01 2:39 PM
Subject: Re: action mapping difficulties

if you have a property with sFirstName then your getter methos should
be
getSFirstName().
if this doesn't work try changing your sFirstName to something else in
lower
case. eg: abc and getter will be getAbc();

hope this helps,
rama.



- Original Message -
From: Sorenson, Alexander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:08 AM
Subject: action mapping difficulties


 I am getting a compilation error on my jsp, which seems to indicate a
 problem with the action mappings.  One jsp, the custLogin.jsp compiles
fine,
 whereas the custJoin.jsp throws this exception compiling
 javax.servlet.ServletException: No getter method for property
 sFirstName of bean org.apache.struts.taglib.html.BEAN .
 I do have all of the getters and setters in the customerJoinForm. The
action
 mappings for these two forms seem to be consistent.  The relevant
code:

 custJoin.jsp:
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 ...
 html:form action=/custjoin.do
 ...
 First Name:
  td align=left
   html:text property=sFirstName size=16 maxlength=50//td
 ...
 /html:form

 custLogin.jsp:
 ...
 html:form action=/custlogin.do
 ...

 struts-config.xml:

 form-beans
   !-- Customer join form bean --
 form-bean  name=customerJoinForm
 type=com.bmp.action.CustomerJoinForm/

   !-- Customer login form bean --
 form-bean  name=customerLoginForm
 type=com.bmp.action.CustomerLoginForm/

 /form-beans

 global-forwards
 forward   name=custjoin  path=/custJoin.jsp/
 forward   name=custlogin path=/custLogin.jsp/
 /global-forwards

 action-mappings
   !-- Process a customer join --
 actionpath=/custjoin
type=com.bmp.action.CustomerJoinAction
name=customerJoinForm
scope=request
input=/custJoin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/error.jsp /
 /action

   !-- Process a user logon --
 actionpath=/custlogin
type=com.bmp.action.CustomerLoginAction
name=customerLoginForm
scope=request
input=/custLogin.jsp
validate=true
 forward name=success path=/custAccount.jsp /
 forward name=failure path=/custLogin.jsp /
 /action

 /action-mappings

 Any ideas what's going on here?  I am using Tomcat3.2.2, Struts 1.0
and
 Apache1.3.20.

 Thanks,
 Alex