I want to run the simplest of all servlets on my machine, that is, the HelloWorld Servlet. Thing is, I have consulted so many different textbooks, trying to find out WHERE I can download all the things necessary to run a servlet on my local machine - but to no avail. I was told that at the URL http://java.sun.com/products/servlet/industry.html I would be able to download the JavaServer Web Development Kit. So, I went to this page - but I couldn't find it. I then clicked on the Apache Tomcat link. Ok, I was taken top this page, but NOWHERE could I find a link to DOWNLOAD what I needed. I don't want the documentation, or the source code. I want what ever it is I need to run a servlet!!! Help me, please, somebody! Bacially, what do i need to download, where can I download it from, and what do i do with it?? I already have JRun 3.1 installed on my machine, if that helps.But when i compike a srevlet, I get errors such as:- "HelloWorld.java": Error #: 704 : cannot access directory javax\servlet at line 2, column 1.
John Bonham was stronger, but Keith Moon was faster.
You have a couple old books I think. JavaServer Web Development Kit (JSWDK) is very OLD.
You are also not the only person to be fooled by jakarta's download page. If you go to jakarta.apache.org/tomcat and click the binaries download link, you are taken to another page.
Then on the left you see "Tomcat" and you click it again. You are only taken back to where you started. The binaries download page is for ALL jakarta projects, so just scroll down the page until you see...
There are actually 4 tomcat's listed here, but choose that one. (the page I'm referring to is this one )
That, and a JDK ( *not* just a JRE ) are all you need to use Tomcat.
OK I've installed it So, now how do i use it? I'm using JBuilder 6, if that's of any help. Another thing, when i start Tomcat, I don't see an icon for it in my windows task bar - is that to be expected??
My own personal opinion is that steps 2,3 and 4 are not entirely needed (in particular step 3). Having said that, if you follow through this page, you need to do all the steps for his examples to work.
Hello every1, Do I really need to download TomCat to try out servlets... I don't think so, not according to sun.java! or am I missinf something. According to sun tutorials you only need to: 1- download regular Java, j2se 2- jsdk2 (java servlet dev kit) 3- set your PATH variable to include "..jsdk2\bin" 4- Copy ..\jsdk2\lib\jsdk.jar where CLASSPATH can access it. 5- run ..\jsdk2\bin\servletrunner.exe Here you might check that now the port 8080 is listned to! 6- compile the example that you could download from java.sun namely: HellowWorldServlet.java that should be put on the example directory. 7- Open your browser to http://localhost:8088/servlet/HelloWorldServlet And it should work.... well it should but 4 me it doesn't !!! I have no idea why?? Do I need to download a server (TomCat)... I can't see why. If I got it right servletrunner.exe does al there is to do!!! Any hints??? Thanks in advance!! One more afternoon like this with Java and I divorce it! ... I prefer C++ & make files on UNIX.. at least it's has some logic to it!!!
Too me loading and running Tomcat was very simple. I have loaded on W95 without much effort. By the way I have never loaded it on W98. But I can't imagine it being that much different. Basically you pull the windows version from the jakarta website, load it, edit your autoexec.bat file by inserting a CATALINA_HOME="tomcat directory" and the JAVA_HOME="J2KD direcotory". Reboot your machine to make the environment variables global. Then open up a MS-DOS window, "cd" to the %catalina_home%\bin directory and at the command prompt run starup.bat. You should see a seperate MS-DOS window open and display the server starting up. By the way there is also shutdown.bat file to obviously shutdown the server. There are also Unix versions of these bat files located int the \bin directory. And your off and running. craig
Thanks Mike, I did install Tomcat with little difficulty though.. for some reason my machine (Windows XP) won't use CLASSPATH that I specified as a environement variable,.. each time I wanna compile I have to use the -cp option! .. anyways.. at least the examples are working. Now I have to sit down ans learn Servlets+JSP. Woul�d you have any idea on how much time it could take. For instance 1 month (3 hours per day 5 days a week). Thank you for any input. Cheers. Mehdi.
Hi Mehdi, I use Textpad + Tomcat for servlet development. You can just put the servlet.jar file in this directory: %JAVA_HOME%\jre\lib\ext in this way, the java compiler is able to find the servlet package without the classpath option
Joined: Jan 31, 2003
Hi Ivan, I tried to do that but it didn't work.. I know it's strange...!! Anyways, it's ain't so important! the main thing that worries me is how much time should I give this Servlet thing and whether it's worth it. I always had this problem of not being very good at taking decisions. Cheers
I had noticed that Tomcat didn't like running under Win XP home edition on a laptop I bought about 8 months ago.
Perhaps XP Pro is different, and maybe more recent versions of Tomcat will behave better. (I no longer have the laptop, and I use Win2k, so I can't test it out).
I too found it very puzzling why the CATALINA_HOME variable was not picked up.
As for whether or not servlets are "worth it"... I think pursuing knowledge is a worthwhile goal at all times. The more things you teach yourself, the easier new things become. And servlets and j2ee in general is a fairly worthwhile thing to know about. On the other hand, if you make your living coding VB.NET, then maybe it's not something you should spend an awful lot of time on.
Joined: Jan 31, 2003
Hi Mike, Just to let you know that I am using windows XP on a lap top as well!!! So,.. maybe that\s the problem!! Thanks for your advice. For the time being I\m jobless. Cheers
I have XP and Tomcat runs fine. Both the windows installer which makes it a service and the zip version. Where you have to set catalina_home. I also don't have a problem setting classpath. How are you trying to set the classpath? 1. Control Panel 2. System 3. Advanced tab 4. Environment Variables button 5. New (Under system variables) 6. put in the name and path then ok all the way out.
Joined: Jan 31, 2003
Hi Paul, I tried that and it didn't work as expected! Anyways, it's not that important, it's working now! the only "problem" is that I ave to use the -classpath option anytime i wanna compile! For the time being I'm just pondering on what to do noext! I'll be finishing Core java in few days (self study). I'm not sure I wanna spend that much time on Servlets. Maybe I should rather study JDBC, or something else, JDOM, DOM2 for XML! I just don't know what to do and on what to concontrate... What's gonna be more helpful to find a job??? Cheers
I'm not sure I wanna spend that much time on Servlets. Maybe I should rather study JDBC, or something else, JDOM, DOM2 for XML! I just don't know what to do and on what to concontrate... What's gonna be more helpful to find a job??? Cheers
Hi Mehdi! Im a java programmer and did servlet programming for more than 2 years now , it is quite usefull. You could look at JSP for me this is the future of servlets. JDBC is a "basic" its good to know, but most projects have a framework or generator that creates the DBconnections. XML is also very interesting, because its a generic way for data interchange. XSL and XSLT is a little tricky , and you only should worry about it if you have to generate documents (doc,pdf,pure html). I used almost any java api which exists (except J3D) for my projects. So there is much you can study and every time you close a chapter your one step closer to the "guru" status. The most helpful to find a job is searching. But if you have a SCJP Certification (Sun Certified Java Programmer) your chances of being considered are much better than without. [ March 05, 2003: Message edited by: Mike Nightsky ]
Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com