• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error while working with tomcat

 
rajaraman navaneethan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
i have just started using tomcat.if i try to compile my servlet i am getting errors.it says that it cannot find the package javax.servlet.* and related errors.
please guide me as how i should set the environment and avoid these errors.

regards,
Raja
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Before compiling you should add the path of the servlet.jar file to ur classpath variable. I assume that you are working on windows and if so set the classpath variable as follows:

(1).In DOS-Prompt
> set CLASSPATH=%CLASSPATH%;x:\Program Files\Apache Tomcat\common\lib\servlet.jar;

OR

(2). Goto System Properties through RightClick on My Computer and select Properties. Select Advanced tab and select the environment variables. In that append the value of Classpath variable with the path.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic