|
||
Table of Contents |
||
1. Introduction
MyEclipse Blue Edition™ provides advanced WebSphere® project
deployment management as well as application server control
features. This document will outline how to configure MyEclipse
to work with your WebSphere Application Server instance using
these advanced features.
|
||
2. System Requirements
This tutorial was created with MyEclipse Blue 6.1 and WebSphere 6.1. If you are
using a another version of MyEclipse Blue (possibly newer), most
of these screens and instructions should still be very similar.
If you are using a newer version of MyEclipse Blue and notice
portions of this tutorial appear different from the screens you
are seeing, please
let us know and we will make sure to
resolve any inconsistencies.
|
||
3. Setting up the WebSphere ConnectorThe first step for configuring the WebSphere connector is to go to the Windows > Preferences > MyEclipse > Servers > WebSphere connector group, and select the application server connector you wish to configure:
Once you have selected the specific connector you want to
configure,
Enable that server connector, then click the
Browse button next to the
WebSphere home directory field:
then navigate to the WebSphere home, or installation, directory
and select it. Then click
OK.
After clicking
OK, MyEclipse Blue will automatically discover
all the remaining properties for the application server and set
them for you:
In addition to setting the base connector properties (above),
MyEclipse Blue will also identify and configure the JDK that is part of your WebSphere installation:
Of course you are free to change any of these settings manually as you wish.
Click
OK after you are done with the connector configuration and accept your changes, MyEclipse will perform the final configuration steps for the connector's operation:
|
||
4. Starting, Stopping & Restarting WebSphere
Once you have configured the WebSphere connector of choice, you
can manage running, stopping or restarting your WebSphere
instance from the toolbar or from the
Servers view:
To start WebSphere from the toolbar, simply click the dropdown
button next to the server icon, select the connector you want to
use, and then click
Start or
Stop depending on it's running state:
To easily restart the last server started, simply click the server icon itself in the toolbar.
As the WebSphere server starts up, the
Console view will display logging output
from the server. You will know when the server has completed it's
startup by the last line in the
Console view reading:
Server <server name, usually 'server1'> open for e-business
After the server has started, you can check it's current
running status from the
Servers view as well as the mode it was started
in (Debug or Run) and any deployments that are currently deployed
to it. Think of the Servers view as a dashboard for viewing and managing the state of MyEclipse servers.
The
Servers view also provides tools for restarting,
stopping and managing deployments for the individual application
servers listed; just like the toolbar:
To shut down the server, you simply select it in the list, then click the Stop icon. WebSphere will log it's shutdown messages to the Console view as it did during startup. You will know that the server has shut down completely when you see the line:
Server <server name, usually 'server1'> stop
completed.
|
||
5. Deploying a ProjectDeploying Web Projects or Enterprise Projects to your WebSphere application server from MyEclipse are very similar processes, straight forward and can be done in two different ways:
We will show you both methods of deploying a project, starting with Traditional first.
Even though the screenshots below show the
process for a Web Project, deploying an Enterprise Project works
in exactly the same way. When you deploy the Enterprise Project
using either the Traditional or Automatic methods, the Enterprise
Project is packaged up into an EAR, containing all it's modules
and deployed.
5.1
Traditional Deployment
|
||
6. Running & Debugging a ProjectAbove we covered in Section 4 how to Run, Stop and Restart your WebSphere server. In this section we are going to cover how to point your web browser at your deployed project to run it and then how to debug a JSP (debugging classes, Servlets, Beans, etc. are all done in exactly the same manner). After deploying your project (either Traditionally or Automatically) to WebSphere, you can open launch the application by using the "Open in Browser" action that is available from the context-menu on deployment web projects or web modules (if they are a part of an EAR) in the Servers View:
This action saves you from having to remember the URL for your application that usually takes the form below: But with Blue Edition you don't have to remember what port or hostname your Websphere server is running on, and by using the "Open in Browser" action the correct URL will be opened in the MyEclipse Web Browser automatically.
Now that you have successfully loaded up your project in the browser you are ready to start debugging it. In this particular project, there is a simple scriplet in the index.jsp file that we can use to debug, it occurs on line 22 of the file. What we do to debug that file, and that scriplet, is to double-click in the gutter of the editor on the far left to set a breakpoint marker. You can also right-click and Toggle Breakpoints on that area if you prefer:
Once the breakpoint is set, all you have to do is switch back to the Web Browser View and click the refresh button to get the page to reload and have MyEclipse Blue hit the breakpoint and load the debugger automatically for you:
When the debugger is loaded we can step through our application, step into bean code, inspect our threads, inspect variables and any other debugging operation you would expect to find in a debugger. While this example debugs a scriplet in a JSP page, debugging class files (servlets, beans, POJOs, etc.) works in exactly the same manner. You simply set your breakpoint of where you want the debugger to stop then excercise your application in such a manner that the breakpoint will get hit.
TIP: If you are unable to get the debugger to
load when you set breakpoints, check the
Servers view and make sure you started the
server in
Debug mode and not
Run mode. That is a common mistake.
|
||
7. Undeploying a ProjectUndeploying a project that has been either deployed in a Traditional manner or Automatically is quick, easy and can be done from either the deployment tool (toolbar) or from the Servers view. Removing a deployment (undeploying) from the Servers view requires that you first select the deployment you want to remove, then click the "X" icon to remove the deployment:
To remove a deployment using the deployment tool, you open the deployment tool from the toolbar, select the deployment you want to remove, and click the Remove button:
Using either of these methods will result in MyEclipse Blue presenting you with the undeployment dialog as it automatically shuts down and uninstalls the project from your WebSphere instance. Then as a last step MyEclipse deletes the deployment from the server all together:
WebSphere will log these activities to the Console view and any problems that you need to investigate:
|
||
8. ResourcesIn this section we want to provide you with additional links to resources that supplement the topics covered in this tutorial. While this is not an exhaustive list, we do make an effort to point to the more popular links that should provide you with diverse, high-quality information. |
||
9. FeedbackWe would like to hear from you! If you liked this tutorial, have suggestions or even some corrections for us please let us know. We track all user feedback about our learning material in our Documentation Forum. Please be sure to let us know which piece of MyEclipse material you are commenting on so we can quickly pinpoint any issues that arise. |