as many of you may have once experienced, I'm getting errors when trying to import javax.servlet.* and such. My current classpath settings are: .;C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar; C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\jsp-api.jar as specified by: http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Set-CLASSPATH but, alas it still doesn't seem to be correct. The example servlets installed with Tomcat work fine, when I try to compile simple servelts, I get errors in the import, package javax.servlet does not exist.
Anyone been through this before, care to point me in the correct direction? Thanks!
From the page you reference Note that this all goes on one line with no spaces--it is broken here only for readability I'm slightly worried by the space in your classpath. Have you tried it woth no spaces? If that's note the problem, have you double checked that the appropriate jar files really are where you have said. Finally, did you quit and restart the command window after changing the CLASSPATH? - try
I removed the space, with no effect. The packages are in fact where I specify them. Interestingly enough, echo %CLASSPATH% returns: %CLASSPATH% so something is wrong, perhaps the system does not recognize the classpath as I have defined it?
Joined: Dec 26, 2003
Frank, Thanks for your responses. I ended up just deleting the CLASSPATH, and recreating it. After that, it seemed to work just fine. No explanation, just one of those strange windows quirks I guess. Thanks for the assist. Michael