• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Development with a Servlet container
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Development with a Servlet container


  • Subject: Re: Development with a Servlet container
  • From: Jake MacMullin <email@hidden>
  • Date: Wed, 22 Oct 2008 11:23:05 +1100

Choose 'External Tools Configurations...' from the Eclipse External Tools run button (next to the 'normal' run button).

Choose 'Program' and click 'new'

Select the location of the executable you want to run (your servlet container launch script or the mvn executable if you're using the Maven jetty plugin).

Specify the appropriate working directory and arguments (basically you need to recreate the command-line environment you'd use to run your app in a servlet container).

Click on the 'Environment' tab and add a new Environment variable to specify that you want to start the container with debug enabled. (for the Maven jetty plugin you need to specify MAVEN_OPTS = -Xdebug - Xnoagent -Djava.compiler=NONE - Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y)

For JBoss it is something like JAVA_OPTS = -Xdebug - Xrunjdwp:server=y,transport=dt_socket,address= 4000,suspend=y

These options tell the container to allow debugging, accept connections from the debugger on port 4000 and to suspend the launching of the container until the debugger has connected.

You then create a new 'Remote Java Application' configuration in the 'Debug Configurations' (from the 'Debug' button) and specify the same port (4000) you configured the container to accept debug connections on.

Finally in setting up the 'Remote Java Application' debug configuration, be sure to click on the 'Sources' tab to make sure the source code for your app is included - this will allow the debugger to find your source code and let you step through it.

Not only does this set-up work in development - but it can be handy to temporarily turn debugging on if you're having problems with an application you've deployed to a server (as you can step-through your code in your debugger as your app runs on the server).

Cheers,

Jake


On 22/10/2008, at 11:05 AM, John Huss wrote:

So how do I launch a WO app in eclipse this way? Forgive me, I know almost nothing about servlets and all that jazz.

John

On Tue, Oct 21, 2008 at 1:04 PM, Jake MacMullin <email@hidden> wrote:
Yes you can debug from Eclipse. You just need to make sure you launch Jetty or whatever container with remote debugging enabled and then configure Eclipse to connect. I can't remember the sytax off hand, but googling eclipse jetty remote debug should turn it up :-)


Regards,

Jake


On 22/10/2008, at 4:58 AM, Henrique Prange <email@hidden> wrote:

Hi John,

John Huss wrote:
I know you can deploy a WO app into a Servlet container, but can you develop with it too?


Yes, you can. But I think rapid development mode will not work.

I mean, can I run and debug my WO app through a local instance of Tomcat (or something else)?

We use maven-jetty-plugin when we have to test or check if everything is fine with the WAR package. This way we can quickly verify application behaviors without having to deploy it into a production or development server. AFAIK, you can also configure the Jetty instance to debug code using Eclipse. I have never tried this kind of configuration, though.

Cheers,

Henrique

John
------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Development with a Servlet container (From: "John Huss" <email@hidden>)
 >Re: Development with a Servlet container (From: Henrique Prange <email@hidden>)
 >Re: Development with a Servlet container (From: Jake MacMullin <email@hidden>)
 >Re: Development with a Servlet container (From: "John Huss" <email@hidden>)

  • Prev by Date: Re: Development with a Servlet container
  • Next by Date: WO 5.4.3 from 5.3.3 --> things to look out for?
  • Previous by thread: Re: Development with a Servlet container
  • Next by thread: eclipse debugging help
  • Index(es):
    • Date
    • Thread