Hello, I'm having a small problem. Here is my configuration. I'm using Windows XP. I downloaded and installed j2sdk1.4.2_03 under C:\ I then updated the path variable to point to the bin directory of the java installation. This works fine. I then installed the Tomcat 5.0 server by way of the Tomcat 5.0.exe . This worked fine and installed under C:\Program Files\Apache Software Foundation\Tomcat 5.0 Tomcat works fine and I can look at all the example jsp and servlet examples that come with Tomcat. My problem is that I can't write my own Servlets. When I import the javax.servlet. and javax.servlet.httpservlet. packages I get compilation errors siting that the packages don't exist. Do I need to update my Classpath somehow so they see the servlet and jsp packages? Thanks for any help.
Hi there, I read your post now.I have a question for you,hope you can answer it. in the post you had said that "look at all the example jsp and servlet examples that come with Tomcat". I want to know how that is done.I will explain as to what I think is the right way. In the browser you type in http://localhost:8080 then one gets the home page saying that the web server has installed. One has to scroll down as hit on the examples link,then one can see a list of files with "execute" and "source", Now we have to click on "execute" to see all the programs is it??. Let me know whether this is correct. Thanks in advance nash
The servlet libraries are not part of the SDK so if you are compiling servlets you have to include the servlet.jar file in the classpath. In Tomcat 4 it is in TOMCAT-HOME\common\lib - I don't know if Tomcat 5 uses another convention. Note that Tomcat ignores the environment CLASSPATH and has its own rules for finding class libraries. If you are going to be doing serious servlet development - learn to use ANT to control builds. Bill