Home » Language IDEs » Java Development Tools (JDT) » Debugging Tomcat Application
Debugging Tomcat Application [message #103020] |
Fri, 10 October 2003 07:11  |
Eclipse User |
|
|
|
Originally posted by: pariani.inwind.it
Hi,
i'm a new user of Eclipse.
I find Eclipse a very powerfull tool, but i'm trying to configure it for
debug web application with jsp and servlet in Tomcat.
Is there an article that explains how to configure Eclipse and how to
debug this kind of application ?
can you help me ? :)
thank you very much...
Paolo
|
|
| |
Re: Debugging Tomcat Application [message #103372 is a reply to message #103020] |
Sun, 12 October 2003 02:23   |
Eclipse User |
|
|
|
Originally posted by: kk.dev.null
Paolo Pariani wrote:
> Hi,
> i'm a new user of Eclipse.
> I find Eclipse a very powerfull tool, but i'm trying to configure it for
> debug web application with jsp and servlet in Tomcat.
>
> Is there an article that explains how to configure Eclipse and how to
> debug this kind of application ?
>
You need special tools to debug jsp inside Eclipse. I've not used
any of them, as I always use the latest version (or sometimes, the
nightly builds), and the tools just can't keep up with that.
But debugging servlet is just working fine without any tool, all
you have to do is to set up Eclipse to connect "remotely" to Tomcat.
You need to start tomcat with the jpda option
./catalina.sh jpda run
Then click on the little bug icon to bring the debug config dialog.
Create a new configuration of "Remote Java Application", and put
the hostname of the machine where tomcat is running on, and the port
number (default is 8000).
Then you can just start debugging servlet just like any java code.
I believe you can actually debug jsp inside Eclipse without any
special tool too, but so far, I still haven't figured out how :)
|
|
|
Re: Debugging Tomcat Application [message #104256 is a reply to message #103372] |
Tue, 14 October 2003 06:57   |
Eclipse User |
|
|
|
Originally posted by: pariani.inwind.it
i use w2k professional,
i tried to do what you told me, but tomcat don't start anymore
i launched: "startup.bat jpda run" but tomcat don't start
what is the error ?
thanks you very much...
Paolo
"kk" <kk@dev.null> ha scritto nel messaggio news:bmas2m$5et$1@eclipse.org...
> Paolo Pariani wrote:
> > Hi,
> > i'm a new user of Eclipse.
> > I find Eclipse a very powerfull tool, but i'm trying to configure it for
> > debug web application with jsp and servlet in Tomcat.
> >
> > Is there an article that explains how to configure Eclipse and how to
> > debug this kind of application ?
> >
>
> You need special tools to debug jsp inside Eclipse. I've not used
> any of them, as I always use the latest version (or sometimes, the
> nightly builds), and the tools just can't keep up with that.
>
> But debugging servlet is just working fine without any tool, all
> you have to do is to set up Eclipse to connect "remotely" to Tomcat.
> You need to start tomcat with the jpda option
>
> ./catalina.sh jpda run
>
> Then click on the little bug icon to bring the debug config dialog.
> Create a new configuration of "Remote Java Application", and put
> the hostname of the machine where tomcat is running on, and the port
> number (default is 8000).
>
> Then you can just start debugging servlet just like any java code.
>
> I believe you can actually debug jsp inside Eclipse without any
> special tool too, but so far, I still haven't figured out how :)
>
|
|
|
Re: Debugging Tomcat Application [message #104406 is a reply to message #104256] |
Tue, 14 October 2003 11:20   |
Eclipse User |
|
|
|
try
catalina.bat jpda start
"Paolo Pariani" <pariani@inwind.it> wrote in message
news:bmgkp6$5cd$1@eclipse.org...
> i use w2k professional,
> i tried to do what you told me, but tomcat don't start anymore
>
> i launched: "startup.bat jpda run" but tomcat don't start
> what is the error ?
>
> thanks you very much...
> Paolo
>
> "kk" <kk@dev.null> ha scritto nel messaggio
news:bmas2m$5et$1@eclipse.org...
> > Paolo Pariani wrote:
> > > Hi,
> > > i'm a new user of Eclipse.
> > > I find Eclipse a very powerfull tool, but i'm trying to configure it
for
> > > debug web application with jsp and servlet in Tomcat.
> > >
> > > Is there an article that explains how to configure Eclipse and how to
> > > debug this kind of application ?
> > >
> >
> > You need special tools to debug jsp inside Eclipse. I've not used
> > any of them, as I always use the latest version (or sometimes, the
> > nightly builds), and the tools just can't keep up with that.
> >
> > But debugging servlet is just working fine without any tool, all
> > you have to do is to set up Eclipse to connect "remotely" to Tomcat.
> > You need to start tomcat with the jpda option
> >
> > ./catalina.sh jpda run
> >
> > Then click on the little bug icon to bring the debug config dialog.
> > Create a new configuration of "Remote Java Application", and put
> > the hostname of the machine where tomcat is running on, and the port
> > number (default is 8000).
> >
> > Then you can just start debugging servlet just like any java code.
> >
> > I believe you can actually debug jsp inside Eclipse without any
> > special tool too, but so far, I still haven't figured out how :)
> >
>
>
|
|
|
Re: Debugging Tomcat Application [message #104718 is a reply to message #103372] |
Tue, 14 October 2003 17:51   |
Eclipse User |
|
|
|
It is not all that difficult to debug JSP inside Eclipse without using a
plugin. This is what I did. My project is called jsp_test.
I created a directory called work under my project root in Eclipse.
(D:\eclipse\workspace\jsp_test\work). Added this as a source directory
(right click on project - Properties - Java Build Path - Source - Add
Folder). Then I created 'org/apache' directory structure in 'work'.
Next I modified server.xml and added a Context tag
<Context path="/jsp_test" docBase="jsp_test" debug="0"
reloadable="true" crossContext="true"
workDir="D:/eclipse/workspace/jsp_test/work/org/apache">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_examples_log." suffix=".txt"
timestamp="true"/>
Please note the value of workDir attribute. Basically I told Tomcat
where to place generated Servlet.
I put my JSP files in TOMCAT_HOME/webapps/jsp_test/jsp. I start Tomcat
from within Eclipse by creating a new runtime configuration with the
following attributes
Main class : org.apache.catalina.startup.Bootstrap
Program arguments : start
VM arguments: -Dcatalina.home=D:/jakarta-tomcat-4.1.27
Classpath : all jars in TOMCAT_HOME/bin,TOMCAT_HOME/server/lib.
The first time you access the JSP the Servlet is created. Refresh the
project files (right on project - Refresh) to load the generated Servlet
code into Eclipse. Now you can place a breakpoint anywhere in the code.
The downside to this method is that you can't debug your JSP the first
time you access it as there is no Servlet source code available.
Please let me know if there is a better way of debugging JSPs (without a
plugin) in Eclipse.
regards
vinod.
kk wrote:
> Paolo Pariani wrote:
>
>> Hi,
>> i'm a new user of Eclipse.
>> I find Eclipse a very powerfull tool, but i'm trying to configure it for
>> debug web application with jsp and servlet in Tomcat.
>>
>> Is there an article that explains how to configure Eclipse and how to
>> debug this kind of application ?
>>
>
> You need special tools to debug jsp inside Eclipse. I've not used
> any of them, as I always use the latest version (or sometimes, the
> nightly builds), and the tools just can't keep up with that.
>
> But debugging servlet is just working fine without any tool, all
> you have to do is to set up Eclipse to connect "remotely" to Tomcat.
> You need to start tomcat with the jpda option
>
> ./catalina.sh jpda run
>
> Then click on the little bug icon to bring the debug config dialog.
> Create a new configuration of "Remote Java Application", and put
> the hostname of the machine where tomcat is running on, and the port
> number (default is 8000).
>
> Then you can just start debugging servlet just like any java code.
>
> I believe you can actually debug jsp inside Eclipse without any
> special tool too, but so far, I still haven't figured out how :)
>
|
|
|
Re: Debugging Tomcat Application [message #109616 is a reply to message #103049] |
Thu, 23 October 2003 15:22   |
Eclipse User |
|
|
|
I'm trying to use Eclipse 3.0M3 and the 2.1.1 Sysdeo plugin to
debug several JSP web apps which share a common bunch of
application and session beans.
I can work on a single app just fine, with the bean sources in
WEB-INF/src etc, but I'm having trouble pulling them out into a
separate project; how should I refer to them so that Tomcat is
able to start them on demand? I can get everything to build
OK but Tomcat wants to instantiate them dynamically and can't
find them...
(also I'd like to be able to export WAR files which contain the
bean .class files in WEB-INF/classes, or JARred in WEB-INF/lib)
regards
Paul Singleton
----
Horváth, Csaba wrote:
> Hi,
>
> You should use a plugin that provides running and debugging a Tomcat app. My
> favourite one is the Sysdeo Tomcat plugin
> (http://www.sysdeo.com/eclipse/tomcatPlugin.html). With this plugin you can
> manage Tomcat servers within Eclipse (and you can debug your webapp as
> well).
>
> HTH,
> Regards,
> Csaba
>
> "Paolo Pariani" <pariani@inwind.it> wrote in message
> news:bm645p$ksb$1@eclipse.org...
>
>>Hi,
>>i'm a new user of Eclipse.
>>I find Eclipse a very powerfull tool, but i'm trying to configure it for
>>debug web application with jsp and servlet in Tomcat.
>>
>>Is there an article that explains how to configure Eclipse and how to
>>debug this kind of application ?
>>
>>can you help me ? :)
>>
>>thank you very much...
>>Paolo
>>
>
>
>
|
|
|
Re: Debugging Tomcat Application [message #111791 is a reply to message #104718] |
Wed, 29 October 2003 19:56  |
Eclipse User |
|
|
|
Originally posted by: suchi_834.yahoo.com
Hi
I am unable to start Tomcat withing Eclipse using Sysdeo Eclipse Tomcat
plugin.
When I Click start Tomcat icon on Toolbar"Java Virtual Machine Launcher "
window is opened which says "Couldn't find main class.Program will exit".
When i run Tomcat outside normally it works fine.
once after i make changes to Tomcat Project which i created in Eclipse,
then i am unable to start Standalone Tomcat server too..
Can anyone please Tell me in steps what to do to start Tomcat within
Eclipse as i am new to this . if there's any problem with plugin please
let me know.
Iam using
JDK-1.4
Eclipse-2.1.1
Tomcat-4.1.27
EclipseTomcatplugin-2.2.beta
Any Help?
Thanks in advance.
|
|
|
Goto Forum:
Current Time: Sat May 10 14:32:00 EDT 2025
Powered by FUDForum. Page generated in 0.04098 seconds
|