Here is what I have: a web site (my own domain). My current web hosting company is using a IIS web server. My web site is pages written in HTML(nothing else). Here is what I need: Item 1: Instructions, step by step, on how to get a Java servlet tested and then installed and working on my web site. Item 2: Instructions, step by step, on how to get a JSP tested and then installed and working on my web site. I have two books, "Java Servlet Programming" from O'reilly, and also "Professional Java Server Programming" from Wrox. I have also gone thru many sites like www.servlet.com and also Sun's web pages for JSP and Servlets, but I don't see the type of information I need. They appear to assume that I can disable IIS, and install the Java Seb Server, when in fact I can't do that. I know HTML and Java coding really well, that is not the problem. The questions that I have, and these might be stupid questions are: If I can't disable IIS, and install a Java Web Server, what do I do? Do I need to install a "servlet engine"? Do I need to install the JSDK on my site and also on my home PC? How exactly does one install the JSDK on a web site? Or should it be the JSWDK? Certainly I am not the only person with a web site on a IIS server, to try to get a servet working. What do people do? Where are the step by step instructions? Or am I overlooking the obvious here? Does anybody here have any suggestions? Thanks!
The usual solution is to install a servlet engine of some sort. This can either plug in to IIS or act separately on a separate port. As an example, I run one site with the HTML served using Netscape Enterprise Server on port 80, and the Servlets and JSPs served using Gefion Lite Web Server on port 24761. I hope to move away from this to a more integrated approach, but it's still there at the moment. For a normal web site, using a port other than port 80 (the default HTML port) is a great way to get no visitors, but for the serving of servlets it makes a lot of sense. I know of very few cases where the URL of a servlet is likely to be typed in by hand. It's almost always accessed from a link on your own site, so the details of the URL don't matter. As a way of getting up and running quickly, I recommed this approach: 1. Get Java working on your PC and on the server box. 2. Get a simple, free, pure-Java servlet server and run it on your PC on a port well above 1000. 3. Write, install, test your servlets/JSPs using this system. 4. Install the same servlet server on the same port with the same configurations on the "real" server box. 5. Install your servlets and JSPs, access them from HTML served by IIS. When you have done this (and it's pretty easy, really) you are then free to consider what features you want from a servlet server, and what you are prepared to pay for. Many free servers are very good, as are many that you pay for.
Frank, thank you for the information! I still have questions: Here is more background info: =============================================== WHAT MY WEB HOSTING SERVICE HAS: WIndows NT 4.0, I have 50MB space. They do support SSI. WHAT MY HOME PC HAS: Windows 98 Java is here: c:\jdk1.2.2 (have been using for several months) JWSDK is here: c:\jswdk-1.0.1 (downloaded yesterday) The class path command I use for Java is: path c:\windows;c:\windows\command;c:\jdk1.2.2\bin ==================================== QUESTION 1: How do I get Java working "on the server box"? Do I copy the jdk folder to my site? QUESTION 2: CLASSPATH??. The instructions for jwsdk say to "put the tools.jar in the CLASSPATH variable". What does this mean? Does it mean my classpath should now be: path c:\windows;c:\windows\command;c:\jdk1.2.2\lib\tools.jar??? Apparently, classpath issues are notorious, per this site: http://www.meangene.com/java/classpath.html QUESTION 3: How is jswdk supposed to be started? When I double click on the startserver.bat file, I go to dos where I get message :"Out of environment space" thanks for your help.
Joined: Jan 07, 1999
First things first. About CLASSPATH. Yo seem to be confusing PATH and CLASPATH. They are quite different. PATH is used to locate native executable programs (.com, .exe, .bat). CLASSPATH is used by the Java Virtual Machine to locate its .class files. Having said that, Java versions of 1.2 and above also support a neater mechanism for doing this. You can add Jar and Zip files of classes into a specific directory and you don't need to much about with CLASSPATH at all. Now onto your questions. 1. How do I get Java working "on the server box"? Do I copy the jdk folder to my site? Hmm. It may be as simple as that, but the recommended way is to run the JDK installation program. I don't know exactly what the installation program does, but it might install registry keys, dlls etc. Have you actually asked the Hosting compoany if Java is already installed? If it isn't, have you asked them if they will install it for you? It can't hurt to ask. 2. CLASSPATH?? You have two choices, use the CLASSPATH, or put the jar file in the appropriate place (something like "c:\java1.2.2\jre\lib\ext" I expect, but read the docs). To set up a CLASSPATH, you need to put a line like CLASSPATH=.;c:\jdk1.2.2\lib\tools.jar in your AUTOEXEC.BAT and reboot. If you already have a CLASSPATH line, just add the jar file. 3. How is jswdk supposed to be started?. The "out of Environment Space" is a well known DOS Box problem in Windows 95/98. Just Right-click on the bat file, choose properties, and select the "memory" tab from the top. On the right you will see a box for "initial environment space", which probably contains "Auto". Drop the list and choose a reasonably large number (say 1024 or 2048), then OK it. You should now be able to run the batch file. Alternatively, just open a DOS box, CD to where the batch file is, and type it's name. It will happily execute in that DOS context, and should give no errors.