thanks for your reply. actually, my actions were configured ok.
when i browse the URL:
http://localhost:8080/commissions/genTklsDailyForm.do
it should invoke the action /genTklsDailyForm, which will place
a form bean named tklsDailyForm into request scope, and forward to
/jsp/tklsDailyForm.jsp. this JSP is to display a select list of date ranges.
the action tklsDaily.do is what should be invoked when the form is
submitted. i fiddled around with the action class a bit, and finally
ended up getting the error:
cant remove attribute from request scope
when org.apache.struts.taglib.html.FormTag.doEndTag() was called.
searching the archives, i discovered this is a problem with the version
of jasper used by the WebSphere test environment in my IDE
(VAJ 3.5.3), but that a possible workaround is to patch FormTag.
after patching FormTag, my page rendered the way i expected.
great list, i appreciate the response!
cheers,
p
>>> [EMAIL PROTECTED] 07/20/01 03:12PM >>>
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>