Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compilation of Servlets.....

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
jswdk 1.0.1
How do i set up the class files so that i can compile Servlets.
I mean I did try setting up the path and classpath and followed the installation instructions for the server JSWDK 1.0.1
the program complains about not finding javax.servlet and java.servlet packages when mentioned as import statements.
How do I set up for proper compilation or any site for installation instructions.
My autoexec.bat file has the path set up to jdk\lib\tools.jar
Any other changes to be done.
Thanks.
 
eram
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
find the servlet.jar file from the jswdk dir and then copy the file to jdk\jre\lib\ext dir.
Set your classpath to the above dir and go......
Hope I am right.
 
CHEN FEIYAN
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I copied servlet.jar to the %jdk%/jre/lib/ext directory, but my compiler still can't find java.servlet package, I noticed that in javax.servlet package has some classes very similar to the java.servlet package, can I use that in stead?
Thanks
Vivian
 
eram
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well , This is what I did:
I downloaded jsdk2.1 from sun's site:
Just do nothing , other than changing your autoexec.bat to :
set CLASSPATH=.;C;\JDK1.2.2\JRE\LIB\EXT;
I did have the same problem with jswdk1.0.1 , as it complains to find java.servlet.* package with other errors.
The above sol works.
have fun!!!
 
S Varana
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to start the server and stop it but when i write a helloworld program with it i get error saying httpservlet not found etc etc.....
I downloded JSDK in NT and they ask me to set classpath variable.
But there is nothing like it.ANd i am still able to work with jDK1.2.2
The only thing i have iS PATH where i have given C:\jdk1.2.2\bin
They also talk about java_home
what is this??
where should i put my tools.jar file
In the PATH or should i create a env variable called CLASSPATH
It is very sad to note that most of us have problems with this
I think SUN must be more clear...
Any one who has downloaded this please give me all the details
of ur classpath and other changes u did.

thanx
 
tony.b
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Here is the exact solution for ur all problems;
you will have to add CLASSPATH in ur autoexec or environment tab what u r using. Simply these following three statements:
c:jswdk-1.0.1\lib\jspengine.jar;
c:jswdk-1.0.1\lib\servlet.jar;
c:jswdk-1.0.1\lib\xml.jar;
if u r using NT then go from start to settings then control panel. Form contrl panel double click on system. In System window select environment tab and then highlight the CLASSPATH varible and add these above statements at the end ur already set path.
I think it will solve problems of every one
If any one is still not on right track, then let me at ur earliest.
bye
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic