Tomcat debug can not see servlet, jsps OK

i have got to be missing something very simple.

I have not created a new project for probably 2 years. I have been using the same project forever.

I have version 6.0.6 of the IDE
tomcat 5
my directory structure is
========================================
c:\UnitNet\pcback\
\META-INF
content.xml
\src
all my java source
\webapps
\WEB-INF
\lib
\classes
web.xml
index.jsp
===================================
webapps is my docroot

when i start the debugger, tomcat starts and i can display/execute/debug index.jsp

but when i try to display http://localhost:8080/servlet/ProfileServlet
i get HTTP Status 404 - Servlet ProfileServlet is not available

the servlet is in the classes directory in the correct package.

in my java EE build Settings, i have "Create web module exploded directory" select and it is set to C:\UnitNet\pcback\webapps

I have to be missing something basic.

thanks for any help

my web.xml

ProfileServlet com.unitnet.servlet.ProfileServlet 1 ProfileServlet /servlet/ProfileServlet DB Connection jdbc/pcBack javax.sql.DataSource Container ]]>

2 comments
Avatar
Nikolay Chashnikov

Hello Randy,

Is ProfileServlet.class copied to \webapps\WEB-INF\classes?

i have got to be missing something very simple.

I have not created a new project for probably 2 years. I have been
using the same project forever.

I have version 6.0.6 of the IDE
tomcat 5
my directory structure is
========================================
c:\UnitNet\pcback\
\META-INF
content.xml
\src
all my java source
\webapps
\WEB-INF
\lib
\classes
web.xml
index.jsp
===================================
webapps is my docroot

when i start the debugger, tomcat starts and i can
display/execute/debug index.jsp

but when i try to display http://localhost:8080/servlet/ProfileServlet
i get HTTP Status 404 - Servlet ProfileServlet is not available

the servlet is in the classes directory in the correct package.

in my java EE build Settings, i have "Create web module exploded
directory" select and it is set to C:\UnitNet\pcback\webapps

I have to be missing something basic.

thanks for any help

my web.xml

<web-app>

<servlet>
<servlet-name>ProfileServlet</servlet-name>

<servlet-class>com.unitnet.servlet.ProfileServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ProfileServlet</servlet-name>
<url-pattern>/servlet/ProfileServlet</url-pattern>
</servlet-mapping>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/pcBack</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>



0

yes this file exisits
C:\UnitNet\pcback\webapps\WEB-INF\classes\com\unitnet\servlet\ProfileServlet.class

and actually the IDE verifies it exists when i edit the web.xml. Cause i misspelled it initially when building the web.xml and it gave me an error

thanks
Randy

0

Please sign in to leave a comment.