Hi, It is because web apps by default map requests to the root context to index.html and index.jsp. You can change this by adding a welcome-file-list entry in your deployment descriptor. If you use a servlet 2.4 compliant servlet container you can add a servlet to the welcome-file-list unfortunately prior to this you can only specify jsp's or html pages.
I hope this helps. Regards Jim. ----- Original Message ----- From: "Caroline Jen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 09, 2003 9:36 PM Subject: Confused by index.jsp, welcome.jsp, and logon.jsp > Hi, I am new to Struts. I have read the logon example > presented in Husted's "Struts in Action" and deployed > the logon.war on my machine. Everything works exactly > like what says in the book. > > However, I am confused -- > My question is why I entered > http://localhost:8080/logon > and the welcome.jsp is invoked and displayed in the > browser? > > In my mind, http://localhost:8080/logon tells to look > for logon.do. According to the action mappings: > > <action > path="/Logon" > > type="org.apache.struts.actions.ForwardAction" > parameter="/pages/Logon.jsp"/> > > the Logon.jsp should be invoked. Could anybody shed > some light on it? > > I can understand if I enter > http://localhost:8080/logon/index.jsp > the welcome.jsp is invoked because the logic.forward > tag in the index.jsp: > > <%@ taglib uri="/tags/struts-logic" prefix="logic" %> > <logic:forward name="welcome"/> > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.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]