I also am having trouble setting up Tomcat to run servlets, although I have
been running JSP for some time.

My configuration is the following:
In server.xml, I have
        <Context path="/trial"
                docBase="webapps/trial"
                debug="0"
                reloadable="true" >
        </Context>

In web.xml, I have
        <servlet>
        <servlet-name>hello</servlet-name>
        <servlet-class>trial.control.HelloClientServlet</servlet-class>
        </servlet>

and

        <servlet-mapping>
        <servlet-name>hello</servlet-name>
        <url-pattern>/hello/*</url-pattern>
        </servlet-mapping>

I have HelloClientServlet.class in
TOMCAT_HOME/webapps/trial/WEB-INF/classes/trial/control,

I invoke the servlet from my browser using
        <machine:port>/trial/hello

And I get a page not found error.

Can anyone tell me what I am doing wrong?

Joel

-----Original Message-----
From: Pierre-Yves Saumont [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 9:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Problems Setting up Tomcat to run Servlets


> HTTP method GET is not supported by this URL

This error message says it all : the URL is accessible but does not respond
to GET requests. If your servlet doesn't include a doGet method, you
shouldn't be using GET to access it. Try POST ! (unless your servlet doesn't
include any doPost method neither ;-)

Pierre-Yves



-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de Paul
Meshkovsky
Envoy� : mercredi 2 mai 2001 18:17
� : [EMAIL PROTECTED]
Objet : Re: Problems Setting up Tomcat to run Servlets


Hi all I still have problems running Servlets.
 This is what I did
   The file which I am trying to run works in Jrun
 question #1
  I put my HTML file in TOMCAT_HOME/webapps/examples/my.html in html file I
say
<form action="../servlet/MyServlet" method = get>
  Is the path correct ?

  question #2 I put my MyServlet.class file in
TOCMAT_HOME/webapps/examples/WEB-inf/classes/MyServlet.class is it correct?

So I get The page cannot be found error in my bowser
And in TOMCAT LOG I get
2001-05-02 11:09:54 - Ctx( /examples ): 400 R( /examples +
/servlet/PaulsLoan +
null) HTTP method GET is not supported by this URL
Any Ideas?

Thanx





> -----Original Message-----
> From: Joy Lott [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 8:56 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Problems  Setting up Tomcat to run Servlets
>
> [EMAIL PROTECTED] wrote:
> >
> > Hi ,
> >  I have installed tomcat and set it up I am only able to run JSP pages
but
> not
> > the Servlet part for some reason.
> > Can anybody tell me what I need to do.
> >
> > Thank you
> >
> > Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>  I am sorry; I have alot going on this morning, but the servlet class
> files need to go in /examples/WEB-INF/classes.
>   Hope this helps!
>   Joy

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to