You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Craig R. McClanahan" <Cr...@eng.sun.com> on 2000/08/08 18:41:21 UTC

Re: Where are my jar files and what's the difference between the different directories in Tomcat source???

Stefán Freyr Stefánsson wrote:

> Hello...
>
> I'm having a hard time understanding this thing here...
>
> I've downloaded the Ant tool and the source of Tomcat.  I've run "build.bat"
> and after a few modifications and additions (had to create a JAVA_HOME
> environment variable and add an XML implementation to my setup) the tomcat
> builds allright and it even runs!
>

The detailed steps required to build from source are outlined in the
README file
in the top-level directory.

>
> The problem is that I can't find the jar files I was told I'd have
> (webserver.jar, jasper.jar and server.jar).  I want to integrate tomcat into
> one of my projects and use the webserver and jsp/servlet engine in it...
> that's why I'm doing this and I need the jar files... but as I said... they
> are nowhere to be found... I've searched the whole drive and nothing...
>

The default build target creates an "unpacked" directory structure in
"../build/tomcat".  If you want a distribution build (i.e. like the ones
you can
download), do this instead:

    ./build.sh dist    <-- Unix
    build dist          <-- Windows

and the results will be placed in "../dist/tomcat".

>
> I posted a question to this list a while ago asking about pointers for
> stripping tomcat... that is, I only wanted the java files neccesary... no
> native code and such.  I got one answer to that... and that was to build it
> and use the aforementioned jar files... I expect them to only have the class
> files so it's not exactly what I wanted but it's better than nothing... But
> I still would like to get some information about all the different
> directories within the Tomcat source.... I mean, I have found the same
> package names in more than one place and even the same java files under
> different directories.. I'm confused as to which one is used and such since
> I'm trying to put this in a nice JBuilder project.  The reason for that
> being that I want to modify it a little before I integrate it into my
> project.. (add SSL support to the internal HTTP server and such).
>

The "proposals/catalina" directory is a completely separate code base
that will
be proposed in the future to become the servlet container in Tomcat
4.0.  Ignore
it for now if you are interested in Tomcat 3.2.

Other than that, the best way to learn how the source is organized is to
become
familiar with the Ant tool, and be able to at least read the "build.xml"
script.  Then you will get a good feel for where things are compiled
from, and
where they end up.  I cannot imagine that it would be particularly easy
to adapt
the existing build process to an IDE tool -- you might be better off
creating a
custom build target in build.xml that creates what you want, and then
importing
the resulting JAR file.

By the way, built-in support for SSL is already possible -- example
configuration is commented out in $TOMCAT_HOME/conf/server.xml.

>
> I hope someone can help me with this... as always, anything is greatly
> appreciated.
>
> Thanks, Stefan Freyr
>
>

Craig McClanahan

Re: SSL and Tomcat

Posted by Russ White <ru...@earthlink.net>.
3.2b2 already has SSL capability.
Check server.xml for more details.

Russ White
----- Original Message -----
From: "Derek DeMoro" <dd...@home.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, August 09, 2000 1:31 PM
Subject: SSL and Tomcat


> Hello All,
>      I have a question about tomcats use of JSSE.  Are we going to have
the
> ability to assign ssl
> to specific contexts inside the Server.xml file?
>
> Thank You,
> Derek DeMoro
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


SSL and Tomcat

Posted by Derek DeMoro <dd...@home.com>.
Hello All,
     I have a question about tomcats use of JSSE.  Are we going to have the
ability to assign ssl
to specific contexts inside the Server.xml file?

Thank You,
Derek DeMoro



Re: Where are my jar files and what's the difference between the different directories in Tomcat source???

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Stefán Freyr Stefánsson wrote:

> Hello Mr. McClanahan and thanks for your very informative answer.
>
> I'm sorry to bother you again with this, I realize you must be a very busy
> guy so I'll try to keep this as short as possible.
>
> I've looked at the server.xml file and I do not find anything that could
> possibly relate to SSL support for the internal web browser in tomcat.  If
> you could give me some more information about that I would greatly
> appreciate it.  I'll paste my server.xml file in here at the end of this
> message.
>

I should have been more specific -- SSL support is documented in the server.xml
file in Tomcat 3.2b2.  There is a section of commented out text in the standard
"server.xml" file that starts "Uncomment this for SSL support."

>
> Also I was wondering how it would go when I need to integrate this into
> another application... so that when that application starts up the webserver
> (with SSL support) also starts up and everything is set.  Would I simply do
> the following in code:
>
>     try
>     {
>         Tomcat tomcat=new Tomcat();
>         tomcat.execute( args );
>     }
>     catch(Exception ex)
>     {
>         System.out.println(sm.getString("tomcat.fatal") + ex );
>         ex.printStackTrace();
>     }
>
> (Taken directly from Tomcat.java)
>
> Would that then start up an SSL web server... given, of course, that my
> server.xml file is correct?
>

This is one way to do it.  Be sure you set the "tomcat.home" property to point
at your TOMCAT_HOME directory, if you want to use relative pathnames.  What you
are essentially trying to do is emulate what the "tomcat.sh" script does to set
up the environment in which Tomcat runs.

Another approach is to look at the org.apache.tomcat.startup.EmbededTomcat (sic)
class, which can give you a little more programmatic control over what gets
configured.  Using this approach, you would essentially be replacing server.xml
with hard coded instantiations of the appropriate connectors, interceptors, and
so on.

>
> I hope I'm not bothering you too much and I hope you can give me an answer
> to these two questions I have.
>
> Thank you...
> Kind regards from Iceland, Stefan Freyr Stefansson.
>

Craig McClanahan



RE: Where are my jar files and what's the difference between the different directories in Tomcat source???

Posted by Stefán Freyr Stefánsson <st...@decode.is>.
Hello Mr. McClanahan and thanks for your very informative answer.

I'm sorry to bother you again with this, I realize you must be a very busy
guy so I'll try to keep this as short as possible.

I've looked at the server.xml file and I do not find anything that could
possibly relate to SSL support for the internal web browser in tomcat.  If
you could give me some more information about that I would greatly
appreciate it.  I'll paste my server.xml file in here at the end of this
message.

Also I was wondering how it would go when I need to integrate this into
another application... so that when that application starts up the webserver
(with SSL support) also starts up and everything is set.  Would I simply do
the following in code:

    try
    {
        Tomcat tomcat=new Tomcat();
        tomcat.execute( args );
    }
    catch(Exception ex)
    {
        System.out.println(sm.getString("tomcat.fatal") + ex );
        ex.printStackTrace();
    }

(Taken directly from Tomcat.java)

Would that then start up an SSL web server... given, of course, that my
server.xml file is correct?

I hope I'm not bothering you too much and I hope you can give me an answer
to these two questions I have.

Thank you...
Kind regards from Iceland, Stefan Freyr Stefansson.

p.s. here's the server.xml file I have:

   ---begin---

<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>
    <!-- Debug low-level events in XmlMapper startup -->
    <xmlmapper:debug level="0" />

    <!-- This is quite flexible; we can either have a log file per
         module in Tomcat (example: ContextManager) or we can have
         one for Servlets and one for Jasper, or we can just have
	 one tomcat.log for both Servlet and Jasper.

	 If you omit "path" there, then stderr should be used.

	 verbosityLevel values can be:
	    FATAL
	    ERROR
	    WARNING
            INFORMATION
            DEBUG
         -->

    <Logger name="tc_log"
            path="logs/tomcat.log"
            customOutput="yes" />

    <Logger name="servlet_log"
            path="logs/servlet.log"
            customOutput="yes" />

    <Logger name="JASPER_LOG"
	    path="logs/jasper.log"
            verbosityLevel = "INFORMATION" />

    <!-- Add "home" attribute if you want tomcat to be based on a different
directory
         "home" is used to create work and to read webapps, but not for libs
or CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->
    <ContextManager debug="0" workDir="work" >
        <!-- ContextInterceptor
className="org.apache.tomcat.context.LogEvents" / -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup"
/>
        <ContextInterceptor
className="org.apache.tomcat.context.DefaultCMSetter" />
        <ContextInterceptor
className="org.apache.tomcat.context.WorkDirInterceptor" />
        <ContextInterceptor
className="org.apache.tomcat.context.WebXmlReader" />
        <ContextInterceptor
className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
        <!-- Request processing -->
        <RequestInterceptor
className="org.apache.tomcat.request.SimpleMapper" debug="0" />
        <RequestInterceptor
className="org.apache.tomcat.request.SessionInterceptor" />
        <RequestInterceptor
className="org.apache.tomcat.request.SecurityCheck" />
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders"
/>

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" value="8080"/>
        </Connector>

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8007"/>
        </Connector>

        <!-- example - how to override AutoSetup actions -->
        <Context path="/examples" docBase="webapps/examples" debug="0"
reloadable="true" >
        </Context>
        <!-- example - how to override AutoSetup actions -->
        <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true"
>
        </Context>

        <Context path="/test" docBase="webapps/test" debug="0"
reloadable="true" >
        </Context>

    </ContextManager>
</Server>

   ---end---

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: 8. ágúst 2000 16:41
To: tomcat-dev@jakarta.apache.org
Subject: Re: Where are my jar files and what's the difference between
the different directories in Tomcat source???


Stefán Freyr Stefánsson wrote:

> Hello...
>
> I'm having a hard time understanding this thing here...
>
> I've downloaded the Ant tool and the source of Tomcat.  I've run
"build.bat"
> and after a few modifications and additions (had to create a JAVA_HOME
> environment variable and add an XML implementation to my setup) the tomcat
> builds allright and it even runs!
>

The detailed steps required to build from source are outlined in the
README file
in the top-level directory.

>
> The problem is that I can't find the jar files I was told I'd have
> (webserver.jar, jasper.jar and server.jar).  I want to integrate tomcat
into
> one of my projects and use the webserver and jsp/servlet engine in it...
> that's why I'm doing this and I need the jar files... but as I said...
they
> are nowhere to be found... I've searched the whole drive and nothing...
>

The default build target creates an "unpacked" directory structure in
"../build/tomcat".  If you want a distribution build (i.e. like the ones
you can
download), do this instead:

    ./build.sh dist    <-- Unix
    build dist          <-- Windows

and the results will be placed in "../dist/tomcat".

>
> I posted a question to this list a while ago asking about pointers for
> stripping tomcat... that is, I only wanted the java files neccesary... no
> native code and such.  I got one answer to that... and that was to build
it
> and use the aforementioned jar files... I expect them to only have the
class
> files so it's not exactly what I wanted but it's better than nothing...
But
> I still would like to get some information about all the different
> directories within the Tomcat source.... I mean, I have found the same
> package names in more than one place and even the same java files under
> different directories.. I'm confused as to which one is used and such
since
> I'm trying to put this in a nice JBuilder project.  The reason for that
> being that I want to modify it a little before I integrate it into my
> project.. (add SSL support to the internal HTTP server and such).
>

The "proposals/catalina" directory is a completely separate code base
that will
be proposed in the future to become the servlet container in Tomcat
4.0.  Ignore
it for now if you are interested in Tomcat 3.2.

Other than that, the best way to learn how the source is organized is to
become
familiar with the Ant tool, and be able to at least read the "build.xml"
script.  Then you will get a good feel for where things are compiled
from, and
where they end up.  I cannot imagine that it would be particularly easy
to adapt
the existing build process to an IDE tool -- you might be better off
creating a
custom build target in build.xml that creates what you want, and then
importing
the resulting JAR file.

By the way, built-in support for SSL is already possible -- example
configuration is commented out in $TOMCAT_HOME/conf/server.xml.

>
> I hope someone can help me with this... as always, anything is greatly
> appreciated.
>
> Thanks, Stefan Freyr
>
>

Craig McClanahan

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org