Re: jbuilder - setting tomcat.home

2001-03-29 Thread Heather Marie Buch

Scott Sanders wrote:
 
  -Dtomcat.home=/var/local/jbuilder4/tomcat
 
  Then I try to step through again and get this:
 
  /var/local/jbuilder4/jdk1.3/bin/java -classpath
  
"/var/local/jbuilder4/tomcat/lib/webserver.jar:/var/local/jbuilder4/tomcat/lib/jasper.jar:/var/local/jbuilder4/tomcat/lib/xml.jar:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/lib/webserverglue.jar:/var/local/jbuilder4/jbproject/okapi_servlets/classes:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/jdk1.3/jre/lib/javaplugin.jar:/var/local/jbuilder4/jdk1.3/jre/lib/i18n.jar:/var/local/jbuilder4/jdk1.3/jre/lib/ext/indicim.jar:/var/local/jbuilder4/jdk1.3/jre/lib/rt.jar:/var/local/jbuilder4/jdk1.3/lib/tools.jar:/var/local/jbuilder4/jdk1.3/lib/dt.jar:/var/local/jbuilder4/jdk1.3/demo/jfc/Java2D/Java2Demo.jar"
  -Dtomcat.home=/var/local/jbuilder4/tomcat -Xdebug -Xnoagent
  -Djava.compiler=NONE
  -Xrunjdwp:transport=dt_socket,address=myhost@mydomain:1543,suspend=y
  org.apache.tomcat.startup.Tomcat -config /conf/server8080.xml
  FATAL: configuration error
  java.lang.Exception: Can't open config file: /conf/server8080.xml due
  to: java.io.FileNotFoundException: /conf/server8080.xml (No such file or
  directory)
at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
 
 
 
  it just put -Dtomcat.home in as another java parameter, but it looks
  like org.apache.tomcat.startup.Tomcat still can't see it because it
  still looks for server8080.xml in "/". Has anyone had this problem? Is
  there a remedy?
 
  Thanks!
 
 I don't use the JSP/servlet page, as I defined and use my own copy of
 Tomcat (3.2.1).  In the VM Parameters, I have:
-Xms256m -Xmx256m -Dtomcat.home=e:\dev\java\jakarta-tomcat-3.2.1
 and that works just fine.
 
 Note that I only define tomcat.home and not where the conf file is
 located.  My run class is org.apache.tomcat.startup.Tomcat
 
 Are you using the Tomcat that shipped with JBuilder??


First of all, thanks, Scott, for the helpful advice about Tomcat. I
tried specifying
-Dtomcat.home as my own 3.2.1 installation as well, but JBuilder didn't
like that.

Overall, I am having a very frustrating time trying to get JBuilder
Enterprise
4.0 to debug my servlets.  For the past three days I have been trying to
do so
using the version of Tomcat that comes with JBuilder.

I will try to explain my experiences  over the past three days. Forgive
me if
I don't get all the terms right. I am at home and do not have my
environment
in front of me right now. I will refer to my own installation of Tomcat
3.2.1
as "my Tomcat," and the version that shipped with JBuilder as
"JBuilder-Tomcat"

I only began to have some sucess today, when I imported the
JBuilder-Tomcat
.jar files (webserver.jar, xml.jar, and jasper.jar) into my project. I
then
went to run/applications and choose org.apache.whatever.startup.Tomcat
as my
start-up file. I set my docBase as the JBuilder-Tomcat home, and my
context
path as the directory I would like to see in the url to the servlet..
What I
understand is that this enables me to debug JBuilder-Tomcat, and then
debug 
my servlet within JBuilder-Tomcat.

What I did today worked in a very limited way.  Sometimes JBuilder would
begin
to step through a servlet, but more frequently the debugger would hang
with a
FileNotFoundException  that it was trying to look for web.xml in
tomcat.home/WEB-INF/web.xml. I never specified tomcat.home/WEB-INF
anywhere
because it obviously doesn't exist, so I dont' know where JBuilder was
getting
that path.

I am wondering if I should waste any more time trying to get debugging
to 
work with JBuilder-Tomcat. I would love to just be able to debug with my
Tomcat. I guess the way to do this would be to add my Tomcat in project
profile - run - servlet/jsp. But I don't understand how it could work.
My
Tomcat doesn't have the webserver.jar file. Isn't that needed to begin
debugging servlets? The only .jar files in the lib directory of my
Tomcat are
ant.jar, and servlet.jar. How can I debug with a version of Tomcat that
doesn't even have webserver.jar? Still, if anyone can recommend a way to
add
my own Tomcat to JBuilder so that it works for debgging servlets, I
would be
ecstatic.

The one other thing that I am wondering about is this: 

Since I can debug Java classes, could I write a class that imported the
javax.http.whatever packages (the ones that contain HttpRequest and
HttpResponse), and then just include a little method that called my
servlet's
doGet or doPost method, and passed it the right parameters? Please stop
me
right here if you know that this would never work. I don't know if you
can
write a "class" that imports those servlet packages, or if anything that
imports those packages needs to be a servlet.


Any answers, help, or jokes that could make me laugh would be
appreciated.

Thanks,

Heather Buch
-- 

jbuilder - setting tomcat.home

2001-03-28 Thread Heather M. Buch

Hi. I know this has been hashed over already, but I am having trouble
setting tomcat.home from jbuilder, and therefore debugging servlets.


When I attempt to set a breakpoint and step into a servlet, jbuilder
gives me this message:



/var/local/jbuilder4/jdk1.3/bin/java -classpath
"/var/local/jbuilder4/tomcat/lib/webserver.jar:/var/local/jbuilder4/tomcat/lib/jasper.jar:/var/local/jbuilder4/tomcat/lib/xml.jar:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/lib/webserverglue.jar:/var/local/jbuilder4/jbproject/okapi_servlets/classes:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/jdk1.3/jre/lib/javaplugin.jar:/var/local/jbuilder4/jdk1.3/jre/lib/i18n.jar:/var/local/jbuilder4/jdk1.3/jre/lib/ext/indicim.jar:/var/local/jbuilder4/jdk1.3/jre/lib/rt.jar:/var/local/jbuilder4/jdk1.3/lib/tools.jar:/var/local/jbuilder4/jdk1.3/lib/dt.jar:/var/local/jbuilder4/jdk1.3/demo/jfc/Java2D/Java2Demo.jar"
   
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=myhost@mydomain:1498,suspend=y
org.apache.tomcat.startup.Tomcat -config /conf/server8080.xml
FATAL: configuration error
java.lang.Exception: Can't open config file: /conf/server8080.xml due
to: java.io.FileNotFoundException: /conf/server8080.xml (No such file or
directory)
at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)


it looks for server8080.xml in "/". I guess this is because TOMCAT_HOME
is not set.

So, I go into Project Properties - Run - JSP/Servlet - VM Parameters,
and do:

-Dtomcat.home=/var/local/jbuilder4/tomcat

Then I try to step through again and get this:

/var/local/jbuilder4/jdk1.3/bin/java -classpath
"/var/local/jbuilder4/tomcat/lib/webserver.jar:/var/local/jbuilder4/tomcat/lib/jasper.jar:/var/local/jbuilder4/tomcat/lib/xml.jar:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/lib/webserverglue.jar:/var/local/jbuilder4/jbproject/okapi_servlets/classes:/var/local/jbuilder4/lib/servlet.jar:/var/local/jbuilder4/jdk1.3/jre/lib/javaplugin.jar:/var/local/jbuilder4/jdk1.3/jre/lib/i18n.jar:/var/local/jbuilder4/jdk1.3/jre/lib/ext/indicim.jar:/var/local/jbuilder4/jdk1.3/jre/lib/rt.jar:/var/local/jbuilder4/jdk1.3/lib/tools.jar:/var/local/jbuilder4/jdk1.3/lib/dt.jar:/var/local/jbuilder4/jdk1.3/demo/jfc/Java2D/Java2Demo.jar"
  
-Dtomcat.home=/var/local/jbuilder4/tomcat -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=myhost@mydomain:1543,suspend=y
org.apache.tomcat.startup.Tomcat -config /conf/server8080.xml
FATAL: configuration error
java.lang.Exception: Can't open config file: /conf/server8080.xml due
to: java.io.FileNotFoundException: /conf/server8080.xml (No such file or
directory)
at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)



it just put -Dtomcat.home in as another java parameter, but it looks
like org.apache.tomcat.startup.Tomcat still can't see it because it
still looks for server8080.xml in "/". Has anyone had this problem? Is
there a remedy?

Thanks!

Heather Buch