Getting Error [javax.servlet.*; package does not exist.] [Solved]

There is two way to fix it.

 
1-With command line
  // Assume that Tomcat is installed in D:\apache-tomcat-8.0.xx
    > D:  // switch to D dive
    > cd apache-tomcat-8.0.xx\webapps\hello\WEB-INF\classes //change directory
    > javac -cp .;D:\apache-tomcat-8.0.xx\lib\servlet-api.jar ServletCode.java   // Compile                                                                                                                                                                                 
2-   Make Environment Variable for

     > CLASSPATH=D:\apache-tomcat-8.0.xx\lib\servlet-api.jar
       And
     > Copy the    D:\apache-tomcat-8.0.xx\lib\servlet-api.jar                                                         To
                   C:\Program Files\Java\Jre 1.x.x\lib\ext\                 

Comments

Popular posts from this blog

Print emojis using python (πŸ˜€, πŸ‘, ...)

Scraping with Python

Html Status Code