This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package javax.servlet.http does not exist

 
Sunny Indian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

though I have set the classpath for servlet-api.jar
still I am getting "package javax.servlet.http does not exist" error.
Can someone help me.

thnaks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please reservev bold for emphasis, not an entire post. I have removed it for you. Also, please check your private messages for an important administrative matter. Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sunny Indian wrote:though I have set the classpath for servlet-api.jar

You may think so, but apparently this is not the case. Otherwise, you would not be getting the error.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I'd set it righter--how are you setting it?
 
Sunny Indian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

I used
E:\>set CLASS_PATH=.;%CLASS_PATH%;D:\Softwares\apache-tomcat-5.5.30\common\lib\servlet-api.jar;


right now I can see it as folows
E:\>echo %class_path%
D:\Softwares\apache-tomcat-5.5.30\common\lib\servlet-api.jar;D:\lib\servlet-2.3.jar

please help..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's "CLASSPATH", although in general I don't recommend setting it as an environment variable--it always leads to trouble. Better to set it explicitly in the java/javac command. This can be done inside a batch/shell script if you don't want to type it every time, or you could use Ant.
 
Sunny Indian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

please help me in doing it using java/javac.
i am working on windows.
I am new to this..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html#options

The -cp/-classpath option. Same for the java command.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic