Friday, October 2, 2009

Java 2 Enterprise Edition..... An Introduction...

Java 2 Enterprise Edition (J2EE)
a) Software Required: 
         · Web Server 
            · Apache Tomcat Server 6.0
b) Steps for installing Apache Tomcat:
· Go to the link :
· Run the file : “apache-tomcat-6.0.20.exe”
· Follow the instruction for installation.
· Copy the file called “com.sysdeo.eclipse.tomcat_3.2.1” from the Tomcat folder and paste it inside the plugins folder under the eclipse where the eclipse is installed.
· For the installation of Tomcat server 6.0 refer the link:
· Go to the WINDOWS tab in the Menu bar and select "Preferences"
· Select "server" option on the left of the window and add the "Tomcat Installation Directories path" in the option provided.

c) Setting up Environment variables:
For example if the Apache Tomcat server is installed in the directory “D:” then, The Environment variables are set as follows.

d) Configuring Tomcat to be used with Eclipse Externally:
· How to configure Tomcat server in Eclipse?
Here i have taken an example of the configuring the “Apache Tomcat version 5.5”, in this example the Tomcat server is installed in the “C:\” directory.

· How to create a Web application in eclipse?

·     How to create servlet?





·         How to execute Web applications in Eclipse?

Example: If the following code is written in the index.jsp (Created as mentioned earlier)

"GreetingServlet" method="POST">
        First Name: "text" name="firstName" size="20">
        Surname: "text" name="surname" size="20">       
        "submit" value="Submit">
When we run the index.jsp on server , The following page will be seen

                 Suppose the doPost() method is written as follows,

On Clicking the “Submit” button the following page will be seen