Sorry, I don't see anything unusual. I suspect on the context though. I have never 
used the ROOT directory for storing my apps so I cannot say much about it. Why don't 
you use the weapps/ directory directly, like the /examples  and /tomcat-docs contexts.

Any other ideas? 

Jose Alfonso

> Hi, 
> I tried with the syntax you gave and also with the
> syntax below. It gives the same error. Where should I
> put my servlet class files. I have copied them under
> the directory
> BookSource\web-inf\classes\BookStore\DispatchServlet.class.
> Is this right? 
> 
> <% if(request.getMethod().equals("POST")) %>
>    <jsp:forward
> page="web-inf/classes/BookStore/DispatchServlet"/>
> 
> Thanks in advance.
> Nalini
> 
> 
> --- Alfonso Martinez <[EMAIL PROTECTED]>
> wrote:
> > I am not really sure about your form sintax:
> > 
> > <FORM method='POST' onsubmit=<jsp:forward
> > page='DispatchServlet'/> >
> > ...
> > 
> > try 
> > 
> > <FORM method='POST' action="/DispatchServlet">
> > ...
> > 
> > I hope this helps.
> > 
> > 
> > Jose Alfonso
> > 
> > 
> > On Thu, Oct 31, 2002 at 09:16:19AM -0800, Nalini
> > wrote:
> > > Hi,
> > > 
> > > I am writing my first JSP, servlets application
> > using
> > > Tomcat 4.1 server. I have a Win 98 machine.
> > > I created a directory called "BookSource" under
> > ROOT
> > > under webapps.
> > > This is my directory structure.
> > > C:\jakarta-tomcat\webapps\ROOT\BookSource
> > > 
> > > I have web-inf and login.jsp under this directory.
> > > Under web-inf I have classes sub-directory and
> > > web.xml.
> > > I have DispatchServlet.class(under
> > package/directory
> > > BookStore) under the classes sub-directory.
> > > 
> > > My web.xml is 
> > > 
> > > 
> > > <?xml version="1.0" encoding="ISO-8859-1" ?> 
> > > <!DOCTYPE web-app (View Source for full
> > doctype...)> 
> > > <web-app> 
> > > <servlet> 
> > > <servlet-name>DispatchServlet</servlet-name> 
> > > <description>This servlet plays the "controller"
> > role
> > > in the MVC architecture used in this application.
> > It
> > > is generally mapped to the ".do" filename
> > extension
> > > with a servlet-mapping element, and all form
> > submits
> > > in the app will be submitted to a request URI like
> > > "saveCustomer.do", which will therefore be mapped
> > to
> > > this servlet. The initialization parameter namess
> > for
> > > this servlet are the "servlet path" that will be
> > > received by this servlet (after the filename
> > extension
> > > is removed). The corresponding value is the name
> > of
> > > the action class that will be used to process this
> > > request.</description> 
> > >
> >
> <servlet-class>BookStore.DispatchServlet</servlet-class>
> > > 
> > >  <!-- 
> > >  Load this servlet at server startup time 
> > > --> 
> > > <load-on-startup>5</load-on-startup> 
> > > </servlet> 
> > > <session-config> 
> > > <session-timeout>30</session-timeout> 
> > > <!-- 
> > >  30 minutes 
> > > --> 
> > > </session-config> 
> > > </web-app>
> > > 
> > > 
> > > and my login.jsp is 
> > > 
> > > 
> > > <HTML>
> > > <HEAD>
> > > <TITLE>Book Store Login Page</TITLE>
> > > </HEAD>
> > > <BODY>
> > > <FORM method='POST' onsubmit=<jsp:forward
> > > page='DispatchServlet'/> >
> > > <INPUT TYPE="submit" VALUE="Login">
> > > </FORM>
> > > </BODY>
> > > </HTML>
> > > 
> > > I am getting the error when I try to load the page
> > 
> > > http://localhost:8080/BookSource/login.jsp
> > > 
> > > HTTP Status 404 - /BookSource/DispatchServlet
> > > 
> > >
> >
> --------------------------------------------------------------------------------
> > > 
> > > type Status report
> > > 
> > > message /BookSource/DispatchServlet
> > > 
> > > description The requested resource
> > > (/BookSource/DispatchServlet) is not available.
> > > 
> > > 
> > >
> >
> --------------------------------------------------------------------------------
> > > 
> > > Apache Tomcat/4.1.12-LE-jdk14
> > > 
> > > 
> > > Could someone help me fix this problem. thanks in
> > > advance.
> > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do you Yahoo!?
> > > HotJobs - Search new jobs daily now
> > > http://hotjobs.yahoo.com/
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:tomcat-user-help@;jakarta.apache.org>
> > > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to