You probably need to set aside an hour and take a gander at the user guide: http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
You need to understand why you put these lines in your web.xml file: <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> In an MVC application, all requests go through a controller. Struts utilizes the <url-pattern> as the way to direct requests to its controller, ActionServlet. That means you invoke your actions by appending '.do' to your action paths, like so: http://yourhost/yourapp/logon.do Good luck. -- Jim Jose Casas <[EMAIL PROTECTED]> writes: > What do you mean by invoking the ActionServlet? I put it in the web.xml and > my <html:form> action looks like this > <html:form action="logon.do"> > > Also, what do you mean when you say that trying to pull up the JSP in the > browser directly won't work? How am I supposed to do it? Is there a right > way to do it? > > Thanks for helping me out. > > > this is my web.xml > > <web-app> > <servlet> > > <servlet-name>action</servlet-name> > > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> > <init-param> > <param-name>application</param-name> > > <param-value>com.walmart.telecomorder.formbeans.ApplicationResources</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>validate</param-name> > <param-value>true</param-value> > </init-param> > > <load-on-startup>1</load-on-startup> > </servlet> > > <servlet-mapping> > > <servlet-name>action</servlet-name> > <url-pattern>*.do</url-pattern> > </servlet-mapping> > > <welcome-file-list> > > <welcome-file>logon.jsp</welcome-file> > </welcome-file-list> > > <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-bean.tld</taglib-uri> > <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> > </taglib> > > </web-app> > > Jose Casas > > E-Commerce Applications > (501) 277-3112 > [EMAIL PROTECTED] > > > > > -----Original Message----- > > From: Jim Crossley [SMTP:[EMAIL PROTECTED]] > > Sent: Thursday, March 28, 2002 12:43 PM > > To: Struts Users Mailing List > > Subject: Re: error > > > > What you have looks correct to me, Jose. What are you trying to pull > > up in the browser: the JSP or the Action? The error you're getting > > makes me think you're not invoking the ActionServlet (the C in MVC) so > > it's not instantiating your formbean (the M in MVC) and making it > > available to the JSP (the V in MVC). Are you trying to pull up the > > JSP in the browser directly? That won't work. > > > > -- Jim > > > > Jose Casas <[EMAIL PROTECTED]> writes: > > > > > Jim, > > > > > > I tried changing the name to the one in the struts-config file and it > > gave > > > me this error Cannot find bean logonForm in scope null > > > > > > <bean:define id="somebean" name="logonForm" property="SelectBox1List" > > > type="java.util.ArrayList"/> > > > > > > Here's my struts-config file > > > > > > <struts-config> > > > > > > <form-beans> > > > <form-bean name="logonForm" > > > > > > type="com.walmart.telecomorder.formbeans.RelocationForm" /> > > > </form-beans> > > > > > > <action-mappings> > > > <action path="/logon" > > > > > type="com.walmart.telecomorder.formbeans.RelocationAction" > > > name="logonForm" > > > input="/f_Relocation.jsp"> > > > > > > > > > <forward name="success" path="/success.jsp" /> > > > > > > <forward name="failure" path="/failure.jsp" /> > > > > > > > > > </action> > > > </action-mappings> > > > </struts-config> > > > > > > what did i do wrong? > > > > > > Thanks for your help. > > > > > > Jose Casas > > > > > > E-Commerce Applications > > > (501) 277-3112 > > > [EMAIL PROTECTED] > > > > > > > > > > > > > -----Original Message----- > > > > From: Jim Crossley [SMTP:[EMAIL PROTECTED]] > > > > Sent: Thursday, March 28, 2002 10:02 AM > > > > To: Struts Users Mailing List > > > > Subject: Re: error > > > > > > > > Hi Jose. > > > > > > > > The "name" property should refer to an actual name, not a class. The > > > > name you should use will be the one referred to in the "name" > > > > attribute specified in the corresponding action tag in > > > > struts-config.xml. > > > > > > > > -- Jim > > > > > > > > Jose Casas <[EMAIL PROTECTED]> writes: > > > > > > > > > Does anybody know what this error means. > > > > > > > > > > Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm > > in > > > > scope > > > > > null > > > > > > > > > > THe following line seems to be causing this error. When i take it > > out > > > > of my > > > > > jsp, the jsp works fine. > > > > > > > > > > <bean:define id="somebean" > > > > > name="com.walmart.telecomorder.formbeans.RelocationForm" > > > > > property="SelectBox1List" type="java.util.ArrayList"/> > > > > > > > > > > Thanks. > > > > > > > > > > Jose Casas > > > > > > > > > > E-Commerce Applications > > > > > (501) 277-3112 > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > ********************************************************************** > > > > > This email and any files transmitted with it are confidential > > > > > and intended solely for the individual or entity to > > > > > whom they are addressed. If you have received this email > > > > > in error destroy it immediately. > > > > > > > ********************************************************************** > > > > > > > > > > -- > > > > > 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>