actually, my reply was a little hasty...on a closer look I'm little confused
at what you want...but here's my best guess.

If you really want to invoke the action associated with
"genTklsDailyForm.do" then the action of your form must not be
action="tklsDaily.do", but rather action="/genTklsDailyForm.do" (take note
of the slash).

Then your action-mapping should be:

<action-mappings>
    <action
      path="/genTklsDailyForm"
      name="tklsDailyForm"
      type="com.blah.TicketlessDailyReportFormAction"
      unknown="false">
      <forward
        name="success"
        path="/jsp/tklsDailyForm.jsp"
        redirect="false" />
    </action>

...

</action-mapping>


This may not be exactly what you want, but it should work... I would
recomend taking a closer look at how to specify an action in your
struts-config.xml file....you may want to specify the scope...

Hope this helps,

Troy

----- Original Message -----
From: "Paul Holser" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 12:11 PM
Subject: not finding property on a form bean


new to struts, bear with me...8^)

i'm having difficulty making a particular form bean's properties available
to a JSP.

scenario:

...requesting genTklsDailyForm.do
...the TicketlessDailyReportFormAction puts a
com.blah.TicketlessDailyReportForm
bean into request scope
...then forwards to /jsp/tklsDailyForm.jsp
...error is: No getter method available for property selectedDateRange for
bean
under name org.apache.struts.taglib.html.BEAN

any hints?

my JSP:

<%@ page language="java" %>
<%@ 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:html>
<head>
<title>Commissions: Ticketless Daily Report Form</title>
</head>
<body>
<html:form method="post" action="tklsDaily.do">
  <html:select property="selectedDateRange" size="5">
    <html:options property="dateRanges" />
  </html:select>
</html:form>
</body>
</html:html>

TicketlessDailyReportForm has these methods:

public String getSelectedDateRange()
public void setSelectedDateRange(String selectedDateRange)
public String[] getDateRanges()

relevant synopsis of my struts-config.xml:

<struts-config>
  ...
  <form-beans>
    <form-bean
      name="tklsDailyForm"
      type="com.blah.TicketlessDailyReportForm" />
  </form-beans>
  <action-mappings>
    <action
      path="/genTklsDailyForm"
      type="com.blah.TicketlessDailyReportFormAction"
      unknown="false">
      <forward
        name="success"
        path="/jsp/tklsDailyForm.jsp"
        redirect="false" />
    </action>
    <action
      path="/tklsDaily"
      type="com.blah.TicketlessDailyReportAction"
      name="tklsDailyForm"
      scope="request"
      input="/jsp/tklsDailyForm.jsp"
      unknown="false"
      validate="true">
      <forward
        name="success"
        path="/jsp/tklsDailyReport.jsp"
        redirect="false" />
    </action>
  </action-mappings>
</struts-config>



Reply via email to