This essay developed out of conversations I've had with several other programmers about why Java smelled suspicious. It's not a critique of Java!
Sycorax - complete tutorials
Programming Tutorials
" Java provides the industry - software companies and customer alike , an opportunity to create a true open computing environment where software is portable,
and customers benefit from increase competition. "
Java and the Future
December 1, 2008-LEJB 3.1: EJB New and Improved!
The EJB 3.0 specification was a huge improvement from what you were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use.
December 1, 2008-Should Java Assert that Network I/O Can't Occur on the UI Thread?
Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done.
Register now to recieve special alert and latest technology news!
Installation, Configuration and running Servlets
In this section, we will see as how to install a WebServer, configure it and finally run servlets using this server.
we will be using Apache's Tomcat server as the WebServer. Tomcat is not only an open and free server.
Installation of Tomcat Server and JDK
Apache's Tomcat Server is free software available for download www.apache.org.The current version of Tomcat Server is 6.0 This Server supports Java Servlets 2.5 and Java Server Pages (JSP) 2.1 specifications.
Important software required for running this server is Sun's JDK (Java Development Kit) and JRE (Java Runtime Environment). The current version of JDK is 6.0. Like Tomcat, JDK is also free and is available for download at www.java.sun.com.
Configuring Tomcat Server
Set JAVA_HOME variable - You have to set this variable which points to the base installation directory of JDK installation. (e.g. c:\program file\java\jdk1.6.0). You can either set this from the command prompt or from My Computer-> Properties -> Advanced -> Environment Variables-> User Variables.
Run Tomcat Server
Go to C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin and double click on tomcat6
OR
. Go to Start->Programs->Apache Tomcat 6.0 -> Monitor Tomcat. You will notice an icon appear on the right side of your Status Bar. Right click on this icon and click on Start service.
Open your Browser and type the following URL :
http://localhost:8080/ (If you have NOT changed the default port)
Compile and Execute your Servlet
- Set CLASSPATH variable - You have to set this variable which points to the base installation directory of servlet-api.jar. (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar). You can either set this from the command prompt or from My Computer-> Properties -> Advanced -> Environment Variables.
- Then compile your servlet (.java file) .
Create your Web application folder
First create your web application folder. The name of the folder can be any valid and logical name that represents your application (e.g. Student_apps, airline_tickets_booking, shopping_cart,etc). But the most important criterion is that this folder should be created under webapps folder. The path would be similar or close to this - C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps.
Put all jsp , html, images inside this folder.
Create the WEB-INF folder inside this folder. Then create a classes folder inside this folder. Then write the web.xml file and put it in WEB-INF folder .
Run Tomcat server and then execute your Servlet
open your web browser and enter the url as specified in the web.xml file. The complete url that needs to be entered in the browser is:
http://localhost:8080/yourappfolder_name/servlet_url_pattern