Servlet w/packages not working
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   alpesh_shah
Posted On:   Friday, June 27, 2003 09:53 AM

Hi, I have been trying to run servlets that are making use of packages to no avail. Those servlets without packages run fine. Here is the CLASSPATH definition I have put in place: CLASSPATH = .;C:Program FilesApache GroupTomcat 4.1commonlibservlet.jar;C:ProgramFilesApacheGroupTomcat4.1commonlibservlet.jar;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INFclassesmoreservlets;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INFclasses;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INF;C:Program FilesApache GroupTomcat 4.1webappsROOT I figured by including all these paths at least I would be covered. The packages directory is known as moreservlets . It is located in C:C:Program Fil   More>>

Hi,


I have been trying to run servlets that are making use of packages to no avail. Those servlets without packages run fine. Here is the CLASSPATH definition I have put in place:


CLASSPATH = .;C:Program FilesApache GroupTomcat 4.1commonlibservlet.jar;C:ProgramFilesApacheGroupTomcat4.1commonlibservlet.jar;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INFclassesmoreservlets;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INFclasses;C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INF;C:Program FilesApache GroupTomcat 4.1webappsROOT


I figured by including all these paths at least I would be covered. The packages directory is known as moreservlets . It is located in C:C:Program FilesApache GroupTomcat 4.1webappsROOTWEB-INFclasses . Within the moreservlets directory I have the HelloServlet2.class file.



I try to access this file through the URL as follows:
http://localhost:8888/servlet/moreservlets.HelloServlet2



But all I get in return is a 404 Error page.



Any suggestions as to how to fix this?



Thanks.



Alpesh

   <<Less

Re: Servlet w/packages not working

Posted By:   AlessandroA_Garbagnati  
Posted On:   Saturday, June 28, 2003 06:45 AM

Hi,

the /servlet/ mapping isn't active by default on a Tomcat 4.1.x installazion.

You must uncomment the tag inside the default web application descriptor located under the $TOMCAT_HOME/conf.
About | Sitemap | Contact