Quantcast

Http-status 500 error in Tomcat 4.1

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Http-status 500 error in Tomcat 4.1

subi-2
Hello All,

I am using Tomcat 4.1. I just started working in it,
 
so this asking may be childish, if so, pls don't
mistake me.

Here is my webapp structure:

1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
                       -----here i have my servlet classes
2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
                        -----here i have a sample.htmfile
3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
                       -----here is the web.xml resides

my web.xml entry is like this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
        <servlet>
          <servlet-name>TestServlet</servlet-name>
          <servlet-class>TestServlet</servlet-class>
        </servlet>
 
        <servlet-mapping>
          <servlet-name>TestServlet</servlet-name>
         
<url-pattern>/TestServlet</url-pattern>
        </servlet-mapping>
</web-app>

------------------
the sample.htm has the following entries:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body>
<p><font color="#000099">Hello, Welcome!</font> </p>
<form
action="http:\\localhost:8080\testapp\TestServlet" method="post"
name="form1" target="_self">
  <input type="submit" name="Submit" value="Click Me">
</form>
<p>&nbsp; </p>
</body>
</html>

---------------

Here is what I done:
1. I started the Tomcat server
2. opened the IE browser and "http://localhost:8080/testapp/jsp/sample.htm"
3. clicked the button which gives the error "HTTP Status 500 -
TestServlet is not found"

Please tell me what is the problem?


--
ilu,
subi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Http-status 500 error in Tomcat 4.1

Rakesh-3
Hi subi,

you hav did servlet deployment almost correct but in url-pattern you hav
made a little mistake.Change it to:

<servlet-mapping>
     <servlet-name>TestServlet</servlet-name>
     <url-pattern>/servlet/TestServlet</url-pattern>
</servlet-mapping>

Try it and reply.

----- Original Message -----
From: "subi" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, August 18, 2005 11:28 AM
Subject: Http-status 500 error in Tomcat 4.1


Hello All,

I am using Tomcat 4.1. I just started working in it,

so this asking may be childish, if so, pls don't
mistake me.

Here is my webapp structure:

1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
                       -----here i have my servlet classes
2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
                        -----here i have a sample.htmfile
3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
                       -----here is the web.xml resides

my web.xml entry is like this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
          <servlet-name>TestServlet</servlet-name>
          <servlet-class>TestServlet</servlet-class>
</servlet>

<servlet-mapping>
          <servlet-name>TestServlet</servlet-name>

<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
</web-app>

------------------
the sample.htm has the following entries:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body>
<p><font color="#000099">Hello, Welcome!</font> </p>
<form
action="http:\\localhost:8080\testapp\TestServlet" method="post"
name="form1" target="_self">
  <input type="submit" name="Submit" value="Click Me">
</form>
<p>&nbsp; </p>
</body>
</html>

---------------

Here is what I done:
1. I started the Tomcat server
2. opened the IE browser and "http://localhost:8080/testapp/jsp/sample.htm"
3. clicked the button which gives the error "HTTP Status 500 -
TestServlet is not found"

Please tell me what is the problem?


--
ilu,
subi


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Http-status 500 error in Tomcat 4.1

Raghupathy,Gurumoorthy
In reply to this post by subi-2
Well I can also think of one more issue ...
Installing tomcat in a directory with spaces in them ,,,,


I would rather suggest that you install tomcat in directory without spaces (
not C:\Program Files\Apache Group\Tomcat 4.1\ )
c:\Server\tomcat4.1\ will be a good option. I had loads of problems when I
installed tomcat to C:\Program Files\Apache Group\Tomcat 4.1\

Regards
Guru

-----Original Message-----
From: Rakesh [mailto:[hidden email]]
Sent: 18 August 2005 10:01
To: Tomcat Users List
Subject: Re: Http-status 500 error in Tomcat 4.1


Hi subi,

you hav did servlet deployment almost correct but in url-pattern you hav
made a little mistake.Change it to:

<servlet-mapping>
     <servlet-name>TestServlet</servlet-name>
     <url-pattern>/servlet/TestServlet</url-pattern>
</servlet-mapping>

Try it and reply.

----- Original Message -----
From: "subi" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, August 18, 2005 11:28 AM
Subject: Http-status 500 error in Tomcat 4.1


Hello All,

I am using Tomcat 4.1. I just started working in it,

so this asking may be childish, if so, pls don't
mistake me.

Here is my webapp structure:

1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
                       -----here i have my servlet classes
2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
                        -----here i have a sample.htmfile
3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
                       -----here is the web.xml resides

my web.xml entry is like this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
          <servlet-name>TestServlet</servlet-name>
          <servlet-class>TestServlet</servlet-class>
</servlet>

<servlet-mapping>
          <servlet-name>TestServlet</servlet-name>

<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
</web-app>

------------------
the sample.htm has the following entries:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body>
<p><font color="#000099">Hello, Welcome!</font> </p>
<form
action="http:\\localhost:8080\testapp\TestServlet" method="post"
name="form1" target="_self">
  <input type="submit" name="Submit" value="Click Me">
</form>
<p>&nbsp; </p>
</body>
</html>

---------------

Here is what I done:
1. I started the Tomcat server
2. opened the IE browser and "http://localhost:8080/testapp/jsp/sample.htm"
3. clicked the button which gives the error "HTTP Status 500 -
TestServlet is not found"

Please tell me what is the problem?


--
ilu,
subi


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Http-status 500 error in Tomcat 4.1

Mark Thomas-2
In reply to this post by subi-2
Just guessing, but are your servlets in a package? Packageless classes
do not work. See http://jakarta.apache.org/tomcat/faq/classnotfound.html

Mark

subi wrote:

> Hello All,
>
> I am using Tomcat 4.1. I just started working in it,
>  
> so this asking may be childish, if so, pls don't
> mistake me.
>
> Here is my webapp structure:
>
> 1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
>                        -----here i have my servlet classes
> 2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
>                         -----here i have a sample.htmfile
> 3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
>                        -----here is the web.xml resides
>
> my web.xml entry is like this:
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
> Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <servlet>
>           <servlet-name>TestServlet</servlet-name>
>           <servlet-class>TestServlet</servlet-class>
> </servlet>
>  
> <servlet-mapping>
>           <servlet-name>TestServlet</servlet-name>
>          
> <url-pattern>/TestServlet</url-pattern>
> </servlet-mapping>
> </web-app>
>
> ------------------
> the sample.htm has the following entries:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> </head>
>
> <body>
> <p><font color="#000099">Hello, Welcome!</font> </p>
> <form
> action="http:\\localhost:8080\testapp\TestServlet" method="post"
> name="form1" target="_self">
>   <input type="submit" name="Submit" value="Click Me">
> </form>
> <p>&nbsp; </p>
> </body>
> </html>
>
> ---------------
>
> Here is what I done:
> 1. I started the Tomcat server
> 2. opened the IE browser and "http://localhost:8080/testapp/jsp/sample.htm"
> 3. clicked the button which gives the error "HTTP Status 500 -
> TestServlet is not found"
>
> Please tell me what is the problem?
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Http-status 500 error in Tomcat 4.1

Raghupathy,Gurumoorthy
In reply to this post by subi-2
Good spotted

-----Original Message-----
From: Mark Thomas [mailto:[hidden email]]
Sent: 18 August 2005 10:00
To: Tomcat Users List
Subject: Re: Http-status 500 error in Tomcat 4.1


Just guessing, but are your servlets in a package? Packageless classes
do not work. See http://jakarta.apache.org/tomcat/faq/classnotfound.html

Mark

subi wrote:

> Hello All,
>
> I am using Tomcat 4.1. I just started working in it,
>  
> so this asking may be childish, if so, pls don't
> mistake me.
>
> Here is my webapp structure:
>
> 1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
>                        -----here i have my servlet classes
> 2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
>                         -----here i have a sample.htmfile
> 3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
>                        -----here is the web.xml resides
>
> my web.xml entry is like this:
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
> Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <servlet>
>           <servlet-name>TestServlet</servlet-name>
>           <servlet-class>TestServlet</servlet-class>
> </servlet>
>  
> <servlet-mapping>
>           <servlet-name>TestServlet</servlet-name>
>          
> <url-pattern>/TestServlet</url-pattern>
> </servlet-mapping>
> </web-app>
>
> ------------------
> the sample.htm has the following entries:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> </head>
>
> <body>
> <p><font color="#000099">Hello, Welcome!</font> </p>
> <form
> action="http:\\localhost:8080\testapp\TestServlet" method="post"
> name="form1" target="_self">
>   <input type="submit" name="Submit" value="Click Me">
> </form>
> <p>&nbsp; </p>
> </body>
> </html>
>
> ---------------
>
> Here is what I done:
> 1. I started the Tomcat server
> 2. opened the IE browser and
"http://localhost:8080/testapp/jsp/sample.htm"
> 3. clicked the button which gives the error "HTTP Status 500 -
> TestServlet is not found"
>
> Please tell me what is the problem?
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Http-status 500 error in Tomcat 4.1

Litty Preeth
In reply to this post by subi-2

Hi Subi,

 
> 1. C:\Program Files\Apache Group\Tomcat
> 4.1\webapps\testapp\classes
>                        -----here i have my servlet

But ur class files shud be in :
         C:\Program Files\Apache Group\
         Tomcat4.1\webapps\testapp\WEB-INF\classes

And in ur html file ur form action shud be instead of
:

> <form
> action="http:\\localhost:8080\testapp\TestServlet"
> method="post"
> name="form1" target="_self">

It shud be :
action="http:\\localhost:8080\testapp\servlet\TestServlet"

Hope this will work ...
With Regards,
Litty Preeth



               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Http-status 500 error in Tomcat 4.1

subi-2
In reply to this post by Raghupathy,Gurumoorthy
Hello all,

I tried both the options:
1. I uninstalled the tomcat and reinstalled so that not it resides
c:\tomcat1.4
2. I tried changing my URL Patern"
<url-pattern>/servets/TestServlet</url-pattern>

Now I am able to get the html file correctly and after clicking the show
button it gives the following error:
"HTTP Status 404 - /testapp/TestServlet" ---servlet not found.


Where i went wrong? Please enlighten....

On 8/18/05, Raghupathy,Gurumoorthy <[hidden email]>
wrote:

>
> Good spotted
>
> -----Original Message-----
> From: Mark Thomas [mailto:[hidden email]]
> Sent: 18 August 2005 10:00
> To: Tomcat Users List
> Subject: Re: Http-status 500 error in Tomcat 4.1
>
>
> Just guessing, but are your servlets in a package? Packageless classes
> do not work. See http://jakarta.apache.org/tomcat/faq/classnotfound.html
>
> Mark
>
> subi wrote:
> > Hello All,
> >
> > I am using Tomcat 4.1. I just started working in it,
> >
> > so this asking may be childish, if so, pls don't
> > mistake me.
> >
> > Here is my webapp structure:
> >
> > 1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes
> > -----here i have my servlet classes
> > 2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp
> > -----here i have a sample.htmfile
> > 3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF
> > -----here is the web.xml resides
> >
> > my web.xml entry is like this:
> >
> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
> > Inc.//DTD Web Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd">
> > <web-app>
> > <servlet>
> > <servlet-name>TestServlet</servlet-name>
> > <servlet-class>TestServlet</servlet-class>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>TestServlet</servlet-name>
> >
> > <url-pattern>/TestServlet</url-pattern>
> > </servlet-mapping>
> > </web-app>
> >
> > ------------------
> > the sample.htm has the following entries:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> > Transitional//EN">
> > <html>
> > <head>
> > <title>Untitled Document</title>
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=iso-8859-1">
> > </head>
> >
> > <body>
> > <p><font color="#000099">Hello, Welcome!</font> </p>
> > <form
> > action="http:\\localhost:8080\testapp\TestServlet" method="post"
> > name="form1" target="_self">
> > <input type="submit" name="Submit" value="Click Me">
> > </form>
> > <p>&nbsp; </p>
> > </body>
> > </html>
> >
> > ---------------
> >
> > Here is what I done:
> > 1. I started the Tomcat server
> > 2. opened the IE browser and
> "http://localhost:8080/testapp/jsp/sample.htm"
> > 3. clicked the button which gives the error "HTTP Status 500 -
> > TestServlet is not found"
> >
> > Please tell me what is the problem?
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
ilu,
subi
Loading...