Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » tomCat Does not recognize my servelt
tomCat Does not recognize my servelt [message #209319] Sun, 02 March 2008 21:07 Go to next message
Eclipse User
Originally posted by: Ash_b123.yahoo.com

Hello,

I added the following to Web.xml in the sample application that comes with
tomcat.

<servlet>
<servlet-name>TestDBTimeExample</servlet-name>
<servlet-class>TestDBTimeExample</servlet-class>
</servlet>

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

I did add the class file under web-inf/classes

But tomcat does not recognize my servlet "TestDBTimeExample "
Any help will be appreciated.
Ash
Re: tomCat Does not recognize my servelt [message #209360 is a reply to message #209319] Mon, 03 March 2008 15:20 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Ash wrote:
> Hello,
>
> I added the following to Web.xml in the sample application that comes
> with tomcat.
>
> <servlet>
> <servlet-name>TestDBTimeExample</servlet-name>
> <servlet-class>TestDBTimeExample</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>TestDBTimeExample</servlet-name>
> <url-pattern>/servlet/TestDBTimeExample</url-pattern>
> </servlet-mapping>
>
> I did add the class file under web-inf/classes
>
> But tomcat does not recognize my servlet "TestDBTimeExample "
> Any help will be appreciated.
> Ash
>

There is not enough info to make much of a guess as to what is going
wrong. For a first guess, I will assume you are running Tomcat in
Eclipse with a default configuration. As a result, you will not see the
the example webapp running in this Tomcat configuration for the
reasons explained in this[1] question in the Tomcat FAQ.

You might think about putting WTP to better use by creating your own
Dynamic Web Project and use it for your experiments, assuming you
haven't already. You can use the Servlet Wizard to create the servlet
and update the web.xml to simplify the process. After creating and
editing your servlet, you can right-click in the editor for the servlet
and execute Run As -> Run on Server to run it.

Cheers,
Larry

[1]
http://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_can.27t_I_access_ the_standard_Web_applications_in_my_Tomcat_server.3F
Previous Topic:WTP Validation
Next Topic:What is "Location" field in Server Properties
Goto Forum:
  


Current Time: Mon Sep 22 06:17:49 GMT 2014

Powered by FUDForum. Page generated in 0.01627 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software