Click to See Complete Forum and Search --> : choosing a server...
mshalabi
11-17-2006, 02:16 PM
hey all..
im a html coder.. i want to improve my skills by learning a server-side language..
i choosed java..
i dont know how to start, i'v been told to install a server on my pc, (like apache tomcat and java web server)..
i want a good server... and a complete setup instructions.. specially WinXP system variables.. i want a hello world! example :)
any help would be appreciated.. !!
mwmwnmw
11-17-2006, 09:00 PM
If you're an html guy and you just want to learn a server-side language PHP is probably a much better choice. Java is not actually a server side language, but rather a separate environment that allows you to build complete applications. From a web perspective you'd be looking mainly at Java Servlets and JSP. Those are incredibly powerful and effective tools, but if you're working primarily on small to mid-sized projects you're barking up the wrong tree. Shared hosting is much more expensive for java than for standard server-side languages, and configuring / running your own server w/ java capabilities requires a fair bit of expertise.
As far as servers go, Apache is still the web standard and it's still free at apache.org. How on earth you've been coding html and haven't yet set up your own development environment is beyond me, but you really should do that right away. Apache is really easy to set up and run as a service on XP. From there you can either install and learn PHP (php.net, with the applicable modules from apache.org) or you can go the Java route, at which point you'll need to install a container such as Tomcat as well as a Java development environment. Instructions for installing Tomcat are pretty straightforward, it also runs as a service on XP, but you'll have to configure it to run with Apache. There are two ways to go about that, mod_proxy and mod_jk. If you are installing current versions of Apache and Tomcat go with mod_proxy... it's infinitely easier to install. If, for whatever reason you decide to go old school you'll need mod_jk and good luck with that one.
As far as someone handing it all to you in a neat little bundle for free, that's not going to happen. Realistically, if you can't install Apache on XP with the instructions on the apache site, then you really shouldn't be trying to mess with it at all. It's very simple. If you get stuck installing the various modules or configuring things, I highly recommend apachelounge.com. They are very knowledgable, very friendly, and quick to respond. But like any other site, they won't do it for you.
mshalabi
11-18-2006, 11:30 AM
mwmwnmw thnx for ur helpful reply...
i know how to install apache.. and i have coded simple php pages.. which helped me in my html work.. but i wanna learn java (servlets and jsp)..
thanks again mwmwnmw...
primarily_d
11-25-2006, 08:44 PM
Don't let people scare you. Like Will Smith says in his upcoming movie, if people can't do something, they want to tell you that you can't do it as well.
Setting up Tomcat is really easy under XP, just go to http://apache.mirrors.northco.net/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.exe and download the installer for it. The setup is automated and is smart enough to setup all the XP environment variables for you. When you're done, there will be a new icon in your Task Manager for Apache Tomcat. Double click it for the Tomcat control panel.
Tomcat includes an HTTP server as part of the default installation that you can use to test your code. So there is no need to install Apache as well and try to get it to work with Tomcat. The only gotcha is that the default port is 8080, so you will have to go to http://localhost:8080 instead of just http://localhost to see your web pages. But you can also tell the setup program to use port 80 or modify the server.xml file after the installation. Obviously this is not optimal for a production environment; but then again, if you just want to learn Java and Servlets this will get you started.
As part of the installation you can also choose to install some sample code that should get you started. But if you get stuck, go to amazon.com and get yourself a copy of any of the dozens of JSP textbooks. Buy used: half the price with the exact same content. Most come with a CD and step-by-step code walkthroughs.
Finally, have patience and don't sweat the small stuff. Coding a JSP might be different from hacking together some JavaScript, but if you can get CSS figured out, there is no reason why Java would be any more difficult. Just different.