tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nigam,Shantul" <sni...@profilesys.com>
Subject RE: Having problems trying to setup debugging in IDE...
Date Thu, 06 Apr 2000 12:18:07 GMT
There were some changes to tomcat which make the code that IBM put out not
work with version 3.1. I am using JBuilder and to run Tomcat, I have to
include the libraries and use the following files to start and stop. These
were written by Ken Chan at Borland....

StartTomcat:

public class StartTomcat
{

  public StartTomcat()
  {
  }

  public static void main(String[] args)
  {
    org.apache.tomcat.startup.Tomcat.main(args);
  }
}

StopTomcat:

public class StopTomcat
{

  public StopTomcat()
  {
  }

  public static void main(String[] args)
  {
    org.apache.tomcat.startup.Tomcat.main(new String[]{"-stop"});
  }
}

You will also need to include the following in your class path:
jasper.jar
servlet.jar
webserver.jar
xml.jar

Good luck....

Shantul.

> -----Original Message-----
> From:	Timm, Sean [SMTP:STimm@mailgo.com]
> Sent:	Wednesday, April 05, 2000 10:31 PM
> To:	Tomcat-Dev (E-mail)
> Subject:	Having problems trying to setup debugging in IDE...
> 
> For those of you who don't want to read the following long-winded
> explanation, I'm trying to figure out how to get it so I can debug
> servlets
> using my IDE and using the Tomcat servlet engine.  I tried following some
> instructions posted on IBM's site for VisualAge (I'm using VisualCafe),
> and
> I got to a certain point, but I'm getting errors returned from Tomcat
> code.
> If anyone can provide me with some tips on how to make this work, I would
> *greatly* appreciate it.  We've been using ServletExec, but we just found
> out we need some functionality that only Servlet API 2.2 provides, so
> we're
> trying to switch everything over to Tomcat now.  However, we need the
> functionality provided by ServletExecDebugger, and the IBM article seems
> to
> explain exactly how to do that (but it doesn't seem to be working for
> me...:( )
> 
> I'm using VisualCafe 4.0 Expert Edition.  I've got a project set up with
> all
> of the directories from a fresh CVS build placed in the directory my
> project
> is located.  My main method calls Startup.main(args).  From here, I start
> having problems.  For my first problem, it was complaining that the Server
> tag was not declared.  I realized it was attempting to validate, but I
> noticed a comment in the code mentioned that server.xml shouldn't be
> validated yet, so I passed "-validate false" on the command-line.
> 
> When I try and run it with those parameters, I get further.  It loads the
> configuration info from server.xml, but I get the following debug output:
> <l:ctx path="/examples" >Add context</l:ctx>
> <l:addContext path="/examples"  docBase="null" />
> <l:ctx path="/test" >Add context</l:ctx>
> <l:addContext path="/test"  docBase="null" />
> <l:ctx path="" >Add context</l:ctx>
> <l:addContext path=""  docBase="null" />
> <l:startEndpoint port="0"
> handler="org.apache.tomcat.service.http.HttpConnectionHandler" />
> <l:startEndpoint port="8080"
> handler="org.apache.tomcat.service.http.HttpConnectionHandler" />
> <l:startEndpoint port="8007"
> handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler" />
> 
> Notice that docBase is null for some reason.  If I run Tomcat by itself
> using startup.bat, however, docBase shows up correctly.  I attempted
> various
> means of getting around this issue.  I can specify -docbase
> C:\MyProjectPath, but then I get a NullPointerException in
> Config.processArgs.  The problem code snippet is as follows:
> --------------------
>   String id =
>      (String)configElement.getAttribute(Constants.Attribute.Id);
> 
>   .........
> 
>   } else if (isArg(key) &&
>       (config.getElements().size() == 1 ||
>           (id.equals(getArg(Constants.Arg.ServiceId))))) {
>       configElement.addAttribute(key, getArg(key));
>   }
> --------------------
> 
> id is assigned as null, so the call to id.equals throws an Exception.
> 
> So I did some more digging, and I think that it was printing out using
> context.getDocumentBase, but it should be using context.getDocBase.
> 
> I'm kind of stumped where to go from here.  I experimented with having
> setDocumentBase also update setDocBase, but that didn't seem to help any.
> When I try and go to http://localhost:8080/, I receive a hit because I get
> an error in the debug output as follows:
> --------
> <l:tc>Error reading request null</l:tc>
> --------
> 
> Once again, if anyone can assist me, I'd greatly appreciate it.  I've been
> trying to dig through the FAQs, documentation, and mailing archives, but I
> have yet to come up with anything substantial that can help.  We've got
> the
> Tomcat server up and running...just need to get it so we can debug now!
> 
> Thanks in advance,
> Sean T.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 

Mime
View raw message