I am having two different problems with my struts configuration:

1) Actions don't seem to be handled correctly.  Anytime a submit button is
clicked (this happens on my application as well as any example applications
I have deployed) it comes back with a 404.  I assume this is the setup with
Apache / Tomcat.  I have
        "Include G:/jakarta-tomcat-3.2.2/conf/struts-tomcat-apache.conf" 
at the bottom of the httpd.conf file for apache, and in the
struts-tomcat-apache.conf file, I have the following lines:
        AddType text/jsp .jsp
        AddHandler jserv-servlet .jsp
        AddHandler jserv-servlet .do 
Is there something else I am missing?  

2) Only my simple login form jsp's compile.  My more complex forms do not
compile at all, but return with an error such as
"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 FormBean. I have checked the
configuration between the different jsps and the action mappings and they
seem consistent.  The relevant code:

custJoin.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" %>
<head>
<title>Customer Join</title>
<html:base/>
</head>
<html:errors/>
<html:form action="/custjoin.do">
  <tr>
    <th align="right">
      First Name:
    </th>
    <td align="left">
      <html:text property="sFirstName" size="16" maxlength="50"/>
    </td>
  </tr>
...
</table>
</html:form>
</body>
</html:html>

struts-config.xml:

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

<global-forwards>
        <forward   name="custjoin"                  path="/custJoin.jsp"/>
</global-forwards>

<action-mappings>
  <!-- Process a customer join -->
    <action    path="/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>
</action-mappings>


Thanks,
Alex

Reply via email to