This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can not recognize javax.servlet

 
sharjeel afzal
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i compile my java code there is an error
import javax.servlet.*; import javax.servlet.http.*; not found
 
sharjeel afzal
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i compile my java code there is an error
import javax.servlet.*; import javax.servlet.http.*; not found

i install jdk1.6 what can i do please
help me

thanks
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sharjeel you'll need to install tomcat (or any other servlet container or application server) to compile and run your Java EE programs. Please read a book on this topic or any online tutorial...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you have Tomcat on your system, you need to make sure that the servlet-api.jar file is in your compilation classpath.
 
phanikumar jami
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if java is successfully installed after that, you have to instal apache tomcat server software in your system. then set the class path yet not compiled then see the complete reference j2se servelts chapter in that author compiled the program like that : c:\javac progname.java classpath "--------here your server class path to be give------" then compile you wont get that error.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic