<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>


<struts-config>
  <!-- ========== Form Bean Definitions =================================== -->
  <form-beans>
    <form-bean      name="logonForm"
                    type="struts1.Logon"/>
  </form-beans>
  <!-- ========== Action Mapping Definitions ============ -->
  <action-mappings>
    <action   path="/index"
              type="index.jsp"
              name="logonForm"
              input="/index.jsp"
              scope="request">
    </action>
    <action   path="/logon"
              type="struts1.LogonAction"
              name="logonForm"
              input="/tapssearch.jsp"
              scope="request">
    </action>
  </action-mappings>
</struts-config>


"Galbreath, Mark" wrote:

> Let's see your struts-config.xml....
>
> -----Original Message-----
> From: Darren McGuinness [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 12:14 PM
>
> index.jsp doesn't access the bean ? here's my index.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 locale="true">
> <head>
>   <html:base/>
>   <title>
>     heyeh
>   </title>
> </head>
> <body>
>   <html:form action="logon.do" method="GET">
>     User Name:<html:text property="requestid"/>
>     Password: <html:text property="password"/>
>     <html:submit property="submit"/>
>   </html:form>
> </body>
> </html:html>
> ----------------------------------------------
> here's what i "want" to do....
>
> -have index.jsp with a form,
> -post it to logon.do
> -LogonAction for now just takes the form variables and puts them in the
> bean....then calls search.jsp, passing it the bean.....
>
> I carried out chucks recomendation, and now i get this:
>
> javax.servlet.ServletException: No getter method for property requestid of
> bean
> org.apache.struts.taglib.html.BEAN
>
> my Logon.java  bean is:
> -----------------------------------
> public class Logon
> {
>   private String requestId = "";
>   private String password = "";
>
>   public Logon(){}
>
>   public void setRequestId(String requestId_)
>   {
>     this.requestId = requestId_;
>   }
>   public String getRequestId()
>   {
>     return this.requestId;
>   }
>   public void setPassword(String password_)
>   {
>     this.password =
> "test";//msjava.tools.util.MSBase64Encoder.encode(password_);
>
>   }
>   public String getPassword()
>   {
>     return this.password;
>   }
> }
>
> "Galbreath, Mark" wrote:
>
> > I am guessing you are trying to get the bean in scope by directly
> accessing
> > index.jsp.  This will not associate your Logon bean with the page because
> no
> > ActionMapping has yet occured (you have not invoked a path and associated
> > bean in strutsconfig yet).  Try having the initial URL go to index.html
> and
> > redirect the user (using a META tag in the <head> to /do/index.jsp.  Your
> > Logon bean will then be associated with index.jsp via strutsconfig.
> >
> > Mark
> >
> > -----Original Message-----
> > From: Darren McGuinness [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 19, 2002 11:30 AM
> > To: Struts Users Mailing List
> > Subject: javax.servlet.ServletException: Cannot retrieve definition for
> > form bean Logon
> >
> > I'm trying to set up a basic program to perform a logon action...I get
> said
> > error:
> >
> > javax.servlet.ServletException: Cannot retrieve definition for form bean
> > Logon
> >
> > the line it falls over on is in index.jsp:
> >   <html:form action="logon.do" method="GET">
> >
> > Am using JBuilder v6, with struts 1.0 and tomcat 4.0
> >
> > Any help appreciated!
> >
> > my struts-config is:
> >
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <!DOCTYPE struts-config PUBLIC
> >           "-//Apache Software Foundation//DTD Struts Configuration
> 1.0//EN"
> >           "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> > <struts-config>
> >   <!-- ========== Form Bean Definitions
> ===================================
> > -->
> >   <form-beans>
> >     <form-bean      name="logonForm"
> >                             type="Logon"/>
> >   </form-beans>
> >   <!-- ========== Action Mapping Definitions ============ -->
> >   <global-forwards>
> >     <forward name="loggedon" path="/tapssearch.jsp"/>
> >   </global-forwards
> >   >
> >   <action-mappings>
> >     <action   path="/logon"
> >               type="LogonAction"
> >               name="logonForm"
> >               input="/tapssearch.jsp"
> >               scope="request">
> >     </action>
> >   </action-mappings>
> > </struts-config>
> >
> > my web.xml is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app>
> >   <servlet>
> >     <servlet-name>action</servlet-name>
> >     <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> >     <init-param>
> >       <param-name>debug</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>config</param-name>
> >       <param-value>/WEB-INF/struts-config.xml</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>application</param-name>
> >       <param-value>ApplicationResources</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>detail</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>validate</param-name>
> >       <param-value>true</param-value>
> >     </init-param>
> >     <load-on-startup>2</load-on-startup>
> >   </servlet>
> >   <servlet>
> >     <servlet-name>debugjsp</servlet-name>
> >     <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> >     <init-param>
> >       <param-name>classdebuginfo</param-name>
> >       <param-value>true</param-value>
> >     </init-param>
> >   </servlet>
> >   <servlet-mapping>
> >     <servlet-name>action</servlet-name>
> >     <url-pattern>*.do</url-pattern>
> >   </servlet-mapping>
> >   <servlet-mapping>
> >     <servlet-name>debugjsp</servlet-name>
> >     <url-pattern>*.jsp</url-pattern>
> >   </servlet-mapping>
> >   <welcome-file-list>
> >     <welcome-file>index.jsp</welcome-file>
> >   </welcome-file-list>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-form.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-form.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
> >   </taglib>
> > </web-app>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to