Step 1: repost this in the correct forum - "Servlets" looks like a good bet. Step 2: properly describe the problem. "javax. in not working" is too vague. Perhaps you'd consider adding the error stacktrace (or part thereof). People will help, but you can't expect them to know the answer to your problem without a proper description
In a Java application, you ask the Java VM to run the main method of a class. Servlets do not have a main method. Instead, your doGet() and doPost() routines are run by a "servlet container," such as Tomcat.