I'm hoping that was a copy 'n paste error, because you're web.xml is hosed.
-- James Mitchell Web Developer/Struts Evangelist http://www.apache.org/struts/ > -----Original Message----- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 27, 2003 12:02 PM > To: [EMAIL PROTECTED] > Subject: Stuck With My First Struts Exercise -- Tomcat Cannot > Find The MessageResources.properties File > > > I am trying to run my first Struts -- using the > tutorial "Login" example at > http://www.javaranch.com/newsletter/Mar2002/newslettermar2002. > jsp#struts > > There is a MessageResources.properties file that > allows for all strings displayed in an application to > be defined. Nonetheless, After I > entered http://localhost:8080/struts/jsp/LoginView.jsp > > in the browser address bar, I got HTTP Status 500 > --missing key title.login. However, "title.login" is > in the MessageResources.properties and is not empty. > > Therefore, I hard coded the text of the key > title.login in the LoginView.jsp and re-ran this Login > example. I got another HTTP Status 500. This time, > the error message said that the next key > "heading.login" in the MessageResources.properties is > missing. Henceforth, I concluded that the Tomcat > cannot find the MessageResources.properties file. > > I have checked MessageResources.properties: > > 1. name of the file: spelling is correct > 2. location of the file: it is in the directory > together with all compiled servlet class files; > i.e. > c:\tomcat\webapps\struts\WEB-INF\classes\test\struts > 3. type of the file: the Windows Explorer shows the > type of the MessageResources.properties file is a > PROPERTIES File > 4. mapping of the MessageResources.properties file: > it does not seem to be wrong. > > I need your experience in telling what else could go > wrong. Please help. > > The contents of the web.xml file that is in the > c:\tomcat\webapps\struts\WEB-INF directory is shown > below: > > > code: > ------------------------------------------------------- > > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, > Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> > <web-app> > <!-- Action Servlet Configuration --> > <servlet> > <servlet-name>action</servlet-name> > > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> > <init-param> > <param-name>application</param-name> > > <param-value>test.struts.MessageResources</param-value> > </init-param> > <init-param> > <param-name>mapping</param-name> > > <param-value>org.apache.struts.action.RequestActionMapping</pa > ram-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>debug</param-name> > <param-value>2</param-value> > </init-param> > <load-on-startup>2</load-on-startup> > </servlet> > <!-- Action Servlet Mapping --> > <servlet-mapping> > <servlet-name>action</servlet-name> > <url-pattern>*.do</url-pattern> > </servlet-mapping> > <!-- Struts Tag Library Descriptors --> > <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-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> > > ------------------------------------------------------- > > . > > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

