PDA

Click to See Complete Forum and Search --> : real quick important question about servlets


sweetsupra
Mar 14th, 2001, 02:40 PM
Hey guys,
I have recently downloaded a copy of javawebserver2.0 and jdk1.2.7. I have installed both programs. I wrote my first servlet file in a long time. I am having difficult for the compiler to recognize the servlet import statements..I know that I have to edit the autoexec.bat...but what is the steps...

Thanks

Mar 15th, 2001, 08:12 AM
Package javax.servlet does not come with the Core Java 2 Platform (your jdk1.2.7) which is at least at version jdk1.3. It is in the J2EE which is at least at version j2sdkee1.2.1.

When you install the J2EE SDK, it will explain what changes to make to autoexec.bat etc.

Once you compile your servlet class, then you'd use your javawebserver2.0.

I don't recall having to log-in to download the j2sdkee1.2.1, but this link asks you to (but perhaps because it's an early release)
http://java.sun.com/j2ee/tutorial/doc/J2eeTutorialPreface.html
http://developer.java.sun.com/developer/earlyAccess/j2ee

Here, I found the link I originally used:
http://java.sun.com/j2ee/j2sdkee/

sweetsupra
Mar 15th, 2001, 10:23 AM
Hey VirtualVB,
I went to install j2ee and found out that it only accepts windows 2000 or NT as the operating system. Any other viable solutions? Thanks for your help

Manoj

Mar 15th, 2001, 01:54 PM
I was using NT for servlets, so that didn't stop me.

sweetsupra
Mar 15th, 2001, 02:30 PM
Hey VirtualVB,
I am using windows98. I can get a copy of windows2000 but the problem my cdrom doesn't work..so installation is out of the question. any solutions virtualvb? Actually what is the best way of testing jsps and/or servlets w/o using ejb application servers.....tomcat/apache? Thanks for the help.

Manoj

Mar 15th, 2001, 05:47 PM
Actually what is the best way of testing jsps and/or servlets w/o using ejb application servers...

The answer to that question will save you a few hundred (if not thousand) dollars for a production app. I see you are thinking outside of the box. When I was in your shoes, I was asking, "Where is an inexpensive/free app server?"; your idea is to side-step that all together.

You can get a few free trial app servers. There's one called JRUN and I thought one came with the j2sdkee1.2.1.

I took this EJB short course
http://developer.java.sun.com/developer/onlineTraining/EJBIntro/
which led to the j2sdkee1.2.1 download and it must have used an app server for the examples, but that was not for servlets. Usually an app server would handle servlets too, so I'm assuming you could use that.

Unfortunately that doesn't help for Win98.

Sun did list recommended app servers and I believe one IS called Tomcat by Apache.

Found it
http://java.sun.com/products/servlet/industry.html

sweetsupra
Mar 15th, 2001, 07:47 PM
thanks, virtualVB...u are the man...I have to find and test it out. i have to figure out which one that best suits what I want.


P.S.:They don't pay you enough for your hobby

Mar 16th, 2001, 07:46 AM
You are welcome.

I'm getting ready to ask for a raise.

sweetsupra
Mar 26th, 2001, 06:44 PM
Hey VirtualVB,
Got a question??? I haven't had a chance to look at servlet engines lately with other work and stuff. I am looking at the apache's tomcat and stuff. If I am downloading an engine from them. I am wondering how is that going to benefit me from compiling, because I think (correct me if i am wrong) that the javawebserver2.0 has the same role. I am still going to have a problem compiling??? Unless I can add a path in my autoexec.bat where java can look for my servlet/jsp classes. Am I in the right direction? shoot me a reply, if it doesn't make sense.
Thanks for the help,

Manoj

Mar 27th, 2001, 01:27 AM
By The Way, it's VirtuallyVB ;)

I would expect the javawebserver2.0 to merely serve your compiled classes. Something like the j2sdkee1.2.1 would actually do the compiling of your source code into classes.

Again, that link is http://java.sun.com/j2ee/j2sdkee/

sweetsupra
Mar 29th, 2001, 04:32 PM
Hey VirtuallyVB,
Sorry for the mix-up with the name. I figured out that there is an easier way. I had to download the jsdk2.0. I set it up and put the path in the autoexec.bat and the java compiler still doesn't recognize the path???? I have to say...java compiler getting real sensitive. I don't I will try to figure it out.

Thanks for the help.

Manoj