참고 

- eclipse 플러그인을 사용하여 mercurial hg update를 할 경우 특히 clean update를 하였거나 파일이 삭제혹은 생성(수정/이동 포함) 하였을 경우 eclipse는 재시작을 해야 적용이 된다.
 
 
Posted by twintail twintail
TAG Eclipse, HG

MinGW 설치(Automation Installation을 사용할경우)를 하시게 되면 GDB가 설치 되지 않습니다.
Eclipse의 CDT에서 사용할 경우 gdb가 없어 실행되지 않는 경우가 발생합니다.

우선 GDB가 있어야 하는데 설치를 위해 http://sourceforge.net/projects/mingw/files/에서 mingw-get을 다운로드 받습니다.

다운로드 받은 mingw-get(저는 mingw-get-0.1-mingw32-alpha-2-bin.zip 를 다운 받았습니다.)을 MinGW가 설치된 곳에 압축을 풀어주면 mingw-get의 설치가 완료 됩니다.

이제 mingw-get을 사용해서 gdb를 설치하는데 컴맨드 라인에서 'mingw-get.exe install gdb'를 실행하게 되면 gdb가 설치가 끝나게 됩니다.

자 그럼 eclipse에서의 설정은?
http://www.codeproject.com/KB/tips/CPP_Dev_eclipse_CDT.aspx 를 참고하세요.
Posted by twintail twintail

어제 오랜만에 이클립스 사이트를 갔더니 헬리오스가 릴리즈 되었습니다. 원래대로 갔으면 목성의 위성이름으로 갔어야 하는데, 태양을 의미하는 헬리오스로 코드명이 바꼈더군요. 자세한 내용은 모르지만 CDT를 사용하는 방법에 대해서 간략히 적겠습니다.

Eclipse에는 c/cpp 컴파일러가 제공되지 않습니다. IDE만을 제공하기 때문에 자바처럼 SDK를 별도로 설치해야 사용이 가능해 집니다. 때문에 윈도우즈에서는 별도의 컴파일러를 제공하지 않기 때문에 MinGW의 GNU C 컴파일러를 사용하게 됩니다.

먼저 MinGW를 다운받아 설치합니다. MinGW는 Minimalist GNU for Windows로 불리는 프로젝트로 말 그데로 해석하면 윈도우즈에 대한 최소화된 GNU라고 합니다. 이것을 설치하는 이유는 여기에 c/cpp 컴파일러와 이에 필요한 라이브러리/유틸리티를 설치할 수 있게 됩니다.

설치파일은 소스포지(http://sourceforge.net/downloads/mingw)에서 다운받으시면 됩니다. 저는 자동화 설치 버젼으로 설치를 했습니다. 이렇게 하면 위에서 말씀드린 것처럼 옵션을 지정에 따라 필요한 라이브러리를 설치하게 됩니다. 마치 Cygwin을 설치하는 것과 비슷한 과정을 거칩니다.

C 환경에 맞는 Eclipse를 사용하려면 Eclipse CDT 패키지를 다운 받습니다. 이클립스 프로젝트 페이지에서 다운 받으시면 됩니다. (Eclipse IDE for C/C++ Developers)

이클립스 CDT 헬리오스는 실행을 위해 JDK 1.5 이상이 요구됩니다. 만일 여러개의 JDK를 사용하고 있으시다면 윈도우즈의 바로가기 속성 중에 대상부분을 수정하셔서 사용하시면 됩니다.

eclipse.exe -vm "C:\Program Files\Java\jdk1.5.0_12\bin\javaw.exe"

-vm 옵션을 사용하여 실행시 사용할 vm을 지정하실수 있습니다.

기본 환경은 이 두가지만 설치하시는 것으로 사용이 가능합니다. 이클립스를 사용한 개발방법은 이클립스 사용법을 아셔야 합니다. 하지만 이미 자바 개발을 위해 사용하셨던 분이라면 문제 없으실 겁니다.


Posted by twintail twintail


아시는 분들은 아시겠지만 몇일째 방법을 찾느라 고심했습니다.

위쪽은 Eclipse의 ant에 task를 지정하는 방법이고
아래족은 build.xml에 task를 정의 하는 부분입니다.


몇일 고생하긴 했지만... 이유는 예제를 따라가다 보니 설명이 없는 부분에서 어라 clientgen이 안되네로 시작해서..
쭉쭉~ 꼬인겁니다.
원서로 된 설명도 읽기 버거운데 이런 부분 적었으면 좋겠어요~ ㅎ
Posted by twintail twintail

원문 내용은 http://www.cis.upenn.edu/~matuszek/cit594-2004/Pages/eclipse-faq.html 를 참고할것.
How do I get the assert statement to work?

Go to Window -> Preferences -> Java -> Compiler -> Compliance and Classfiles
and set the Compiler Compliance Level to 1.4. This tells the compiler to recognize and allow assert statements, but does not enable them.
In Eclipse 3, the settings are a little fussier. Go to Window -> Preferences -> Java -> Compiler -> Compliance and Classfiles and set:
Compiler Compliance Level: to 1.4
Use default compliance settings to unchecked
Generated .class files compatibility: to 1.4
Source compatibility: to 1.4
Disallow identifiers called 'assert': to Error
Compiler Compliance Level to 1.4
To enable (make active) assert statements, you must set a flag to the compiler. Go to Run -> Run... -> Arguments, and in the box labeled VM arguments:, enter either -enableassertions or just -ea. Accept the changes and close the dialog.

To get Javadoc to recognize the assert statement, see How do I run Javadoc?
Posted by twintail twintail

Published on dev2dev (http://dev2dev.bea.com/)
http://dev2dev.bea.com/pub/a/2006/01/eclipse-plugin.html
See this if you're having trouble printing code examples

Debugging WebLogic Server Applications Using Eclipse and the WebLogic-Plugin

by Jeremy Whitlock
02/28/2006

Abstract

When I first started working on BEA WebLogic Server applications, there wasn't much support for actively debugging applications deployed to WebLogic Server while developing in Eclipse—such functionality existed only in WebLogic Workshop 8.1. For this reason, I wrote the WebLogic-Plugin for Eclipse, an extension to the basic Eclipse IDE to provide WebLogic Server integration features.  After nearly two years since its inception, the plug-in has changed dramatically to provide many more features than simply debugging your deployed application. This article gives you a good overview of the WebLogic-Plugin and its features, and a handle on how to install and use the WebLogic-Plugin to deploy and debug applications.

Introduction

Unless you've been under a rock the last year you have probably heard of the Eclipse IDE. Eclipse has become one of the most popular IDEs, and the goal of the WebLogic-Plugin project on CodeShare was to create an extension to the Eclipse IDE for managing and debugging deployed applications on WebLogic Server. While the final version of the plug-in is not finished yet, here is the planned feature list for 2.0.0 final:

  • Configuration and management of local and remote WebLogic Servers and their deployments
  • Visual representation of your configured servers and their deployments
  • Real-time GUI representation of your WebLogic Server's state and deployments
  • Management of the full lifecycle of your deployments with easy ways to deploy, redeploy, and undeploy your WebLogic deployments
  • Easy context-driven menus for all user actions
  • Integrated help and documentation
  • Full localization support
  • Easy migration of configured servers from one system to another, thanks to the integrated export/import features

As you can see, we have ambitious plans to create an Eclipse plug-in that provides full lifecycle management of applications deployed to an out-of-the-box Eclipse IDE.

This article helps you install the WebLogic-Plugin and then utilize it to manage a WebLogic Server, manage its deployments, and debug a simple EJB deployed to the WebLogic Server.

Environment Setup

To get any use out of this article you will have to make sure that your environment is ready. Here are the tools that you need to have installed:

The installation of Eclipse and WebLogic Server is outside the scope of this article, but the WebLogic-Plugin installation instructions can be found here. Just make sure you choose the 2.0 version when installing. Before we configure a server, let's make the WebLogic Servers view visible:

Window > Show View > Other... > WebLogic > WebLogic Servers

Now that everything is installed, we're ready to look at how to use the WebLogic-Plugin.

Configuring a Server

The concept behind the WebLogic-Plugin is simple. You create configurations that correspond to an existing WebLogic domain. Once your domain is ready, you need to let the WebLogic-Plugin know where this domain is, what the domain's resource requirements are, and finally how to properly start up the domain. To do this in the WebLogic-Plugin, you need to configure a server, and the WebLogic-Plugin provides you with the means to do it.

To use the WebLogic-Plugin you need to have a WebLogic domain already created. Based on the version of WebLogic Server that you will be running, the following documents will help get your respective WebLogic domain created:

In the WebLogic Servers view, click the Green Arrow to spawn a dialog allowing you to configure the WebLogic Server that you want to deploy this sample application to debug. Here is a description of all parts of the Add WebLogic Server Instance dialog:

General tab

The General tab is used to give information about your WebLogic Server installation and domain configuration. A lot of this information may seem unnecessary, but the WebLogic-Plugin uses this information extensively beyond starting/stopping the server. Values input on this form will override any of the same references in the config.xml (such as the port and SSL port):

  • Display Name: the name used in all GUI parts of the plug-in
  • Server Type: the version of the WebLogic Server (anything before 8.x allows only starting/stopping and debugging features)
  • BEA Home: the location where you install your BEA products
  • WebLogic Home: the location where WebLogic is installed
  • Domain Name: the name of the WebLogic domain you want to manage
  • Domain Home: the location where your WebLogic domain resides
  • Server Name: the name of the WebLogic Server
  • Hostname: the name of the host running WebLogic (only local management is available in the current version of the plug-in)
  • Port: the port WebLogic will listen on (will override whatever is in the config.xml)
  • SSL Port: the SSL port WebLogic will listen on (will override whatever is in the config.xml)
  • User Name: a WebLogic user capable of starting/stopping WebLogic
  • Password: the password for the above user

Classpath tab

The Classpath tab is useful for updating your configuration so that it either properly runs or properly debugs. The weblogic.jar and webservices.jar are already included. (This will be visualized before 2.0 final.) You can use the Classpath tab when your project requires JARs to be on the classpath or you need to prepend a .jar, like Xerces, to override the ones delivered with WebLogic. Another use of the Classpath tab is for debugging. When you debug your application, you need to have the Eclipse project you are debugging to be on the classpath. For the example, we do not need to modify this for now, but we will later when we want to debug.

Runtime tab

The Runtime tab is where we configure the runtime portions of your WebLogic Server configuration including VM and program arguments. We will get into this more when we begin debugging, but in the mean time, here is a description of the inputs:

  • JRE: the JRE/JDK used to run the configured WebLogic instance
  • VM Arguments: set your VM arguments here
  • Program Arguments: set your Program arguments here
  • JNI Library Path: set your JNI Library Path here
  • Run Mode: allows you to run WebLogic in Default mode or Debug mode

For this article, I have gone through the domain configuration wizard, mentioned above. In doing so, I changed only the domain's server name and the domain's name.

Figure 1 shows what the resulting configuration should look like.

Add Weblogic Server
Figure 1. The Add Server Dialog properly configured

Now that we have a server configured, let's start it up to make sure we don't have any problems. To start your configured WebLogic instance, right-click on the new server in your WebLogic Servers view. This will pop up a context menu. Click the Start menu item to start the server.

Figure 2 shows the result of starting your WebLogic Server successfully.

Figure 2
Figure 2. WebLogic Servers view updating after WebLogic Server started successfully (click for a full-size image)

Assuming all is well, let's stop the server by right-clicking on your running WebLogic instance and clicking the Stop menu option and get on with debugging an application.

Note that we performed no configuration in the Classpath or Runtime tabs! You only need to do this when you are ready to debug the application. We will be doing this closer to the end of the article.



Sample Application

For brevity, the application we will debug is a Hello World EJB. The source for this example has been zipped up and can be accessed here. There is a little bit of setup required in order to build the deployable JAR. The following sections describe the setup procedures. Note that we assume that you have already imported the zipped up project into Eclipse.

Create the WEBLOGIC Eclipse User Library

  • Window > Preferences > Java > Build Path > User Libraries.
  • Click the New... button and give the User library name a value of WEBLOGIC.
  • With the WEBLOGIC User Library selected, click the Add JARs... button.
  • Browse to your WEBLOGIC_HOME/server/lib directory and add the weblogic.jar and the webservices.jar.
  • Close all dialogs to have Eclipse rebuild your application with the new User Library.

The reason you have to create the WEBLOGIC User Library is because our EJB requires the WebLogic JARs in the WEBLOGIC User Library to compile. It is much easier to create User Libraries because you can use them over and over in other projects.

Source modifications

  • Modify the PROJECT_HOME/src/com/jwhitlock/HelloWorldClient.java to have proper values for URL, username and password on lines 19, 20 and 21, respectively.
  • Modify the PROJECT_HOME/build.xml to have the proper value for your WebLogic home on line 5.

Assuming everything is configured properly, you should be able to run Ant on the PROJECT_HOME/build.xml and have it run successfully. You can do this by opening the build.xml in Eclipse and doing the following in the Outline view:

Right-Click "distribute[default]" > Run As > 2 Ant Build

If you get any build errors, look at the Console view for errors so you can resolve and try again.

Deploying Applications

Well...we now can start WebLogic Server. We can build the application too but to have some real fun, and to see how the WebLogic-Plugin really shines, let's get to the deployment and debugging of our application.

To deploy an application to your running WebLogic Server via the WebLogic-Plugin, all you have to do is right-click the server and fill the dialog out accordingly. The basics of this dialog describe the type of deployment, whether it's archived or exploded, and the path to the deployment. That is it. Let's see this in action:

  • Start the WebLogic instance as mentioned earlier.
  • Build the application by running Ant on the PROJECT_HOME/build.xml.
  • Right-click the WebLogic instance and choose the Deploy menu item.
  • Select the Archived radio button and browse to PROJECT_HOME/dist/helloworld.jar.

Now watch the magic. Upon successful deployment, you'll get the usual debug information from the console. You also get real-time updates to your deployments tree in the WebLogic Servers view. As soon as WebLogic acknowledges that your application deployed successfully, the WebLogic Servers view will notify you of everything that was deployed. This becomes very useful when deploying whole applications with more than just a single EJB.

Figure 3 shows how the Weblogic Servers view updates when the EJB is successfully deployed.

Figure 3
Figure 3. WebLogic Servers view updating after successful EJB deployment (click for a full-size image)

Debugging The Application

Now that we've taken care of the basics on how to use the plug-in, we are ready to debug. Here are the requirements:

  • To debug a deployed application, that application must be in an Eclipse project in your workspace.
  • You must add the project that holds your application to your server's classpath using the Edit WebLogic Server Instance dialog. (This may not be required before the 1.0 final release.)
  • The server must be configured to run in Debug Mode.

Since we are using the bundled Eclipse application mentioned earlier, Number 1 is not a problem. Number 2 is the first problem we run into because earlier, we just created values for the General tab. Let's fix this first before going on to the next:

  • While the configured WebLogic Server is stopped, double-click the server in the WebLogic Servers view to open the Edit WebLogic Server Instance dialog.
  • Click the Classpath tab.
  • Select the Post-startup WebLogic Classpath and the Pre-startup WebLogic Classpath elements and click the Add Project... button.
  • Select your project, in this case the dev2dev-Article project.

With the classpath set up, let's update the Run Mode so that we can debug our application:

  • While the configured WebLogic Server is stopped, double-click the server in the WebLogic Servers view to open the Edit WebLogic Server Instance dialog.
  • Click the Runtime tab.
  • Change the Run Mode to Debug Mode.

We're almost finished. All that is left is to perform is everything we've learned from start to finish then run the client that invokes the EJB and debug away. Here are the final steps:

  • Start the server as mentioned above.
  • Build the application as mentioned above (necessary only if you have not yet deployed the application to the running server or it is undeployed).
  • Deploy the application as mentioned above (necessary only if you have not yet deployed the application to the running server or it is undeployed).
  • Set a breakpoint at line 56 of com.jwhitlock.ejb.HelloBean (double-click in the left-hand gutter of the editor).
  • Run the com.jwhitlock.HelloWorldClient (right-click com.jwhitlock.HelloWorldClient > Run As > Java Application).

You should notice that Eclipse either notifies you of a breakpoint being hit or will automatically switch to the Debug perspective.

Figure 4 shows the Eclipse debugger stopping at the line where you set your breakpoint.

Figure 4
Figure 4. Eclipse debugger in action (click for a full-size image)

Summary

And there you have it folks. We have learned how to successfully utilize the WebLogic-Plugin to manage a WebLogic Server's deployments and to debug those deployments. While the example in this article is extremely simple, it does cover the steps that you will always follow to manage and debug your WebLogic Servers and deployments regardless of deployment type.

Thanks for your time and I hope this helps ease the process of working with WebLogic in the Eclipse environment. For future features, project roadmap or anything else related to the WebLogic-Plugin, feel free to contact or visit the WebLogic-Plugin home page.

References

Jeremy Whitlock is a consultant for CollabNet where he trains corporations on Subversion. He is also project owner of Dev2Dev's most popular project, eclipse-plugin, which provides extensions to Eclipse specifically for WebLogic Server.


Return to dev2dev.

Posted by twintail twintail

DevX HomePage
 
http://www.devx.com Printed from http://www.devx.com/opensource/Article/20242
 
JBoss Meets Eclipse: Introducing the JBoss-IDE

The wildly popular J2EE application server goes from full steam to mainstream with a GUI-based IDE that plugs into the Eclipse development framework.  
Boss, the open source, J2EE-based application server, has been a favorite of the Java community for a long time. But recently JBoss got a handy new toolkit, thanks to Eclipse—one that may just help the product go from full steam to mainstream.

While JBoss has always been applauded for being robust and scalable, with support for security, load balancing, clustering, and transactional capability, what it hasn't had is a GUI-based IDE. And that has left the mass marketplace solely in the hands of closed source competitors such as IBM, BEA, and Borland. Those who prefer can always continue to configure JBoss using command line tools, but thanks to the Eclipse project, JBoss has an IDE that plugs into the Eclipse development framework, making the product a legitimate option for the thousands of developers who prefer a GUI.

A few Eclipse plugins already have support for JBoss, but the JBoss-IDE plugin is by far the easiest to install, update, and use. The plugin supports starting and stopping servers, debugging server-side code, packaging archive files, and deploying archive files. It also has support for XDoclet code-generation. Best of all, the JBoss-IDE is developed and maintained by JBoss Inc., the makers of the JBoss Application Server itself

In this article, I'll show you how to install and configure the JBoss-IDE plugin and then walk you through the steps of creating a simple Hello World application, packaging it, and deploying it to a JBoss server.

Installing the Plugin
Many Eclipse plugins are packaged as a ZIP file that you download and unzip directly into Eclipse's plugin directory. But the JBoss-IDE uses Eclipse's built-in update management functionality which makes initial installation easy and subsequent updates even easier.

Author's Note: If you are behind a proxy, you'll have to define the proxy server before you can run the update manager. Go to Window—>Preferences—>Install/Update, select Enable HTTP Proxy Connection and define values for Host Address and Port. There is more documentation available on the install process on the JBoss IDE Web page.

Eclipse 2.x

  1. Click Help—>Software Updates—>Update Manager.
  2. In the Feature Updates view, right click and select New—>Site Bookmark.
  3. Select an unused name for the bookmark and then set the bookmark at http://jboss.sourceforge.net/jbosside/updates.
  4. Expand the bookmark that was added and select JBoss-IDE 1.0/Eclipse 2.1.
  5. You should now see the available versions of the plugin. Select the latest version.
  6. You will be prompted to restart Eclipse.
Eclipse 3.x
  1. Click Help—>Software Updates—>Find and Install.
  2. Select Search for new features to install.
  3. Click Add Update Site.
  4. Select an unused name for the update site and then set the boomark at http://jboss.sourceforge.net/jbosside/updates.
  5. Expand the update site that was added and select JBoss-IDE 1.0/Eclipse 3.0.
  6. You should now see the available versions of the plugin. Select the latest version.
  7. You will be prompted to restart Eclipse.




Adding the Shortcuts to the Top Menu
The JBoss-IDE plugin provides a set of buttons to start, stop, and terminate a server, as well as view the server console and log files. These buttons only operate on a single server that you define as a Default Server. Configuring the Default Server will come later; for now, here's how to make the buttons visible on the toolbar:

Eclipse 2.x

  1. Right click on the top toolbar.
  2. Select Customize Perspective.
  3. Expand Other.
  4. Check Default Server.
  5. Click OK.
Eclipse 3.x
  1. Right click on the top toolbar.
  2. Select Customize Perspective.
  3. Select Commands.
  4. Check Default Server in the Available Command Groups pane.
  5. Click OK.

 
Figure 1: Use the Debug Configuration to launch the JBoss server.

Configuring and Launching a Server
Download the JBoss server here.

In order to start your JBoss server, you must create a Debug Configuration. Running JBoss in a Debug Configuration allows you to set and use breakpoints in your server code. Go to Run—>Debugand you should see several new "JBoss" Configurations in the left pane. Click on the one that matches the version of JBoss that you are running. The Debug option on the right allows you to define which perspective Eclipse will switch to when you launch your JBoss server. I prefer not having Eclipse change perspectives when my server starts, so I change it from Debug to None.

 
Figure 2: Define a Default Server to use the buttons at the top of the tool bar.

After defining the perspective, click New to create a new instance of your JBoss configuration. Give your configuration a name and point it to the home directory for your JBoss server (see Figure 1).

Click on Close and then go to Window—>Preferences—>JBoss IDE—>Launcher. You'll need to designate a Default Server so that you can use the buttons that we added to the top tool bar earlier (see Figure 2).

After you click OK, you should be able to use the buttons that were added to the top tool bar earlier.




 
Figure 3: Your source and output configuration should look like this.

Creating a Servlet
Now to learn how to use the plugin, you'll create a simple "Hello World!" Servlet and deploy it to JBoss.

Put your source code (.java files) in a source folder and your compiled classes (.class files) in an output folder. Follow these steps to configure your source and output folders (Figure 3).

  1. Right-click on your project in the Package Explorer.
  2. Go to Properties—>Java Build Path.
  3. Click on the Source tab.
  4. Click on Add Folder.
  5. Click on Create New Folder.
  6. Set the folder name to "src".
  7. Select Yes when it asks you to remove the project as a source folder and to create a "bin" folder.

Next, you need to set your CLASSPATH by defining the libraries (JAR files) that Eclipse should use to compile your code. You also need to add a JAR file that will allow you to compile a Servlet. Luckily, Eclipse comes equipped with a Tomcat plugin, which contains the library you will need you to compile a servlet.

 
Figure 4: This is how your libraries (CLASSPATH) should appear after adding the servlet.jar.

Follow these steps (see Figure 4):

  1. Click on the Libraries Tab (while still under Properties—>Java Build Path).
  2. Click Add Variable.
  3. Select ECLIPSE_HOME and click Extend.
  4. Navigate to the plugins/org.eclipse.tomcat.4.1.x directory.
  5. Select servlet.jar and click OK.
  6. Click OK to exit the properties dialog.

Now, create a class called HelloWorldSerlvet in the com.devx.example package, using the following code in your servlet:


package com.devx.example;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloWorldServlet extends HttpServlet
{

protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
ServletOutputStream out = response.getOutputStream();
out.println("<html><body><h1>Hello World!</h1></body></html>");
}
}

 
Figure 5: This is how the project structure looks after creating all the necessary files.

Next, you need a deployment descriptor so that JBoss will know how to access your Servlet. The deployment descriptor (web.xml) goes under a folder called WEB-INF in the .war file. Create a folder under src called WEB-INF. Then, create a file called web.xml in that folder, using the following source.


<!DOCTYPE web-app PUBLIC
'-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'>
<web-app>
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>com.devx.example.HelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
</web-app>
After all is said and done, your project structure should look like Figure 5.




Setting Up the Packaging Configuration
Before you can deploy your application to JBoss, you need to define the structure of your WAR file through a Packaging Configuration, which you then run to create a WAR file.

 
Figure 6: Here's how to define the packaging configuration, from inside the project properties.

Here's how to create a Packaging Configuration:

  1. Right click on your project in the Package Explorer.
  2. Select Properties—>Packaging Configurations.
  3. Right click in the right frame and click Add Std. Archive.
  4. Select Standard-WAR.war and click OK.
  5. Right click on the configuration and click Edit.
  6. Rename it to helloworld.war.
  7. Expand the configuration.
  8. Right click on the line with Manifest.MF and remove it.
  9. Make sure your configuration looks like that shown in Figure 6.

Click OK and you should see a file in your project called packaging-build.xml.

 
Figure 7: The Target Choice screen allows you to select the instance of JBoss to which you wish to deploy.

Creating and Deploying the WAR File
Create a WAR file by right-clicking on your project and clicking Run Packaging. You will have to right-click on the project and click Refresh before you see the WAR file. The file should be in the top level of you project.

Right click on the WAR file, select Deployment, and then Deploy To. You will see a Target Choice dialog appear, allowing you to select which application server you would like to deploy to, as shown in Figure 7.

 
Figure 8: Test out the Hello World Servlet! Do your results match?

I have JBoss 3.2.2 and JBoss 3.2.3 configured on my machine, thus both servers are available. After selecting the target you wish to deploy to, you should see a dialog that confirms that the application was deployed.

Now, pull up your Web browser and try it out. Go to http://localhost:8080/helloworld/Hello, as shown in Figure 8.

In this article, you learned how to install the JBoss-IDE plugin in Eclipse. You also learned how to configure a JBoss server and how to package and deploy a simple application that server. Keep a lookout for a follow-up to this article in which I will show you how to use the XDoclet features of the JBoss-IDE plugin.

Javid Jamae is the president of Jamae Consulting, a software development and consulting firm that provides business, training, and development services to large and small companies. Reach him by e-mail here.


DevX is a division of Jupitermedia Corporation
© Copyright 2005 Jupitermedia Corporation. All Rights Reserved. Legal Notices
211.218.255.147 devxweb01
Posted by twintail twintail