Create a New Project (Main Menu | File | New Project). Enter "HelloWorld" as the project name. As you won't need standard libraries, remove them from the project: press Advanced button, select Search Classpath and make sure that checkboxes 'Include standard libraries' and 'Include Classpath' are cleared. Press OK button.
Create a New Package. Name it "hello" and choose Open in New Tab from the speedmenu.
Create a new servlet "HelloWorld" using Class by Pattern icon on the toolbar.
Edit doGetmethod
|
Find |
Replace |
|
//Write your code here |
out.println("Hello world"); |
Now you are ready to deploy this Servlet to WebSphere 3.5
Start WebSphere Server 3.5 services from "Control Panel/services"
Run Together's Main Menu | Tools | EJB Deployment Expert
Select "IBM WebSphere AE 3.5" as the target server and make sure that all available checkboxes, except of "Process servlets", "Hot deploy to IBM WebSphere", "Start Bean(s), Servlet(s) after deployment" and "Add librares, required for deployment, to the project Search/Classpath", are off.
Specify correct paths to WebSphere home directory and to IBM JDK 1.2.2 root directory (e.g. "c:\WebSphere\AppServer" and "c:\WebSphere\AppServer\jdk"). Press Next.
Set the following parameters on the next page:
|
Parameter name |
Setting |
Comment |
|
Admin Node Name |
Name of the Node to deploy |
Name of the computer |
|
Dependent ClassPath |
Fully qualified path to WebSphere |
Check if it refers to existing jars |
|
Application Server Name |
Your Application Server |
"Default Server" by default |
|
EJB Container name |
Your Container name |
"Default Container" by default |
|
Target WebSphere server directory |
WebSphere home directory |
e.g. c:\WebSphere\AppServer |
|
Launch server in debug mode |
OFF |
|
Set the following parameters:
|
Parameter name |
Setting |
Comment |
|
Virtual Host Name |
Your virtual host |
"default_host" by default |
|
Servlet Engine Name |
Your servlet engine |
"Default Servlet Engine" by default |
|
Web Application Name |
Your webapplication name |
"Default_app" by default |
|
Relative WebPath to Servlet(s) directory |
Your directory name |
"/servlet" by default |
|
Servlet Jar File Name |
Your jar name |
"servlet" by default |
All check boxes, except "Load Servlet at SturtUp" and "Servlet Enabled", are off
Press "Finish"
If you have also checked 'Hot Deploy' check box, the last message in the Message Pane is:
//was35: Finished with 0 Errors, 0 Warnings.//
Start your Internet browser and enter address http://localhost/servlet/HelloWorldServlet. You will see "Hello World" message.