Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Running Apache-Tomcat in eclipse
Running Apache-Tomcat in eclipse [message #277588] Mon, 13 December 2004 22:01 Go to next message
Eclipse UserFriend
Originally posted by: farshad.intelliresponse.com

Hi All,

I have an application running in a apache-tomcat environment. Apache is in
front for authentication/static pages/etc. and tomcat does all the job.
They talk to each other via mod_JK2. Both apache and tomcat are defined as
separate services in Windows and run via a shell-script. I call the script
as an External-tools and it runs fine and I can run my application in a
browser. However, when I want to debug the application and put breakpoints
to stop the app in certain points, it keeps running (same as it runs
normally) to the end. I wrote another application and used only tomcat
(running inside eclipse) and was able to debug that application with no
problem.

My Questions:
Is there any way that I define a Windows service as the External-tool?
Is it possible to setup Apache (the same way that we define app-servers in
Eclipse) in Eclipse?

Thanks in advance.
Re: Running Apache-Tomcat in eclipse [message #277589 is a reply to message #277588] Mon, 13 December 2004 23:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jiaqi.evavi.com

Hi Farshad,

To make the code debuggable, eclipse has to somehow understand the code.
So if the application is started by windows services, eclipse won't know
the application at all. It has to be eclipse that starts your application.

What I am doing to debug webapp in tomcat could be a little bit
different but I believe it's the most efficient way. My solution is:

Prepare a runtime tomcat environment like

\<runtime env>
+ conf\
+ server.xml
+ tomcat-users.xml
+ logs\
+ webapps\

Add <tomcat dir>\bin\bootstrap.jar into classpath
Start application with

org.apache.catalina.startup.Bootstrap -Dcatalina.home=<tomcat dir>
-Dcatalina.base=<runtime env> start

If tomcat is started properly, you will be able to debug the code now.




Regards
Jiaqi




farshad wrote:
> Hi All,
>
> I have an application running in a apache-tomcat environment. Apache is
> in front for authentication/static pages/etc. and tomcat does all the
> job. They talk to each other via mod_JK2. Both apache and tomcat are
> defined as separate services in Windows and run via a shell-script. I
> call the script as an External-tools and it runs fine and I can run my
> application in a browser. However, when I want to debug the application
> and put breakpoints to stop the app in certain points, it keeps running
> (same as it runs normally) to the end. I wrote another application and
> used only tomcat (running inside eclipse) and was able to debug that
> application with no problem.
>
> My Questions:
> Is there any way that I define a Windows service as the External-tool?
> Is it possible to setup Apache (the same way that we define app-servers
> in Eclipse) in Eclipse?
>
> Thanks in advance.
>
Re: Running Apache-Tomcat in eclipse [message #277600 is a reply to message #277588] Tue, 14 December 2004 07:48 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.rohe.stud.tu-ilmenau.de

I use a startup-script for tomcat, too. I've taken the script
"startup-tomcat.cmd" from tomcat_home/bin and added the following lines, so
the JVM in which tomcat lives will start with debugging support.

:doneSetArgs

set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000

call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

:end

Here you can see that there are two new variables (JPDA_TRANSPORT and
JPDA_ADDRESS) and the command for starting tomcat contains a new attribute
(jpda). These variables can also be applied to the tomcat Windows service
through the start menu "Configure Tomcat".
When you start tomcat with this script you can debug your web application
with external debugging in eclipse. I also use an Ant build file which
creates an exploded web archiv (directory with web application layout) and I
map the context in tomcat to this directory, so I can make "hot code
replacement".

Greetings
Daniel

"farshad" <farshad@intelliresponse.com> schrieb im Newsbeitrag
news:cpl3gb$d1$1@www.eclipse.org...
> Hi All,
>
> I have an application running in a apache-tomcat environment. Apache is in
> front for authentication/static pages/etc. and tomcat does all the job.
> They talk to each other via mod_JK2. Both apache and tomcat are defined as
> separate services in Windows and run via a shell-script. I call the script
> as an External-tools and it runs fine and I can run my application in a
> browser. However, when I want to debug the application and put breakpoints
> to stop the app in certain points, it keeps running (same as it runs
> normally) to the end. I wrote another application and used only tomcat
> (running inside eclipse) and was able to debug that application with no
> problem.
>
> My Questions:
> Is there any way that I define a Windows service as the External-tool?
> Is it possible to setup Apache (the same way that we define app-servers in
> Eclipse) in Eclipse?
>
> Thanks in advance.
>
Previous Topic:disable plugin at runtime
Next Topic:Context menus in Table Header
Goto Forum:
  


Current Time: Wed Jul 17 19:50:28 GMT 2024

Powered by FUDForum. Page generated in 0.04200 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top