The bean property however is getting printed when jsp tags are used as
shown below. But html:text tag doesnt populate the value.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<jsp:useBean id='privacyPrefForm'
class='com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean'
scope='request'>
<jsp:setProperty name="privacyPrefForm" property="*" />
</jsp:useBean>
<html:html>
<html:form action="/Control.do?body=privacysecur_set_privacy_pref"
method="post"
name="privacyPrefForm" type="
com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean">
<input type="text" name="firstname" value="<jsp:getProperty name=
"privacyPrefForm" property="strFirstName"/>"/>
<html:text property="strFirstName"/>
<html:submit>submit</html:submit>
</html:form>
</html:html>


On 1/28/06, Karthik Manimaran <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Even after giving the fully qualified class name it doesn't work.
>
> Thanks and regards,
> Karthik.
>
>
>  On 1/28/06, Debendra Barik <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> > its appearing that you are using the type attribute inside the
> > <html:form> tag, its ok but you have to give fully qualified class name of
> > the ActionForm which you are using in the form-bean section of your
> > struts-config.xml.
> > that is type="com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean"
> > Note: type attribute is optional so you can omit it if you want.
> > Try it, i think your problem will be solved. see i have changed your
> > code.
> > -----
> > <%@ page language="java" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > <html:form action="/Control.do?body=privacysecur_set_privacy_pref"
> > method="post"
> > name="privacyPrefForm" type="
> > com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean">
> > <html:text property="strFirstName"/>
> > <html:submit>
> > submit
> > </html:submit>
> > </html:form>
> >
> > PrivacyPreferencesBean.java
> > --------------------------------------------
> > *
> >
> > public* *class* PrivacyPreferencesBean *extends* ActionForm {*
> > **private* String strFirstName;*
> > **public String getStrFirstName() {
> > return strFirstName;
> > }
> > **public void setStrFirstName(String string) {
> > strFirstName = string;
> > }
> > **}*
> >
> > *Entries in Struts-config.xml*
> >
> > <form-bean name="privacyPrefForm" type="
> > com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean">
> > </form-bean>
> >
> > <action path="/Control" type="com.bofa.ecomm.snf.web.global.Control"
> > name="privacyPrefForm" scope="request" validate="true">
> >   <forward name="success" path="/jsp/global/def.jsp"/>
> > </action>
> >
> > Let me know you if find your solution or not.
> > Thanks,
> > Debendra.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>

Reply via email to