Listing 1

package servlets;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class WebLogicServlet extends HttpServlet {
  public void doGet(HttpServletRequest request,
                    HttpServletResponse response)
      throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    out.println("Eclipse WebLogic Remote Debugging");
  }
}


Listing 2

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <servlet>
    <display-name>WebLogicServlet</display-name>
    <servlet-name>WebLogicServlet</servlet-name>
    <servlet-class>servlets.WebLogicServlet</servlet-class>
  </servlet>
    <servlet-mapping>
    <servlet-name>WebLogicServlet</servlet-name>
    <url-pattern>/weblogic</url-pattern>
  </servlet-mapping>
  </web-app>


Listing 3

<project name="weblogicApp" default="webapp" basedir=".">
<property name="build" value="build"/>
<property name="src" value="." />
<property name="weblogic.deploy"
 value="C:\BEA\user_projects\domains\mydomain\applications"/>
<property name="dist" value="dist"/>
<property name="j2sdkee" value="C:\J2sdkee1.4"/>
<target name="init">
    <tstamp/>
  <mkdir dir="${build}" />
  <mkdir dir="${dist}" />
  <mkdir dir="${build}/WEB-INF" />
  <mkdir dir="${build}/WEB-INF/classes" />
</target>
<target name="compile" depends="init">
  <javac debug="true" classpath="${j2sdkee}/lib/j2ee.jar" 
  srcdir="${src}/WEB-INF/classes"   destdir="${src}/WEB-INF/classes">
    <include name="**/*.java" />
  </javac>
  <copy todir="${build}/WEB-INF">
    <fileset dir="WEB-INF" >
      <include name="web.xml" />
    </fileset>
  </copy>
 <copy todir="${build}/WEB-INF/classes">
    <fileset dir="${src}/WEB-INF/classes" >
      <include name="**/WebLogicServlet.class" />
    </fileset>
  </copy>
</target>
<target name="webapp" depends="compile">
 <war basedir="${build}" includes="**/*.class"
 destfile="${dist}/webapp.war"  webxml="WEB-INF/web.xml"/>
 <copy file="${dist}/webapp.war" todir="${weblogic.deploy}"/>
  </target>
</project>