• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to compile java file

 
Sabber bhatia
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone

i am not being able to complie java file having java.servlet.http.*
i installed jdk 1.5,jre for that and tomcat
please tell me what is the problem

thanks
Sabeer bhatia
 
samith pinnaduwa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try using javax.servlet.http.*;
 
Sabber bhatia
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used this

import javax.servlet.http.*;
 
Justin Russo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your classpath contain the proper jars. servlet-api.jar is in my tomcat lib dir which contains the classes. Please check that..
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More info on Classpath and Compiling Servlets
 
Sabber bhatia
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey marc

just one question Is that mean i have to set classpath
means i have to copy this
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar and set in path.

Please help me with this.
Thanks
Sabeer bhatia
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instructions in the link explain what to do. It includes another link labeled HowToSetTheClasspath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic