aspose file tools*
The moose likes Servlets and the fly likes jsdk2.1 setup....servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsdk2.1 setup....servlet " Watch "jsdk2.1 setup....servlet " New topic
Author

jsdk2.1 setup....servlet

Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Hi:
i just downloaded jsdk2.1 (win98), installed it ....
my path is now set to:
PATH=%PATH%;c:\jdk1.2.2\bin;c:\jdsk2.1;
and my class path is:
classpath = c:\jsdk2.1\server.jar;c:\jdsk2.1\servlet.jar;c:\jdk1.2.2\classes.zip;.
when I try to compile a file with a import javax.servlet.*;
line, it complains javax not defined in import ....
yada yada yada.....
did any of you yada yada yada ......
what am I misssing ...... i mean
Believe me I will be up all night ..... unless someone
helps me ....
thanks.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Try getting the servlet.jar file from your jsdk installation directory and put in the ext folder of your jdk installation.This should work out.
Good night, or shall Satya sleep no more ?
Herbert.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Herbert:
yes that did.....
thanks for you quick reply.
and btw, its C:\jdk1.2.2\jre\lib\ext
so how should I know this...I mean sun never
told me this...so should it be by experience only
sleepish
thanks.
regds.
- satya
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Satya,
just tried this out and got it.
C:\>javac -classpath c:\jsdk2.0\lib\jsdk.jar s1.java

i do not know why servlets.jar is not required. But servlets.jar is not there in the lib directory of jsdk2.0.
Hopeing u have a good sleep now.
i am having the same porblem in EJB which i have posted in that forum. Life is really misarable when one is stuck up somewhere.

Regds.
Rahul.
[This message has been edited by rahul_mkar (edited July 11, 2000).]
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Rahul:
I agree that jsdk2.0 doesnot have servlet.jar.
Actually, I initially (9.00 pm, today)started with
jsdk2.0. It din't work. I asked my friend and he
mentioned that jsdk2.1 worked for him. So i downloaded
jsdk2.1, installed it. Then again I had the same prob.
but, my friend was able to run perfectly.
Yeah, maybe your command line arg also might have worked.
Just curious but, did you also get the error I mentioned?
Also, now my second hurdle: after compiling, I start the
server (again jsdk2.1, with jsdk2.0 its servletrunner)
using c:\jsdk2.1\startserver
after this I could do something on the browser like: http://localhost:8080 or so the README file says....
(i am able to compile a servlet with some web stuff,
trust me it works on my friends machine, needless to
say my friend can't think of any reason why it shouldn't
work on my machine, and he's sleeping )
well, now this doesn't work...
still wide awake....
Thanks for any help.
- satya
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Originally posted by rahul_mkar:
Hi Satya,
Life is really misarable when one is stuck up somewhere.


hmmm....I wouldn't go that far.....
Din't you see the movie "The Edge"...from which I quote
"What one man can do another can do."....trust me I am
quoting. I wouldn't give up so easily.....not that you
did but just mentioning.... Actually, all the determination
I am working with now is since my whole day at work din't
go very well or so I think.
Hopefully someone will help.....sometime....

Regds.
- satya
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi,
actually my system is already configured to work with servlets. I have to undo the autoeexec file to start from the scrath. I did not do that.
any how did my line of code work. It worked fine for me. i think u should add jsdk.jar to u r classpath. i am online on yahoo messanger at rahul_mkar

Regds.
Rahul.

[This message has been edited by rahul_mkar (edited July 11, 2000).]
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Rahul:
as I mentioned, jsdk.jar goes with jsdk2.0, I have
already moved to jsdk2.1 and it uses servlet.jar
and I am able to compile files using what Herbert
mentioned.
After some insight into the new jsdk2.1\startserver, I found this exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/web/shell/
whatever that means ......
I get this exception in the new Dos window which the startserver script opens.

And thats' probably why I can't use localserver:8080....pstttt.....
Any clues .......
Regds.
- satya
[This message has been edited by Madhav Lakkapragada (edited July 11, 2000).]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi,
i am sorry i cannot help u out with 2.1. but with version 2 i guess u have to do what i did. and then say in the explorer address bar
http://localhost:8080/servlet/SimpleServlet
Regds.
Rahul
[This message has been edited by rahul_mkar (edited July 11, 2000).]
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

PATH=%PATH%;c:\jdk1.2.2\bin;c:\jdsk2.1;
and my class path is:
classpath = c:\jsdk2.1\server.jar;c:\jdsk2.1\servlet.jar;c:\jdk1.2.2\classes.zip;.

hmmmm....see that..jdsk...pchaaaaa
a fresh cup of coffee always helps.....
i am going to change this, reboot my machine
and sleep (maybe?)
Rahul,
btw, I don't have yahoo IM I just downloaded
it, may be next time we could meet. Thxs for your
support. Also, just check your EJB stuff, just in case
you did something similar....just kidding.
Will be online in a couple of minutes again ....
Thanks.
- satya
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi,
i just downloaded jsdk2.1. used startserver to start the server. had some problem saying "out of environment space". right clicked on startserver and changed the memory settings "initial environment" to 4096. a new dos based icon was created. clicked on it and started the server.
everything went of ok.
i then opened the explorer and punched in http://localhost:8080.
an index page poped up.
The server is working!!!
then i checked up one of the sample(HelloWorldSamples)examples.
They too worked.
Everything went fine.
what u should do imo
1) check out whether the server is working
2) check out the sun site discussion groups for any similar problem.

Regds
Rahul
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Rahul:
I appreciate your support, with jsdk2.1, I still get the
foll. exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/web/shell/Startup
whatever that means ......
This was occuring since I din't have the server.jar file in the classpath.
So finally in the classpath I have
C:\jsdk2.1\servlet.jar;c:\jsdk2.1\server.jar;
among other usual stuff..and the path includes c:\jsdk2.1\
I also removed the work around suggested by
Herbert (though it works)...
Best wishes for your EJB stuff....
Good night (morning already )
Thanks.
- satya

[This message has been edited by Madhav Lakkapragada (edited July 12, 2000).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsdk2.1 setup....servlet