You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Neeme Praks <ne...@one.ee> on 2001/05/23 14:12:49 UTC

Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?

Is there anyone out there who has gotten Tomcat 3.3 or 4.0 working under
Netbeans 3.2 IDE?
It doesn't have to be very integrated with the IDE, I just want to debug my
servlets, no JSP or anything...

I tried, but due to the new (pretty advanced) classloading scheme, I'm not
sure how to accomplish this...

Can someone give some hints? Petr?

Neeme


Help Anyone

Posted by Joco Lopes <jo...@santander.pt>.
I have written a Java app to change messages with an IBM server.
Here´s how it works: it receives a set of parameters and makes a byte array
that is sent via TCP/IP to the IBM server.
If the message is accepted by the server a few seconds latter I get a
repply.

I have installed TomCat and it´s working great.
Now here is what I would like to do (ANY HELP IS WELCOME):

Create a JSP page where a user can insert some strings. Then send this
strings to a bean.
Now I would like my IBM Java app  to go to the bean and get the stored
values.
Then I need it to run and get the reply from the server.
After getting the reply from the IBM server I would store the results on a
bean.
Then I would send the stored IBM results back up to the Tomcat client.

Here is where I am right now:

the IBM java app is up and running. It is able to change messages with the
IBM server.

on the upper level I have been able to write JSP files deposit string values
(inserted by the user) on a bean.

I also am able to get those values.

Now here is where I really need expert help:

How can I run my java IBM app after depositing the values on the bean, and
how can I send a reply up after getting a result from the IBM server??

Here is a ascii-matic:

TomCat Client -> TomCat -> Bean

now I woud go to the bean and do this:

Bean -> Ibm Java App -> TCP/IP to IBM (send)

then I would get a reply from the IBM server and leave the reply on another
bean:

Bean <- Ibm Java App <- TCP/IP to IBM (receive)

And again back to the Tomcat client with a reply:

TomCat Client <- TomCat <- Bean

Again any kind help is welcome because I am doing this alone and I really
need help.
Thanks in advance.

John


Re: Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?

Posted by Petr Jiricka <pe...@czech.sun.com>.
Neeme,

I didn't try myself, but the basic scheme for debugging servlets is the
following:

1) Modify the Tomcat startup script so JVM runs in the debugging mode - we
use something like the following:

C:\jdk1.3.1\jre\..\bin\java -classic -Xdebug -Xnoagent -Xrunjdwp:transport=d
t_socket,address=pjiricka-ws:1180,suspend=y -Djava.compiler=NONE
"-Xbootclasspath:C:\jdk1.3.1\jre\..\lib\tools.jar;C:\jdk1.3.1\jre\lib\rt.jar
;C:\jdk1.3.1\jre\lib\i18n.jar;C:\jdk1.3.1\jre\lib\sunrsasign.jar;C:\jdk1.3.1
\jre\classes;"   ..etc,

but this may differ based on your platform, JDK version etc. This involves a
bit of magic, so you may have to play with it a bit.

2) Set breakpoints in the IDE where you want them

3) In NetBeans, choose Debug -> Attach, and in the "Attach" dialog choose
Default Debugger (JPDA), SocketAttach, and port=1180 (the number you gave to
the VM in the Xrunjdwp parameter.

4) Invoke requests from your web browser, the debugger should stop on the
breakpoint.

Of course there are many possible combinations, like you can use the JDK 1.1
debugging architecture (which is not as stable as JPDA, though), you can use
shared memory access, etc.

There is a good overview of possible options at
http://java.sun.com/products/jpda/doc/conninv.html .

I hope this helps.

Petr


----- Original Message -----
From: "Neeme Praks" <ne...@one.ee>
To: <to...@jakarta.apache.org>
Sent: Wednesday, May 23, 2001 2:12 PM
Subject: Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?


>
> Is there anyone out there who has gotten Tomcat 3.3 or 4.0 working under
> Netbeans 3.2 IDE?
> It doesn't have to be very integrated with the IDE, I just want to debug
my
> servlets, no JSP or anything...
>
> I tried, but due to the new (pretty advanced) classloading scheme, I'm not
> sure how to accomplish this...
>
> Can someone give some hints? Petr?
>
> Neeme
>


RE: Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?

Posted by Neeme Praks <ne...@one.ee>.
ok, nevermind, I already found some help for this:
http://www.netbeans.org/www-nbusers/msg06837.html

Neeme

> -----Original Message-----
> From: Neeme Praks [mailto:neeme.praks@one.ee]
> Sent: Wednesday, May 23, 2001 3:13 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?
> 
> 
> 
> Is there anyone out there who has gotten Tomcat 3.3 or 4.0 
> working under
> Netbeans 3.2 IDE?
> It doesn't have to be very integrated with the IDE, I just 
> want to debug my
> servlets, no JSP or anything...
> 
> I tried, but due to the new (pretty advanced) classloading 
> scheme, I'm not
> sure how to accomplish this...
> 
> Can someone give some hints? Petr?
> 
> Neeme